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