Better readability
This commit is contained in:
parent
1ada48e544
commit
57ce901c01
1 changed files with 3 additions and 3 deletions
|
@ -194,10 +194,10 @@ def follow_saturated_mixing_ratio(temp: float, pressure: float, step: float=1.0)
|
|||
return series
|
||||
|
||||
def wind_u(speed: float, direction: float) -> float:
|
||||
return speed * math.cos(rad(direction))
|
||||
return math.cos(rad(direction)) * speed
|
||||
|
||||
def wind_v(speed: float, direction: float) -> float:
|
||||
return -speed * math.sin(rad(direction))
|
||||
return math.sin(rad(direction)) * -speed
|
||||
|
||||
def wind_uv(speed: float, direction: float) -> float:
|
||||
return (
|
||||
|
@ -208,5 +208,5 @@ def wind_uv(speed: float, direction: float) -> float:
|
|||
def wind_speed_dir(u: float, v: float) -> float:
|
||||
return (
|
||||
math.sqrt(u**2 + v**2),
|
||||
(180 - deg(math.atan2(v, u))) % 360
|
||||
(deg(math.atan2(v, u)) - 180) % 360
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue