For WMR9x8 stations, wind chill is now retrieved from the console

rather than calculated in software. Thank you user Peter Ferencz!
This commit is contained in:
Tom Keffer
2013-09-14 01:23:57 +00:00
parent 7755df308f
commit 2e630cef01
3 changed files with 17 additions and 13 deletions

View File

@@ -1,2 +1,4 @@
TODO before the next release:
Can wind chill be retrieved from the hardware for the WMR918
(as well as WMR9x8)?

View File

@@ -244,8 +244,17 @@ class WMR9x8(weewx.abstractstation.AbstractStation):
windGustSpeed = ((gust10th/10.0) + gust1 + (gust10*10)) * 3.6
if windGustSpeed >= _record['windSpeed']:
_record['windGust'] = windGustSpeed
# Save the wind record to be used for windchill and heat index
self.last_wind_record = _record
# Bit 1 of chillstatus is on if there is no wind chill data;
# Bit 2 is on if it has overflowed. Check them both:
if chillstatus & 0x6 == 0:
chill = chill1 + (10*chill10)
if chillstatus & 0x8:
chill = -chill
_record['windchill'] = chill
else:
_record['windchill'] = None
return _record
@wmr9x8_registerpackettype(typecode=0x01, size=16)
@@ -297,15 +306,6 @@ class WMR9x8(weewx.abstractstation.AbstractStation):
_record['dewpoint'] = dew
if dewunder and not tempoverunder:
_record['dewpoint'] = weewx.wxformulas.dewpointC(temp, hum)
# The WMR does not provide wind information in a temperature packet,
# so we have to use old wind data to calculate wind chill, provided
# it isn't too old and has gone stale. If no wind data has been seen
# yet, then this will raise an AttributeError exception.
try:
if _record['dateTime'] - self.last_wind_record['dateTime'] <= self.stale_wind:
_record['windchill'] = weewx.wxformulas.windchillC(temp, self.last_wind_record['windSpeed'])
except AttributeError:
pass
else:
# If additional temperature sensors exist (channel>=2), then
# use observation types 'extraTemp1', 'extraTemp2', etc.

View File

@@ -8,12 +8,14 @@ In particular, set the environment variable LANG to your locale, and
then weewx date and number formatting will follow local conventions.
Details in a new section in the Customization Guide.
Added aggregate type "minmax" and "maxmin", thanks to user Gary Roderick.
Thanks, Gary!
Added aggregate type "minmax" and "maxmin". Thank you user Gary Roderick!
WMR100, Vantage, FineOffset, and WS28xx drivers now emit a null wind
direction when the wind speed is zero.
For WMR9x8 stations, wind chill is now retrieved from the console
rather than calculated in software. Thank you user Peter Ferencz!
The LOOP value for daily ET on Vantages was too high by a factor of 10.
This has been corrected.