Wind speed is given to us in metres per second. convert to kph
This commit is contained in:
parent
f28195e3ae
commit
2ef85960e9
1 changed files with 5 additions and 3 deletions
|
@ -63,9 +63,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
fahrenheit = "%dF" % ((page.data["main"]["temp"]*(9/5))+32)
|
fahrenheit = "%dF" % ((page.data["main"]["temp"]*(9/5))+32)
|
||||||
description = page.data["weather"][0]["description"].title()
|
description = page.data["weather"][0]["description"].title()
|
||||||
humidity = "%s%%" % page.data["main"]["humidity"]
|
humidity = "%s%%" % page.data["main"]["humidity"]
|
||||||
wind_speed_k = "%sKMh" % page.data["wind"]["speed"]
|
|
||||||
wind_speed_m = "%sMPh" % round(
|
# wind speed is in metres per second - 3.6* for KMh
|
||||||
0.6214*page.data["wind"]["speed"], 1)
|
wind_speed = 3.6*page.data["wind"]["speed"]
|
||||||
|
wind_speed_k = "%sKMh" % round(wind_speed, 1)
|
||||||
|
wind_speed_m = "%sMPh" % round(0.6214*wind_speed, 1)
|
||||||
|
|
||||||
event["stdout"].write(
|
event["stdout"].write(
|
||||||
"(%s) %s/%s | %s | Humidity: %s | Wind: %s/%s" % (
|
"(%s) %s/%s | %s | Humidity: %s | Wind: %s/%s" % (
|
||||||
|
|
Loading…
Reference in a new issue