Commit af8ecd50 authored by Alan Mitchell's avatar Alan Mitchell

Added NWS Dewpoint as a calculated function.

parent 63ff3f76
......@@ -98,6 +98,18 @@ class CalcReadingFuncs_01(calcreadings.CalcReadingFuncs_base):
# not info info available for calculation.
return [], []
def getInternetDewpoint(self, stnCode):
"""** No parameters are sensor reading arrays **
Returns an outdoor Dewpoint temperature from an NWS weather station in degrees F.
Returns just one record of information, timestamped with the current time.
"""
obs = internetwx.getWeatherObservation(stnCode)
if obs.dewpt is not None:
return [int(time.time())], [obs.dewpt.value() * 1.8 + 32.0]
else:
return [], []
def getWUtemperature(self, stn, stn2=None):
"""** No parameters are sensor reading arrays **
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment