Browse Source

even preciser wind direction visualization (#455)

pull/461/head
Igor Chubin 6 years ago
parent
commit
f488160294
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      lib/view/line.py
  2. +1
    -1
      lib/view/v2.py

+ 1
- 1
lib/view/line.py View File

@ -145,7 +145,7 @@ def render_wind(data, query):
degree = ""
if degree:
wind_direction = WIND_DIRECTION[((degree+22)%360)//45]
wind_direction = WIND_DIRECTION[int(((degree+22.5)%360)/45.0)]
else:
wind_direction = ""


+ 1
- 1
lib/view/v2.py View File

@ -350,7 +350,7 @@ def draw_wind(data, color_data):
degree = int(degree)
if degree:
wind_direction = constants.WIND_DIRECTION[((degree+22)%360)//45]
wind_direction = constants.WIND_DIRECTION[int(((degree+22.5)%360)/45.0)]
else:
wind_direction = ""


Loading…
Cancel
Save