mirror of
https://github.com/weewx/weewx.git
synced 2026-04-19 17:16:56 -04:00
set wind dir to None when no wind speed
This commit is contained in:
@@ -77,9 +77,16 @@ class StdWXCalculate(weewx.engine.StdService):
|
||||
calc = True
|
||||
if calc:
|
||||
getattr(self, 'calc_'+obs)(data_us, data_type)
|
||||
self.adjust_winddir(data_dict)
|
||||
data_x = weewx.units.to_std_system(data_us, data_dict['usUnits'])
|
||||
data_dict.update(data_x)
|
||||
|
||||
def adjust_winddir(self, data):
|
||||
if 'windSpeed' in data and not data['windSpeed']:
|
||||
data['windDir'] = None
|
||||
if 'windGust' in data and not data['windGust']:
|
||||
data['windGustDir'] = None
|
||||
|
||||
def calc_dewpoint(self, data, data_type):
|
||||
if 'outTemp' in data and 'outHumidity' in data:
|
||||
data['dewpoint'] = weewx.wxformulas.dewpointF(
|
||||
|
||||
@@ -22,6 +22,8 @@ Fixed bug in calculation of inDewpoint.
|
||||
Assign default units for extraHumid3,4,5,6,7, extraTemp4,5,6,7, leafTemp3,4,
|
||||
and leafWet1,2.
|
||||
|
||||
Use StdWXCalculate to ensure that wind direction is None if no wind speed.
|
||||
|
||||
|
||||
3.0.1 12/07/14
|
||||
|
||||
|
||||
Reference in New Issue
Block a user