mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 03:58:45 +00:00
Merge pull request #867 from ashassan8/master
added pressure units in mmHg to v2.wttr.in
This commit is contained in:
commit
676e95a0db
1 changed files with 3 additions and 0 deletions
|
@ -177,6 +177,8 @@ def hpa_to_mb(hpa):
|
||||||
def hpa_to_in(hpa):
|
def hpa_to_in(hpa):
|
||||||
return round(hpa * 0.02953, 2)
|
return round(hpa * 0.02953, 2)
|
||||||
|
|
||||||
|
def hpa_to_mmHg(hpa):
|
||||||
|
return round(hpa * 0.75006157584566 , 3)
|
||||||
|
|
||||||
def group_hours_to_days(lat, lng, hourlies, days_to_return):
|
def group_hours_to_days(lat, lng, hourlies, days_to_return):
|
||||||
tf = timezonefinder.TimezoneFinder()
|
tf = timezonefinder.TimezoneFinder()
|
||||||
|
@ -345,6 +347,7 @@ def _convert_hour(hour):
|
||||||
"visibility": 'not yet implemented', # str(details['vis_km']),
|
"visibility": 'not yet implemented', # str(details['vis_km']),
|
||||||
"visibilityMiles": 'not yet implemented', # str(details['vis_miles']),
|
"visibilityMiles": 'not yet implemented', # str(details['vis_miles']),
|
||||||
"pressure": str(hpa_to_mb(details['air_pressure_at_sea_level'])),
|
"pressure": str(hpa_to_mb(details['air_pressure_at_sea_level'])),
|
||||||
|
"pressure_mmHg": str(hpa_to_mmHg(details['air_pressure_at_sea_level'])),
|
||||||
"pressureInches": str(hpa_to_in(details['air_pressure_at_sea_level'])),
|
"pressureInches": str(hpa_to_in(details['air_pressure_at_sea_level'])),
|
||||||
"cloudcover": 'not yet implemented', # Convert from cloud_area_fraction?? str(details['cloud']),
|
"cloudcover": 'not yet implemented', # Convert from cloud_area_fraction?? str(details['cloud']),
|
||||||
# metno doesn't have FeelsLikeC, but we-lang.go is using it in calcs,
|
# metno doesn't have FeelsLikeC, but we-lang.go is using it in calcs,
|
||||||
|
|
Loading…
Reference in a new issue