Fix wind speed/direction calculation (again)
This commit is contained in:
parent
1b09b29d59
commit
90bbf1fa8b
1 changed files with 9 additions and 2 deletions
|
@ -75,10 +75,17 @@ class RAOBObs():
|
||||||
if token == '=':
|
if token == '=':
|
||||||
return
|
return
|
||||||
|
|
||||||
if token[2] == '0' or token[2] == '5':
|
value = int(token[2])
|
||||||
|
|
||||||
|
if value == 0:
|
||||||
|
pass
|
||||||
|
elif value == 5:
|
||||||
base_dir = 5
|
base_dir = 5
|
||||||
|
elif value > 5:
|
||||||
|
base_speed = 100 * value % 5
|
||||||
|
base_dir = 5
|
||||||
else:
|
else:
|
||||||
base_speed = 100
|
base_speed = 100 * value
|
||||||
|
|
||||||
if token[0:2] == '//':
|
if token[0:2] == '//':
|
||||||
wind_dir = None
|
wind_dir = None
|
||||||
|
|
Loading…
Add table
Reference in a new issue