Add wind_u(), wind_v() vector component functions

This commit is contained in:
XANTRONIX 2025-03-17 22:15:34 -04:00
parent a231954de1
commit 9d9cfab9e2

View file

@ -189,3 +189,9 @@ def follow_saturated_mixing_ratio(temp: float, pressure: float, step: float=1.0)
p2 -= step
return series
def wind_u(speed: float, direction: float) -> float:
return speed * math.cos(rad(direction))
def wind_v(speed: float, direction: float) -> float:
return -speed * math.sin(rad(direction))