ads ws1 driver

66 views
Skip to first unread message

mwall

unread,
May 17, 2014, 3:01:08 PM5/17/14
to weewx-de...@googlegroups.com
steve,

could you test the attached driver for ws1 stations?

i have cleaned things up a bit in preparation for adding this driver to the weewx distribution.

the weewx.conf stanza is now [WS1] instead of [ADS].  for example:

[WS1]
  port = /dev/ttyS0
  driver = user.ads

m
ads.py

sesy...@gmail.com

unread,
May 17, 2014, 6:21:41 PM5/17/14
to weewx-de...@googlegroups.com
I am now running it watching for issues.  On the previous version I added some logic to prevent wind chill and heatindex showing when they aren't valid. Is this the proper way to do it?  I also find that the ads.py provides better dewpoint numbers than the owfs.py I am using.

I will keep running your new version and let you know if there are any issues.
 

        if -20 < packet['outTemp'] < 50 and 3 < packet['windSpeed']:
          packet['windchill'] = weewx.wxformulas.windchillF(packet['outTemp'], packet['windSpeed'])
        else:
           packet['windchill'] = None
        if 80 < packet['outTemp'] and 40 < packet['outHumidity']:
          packet['heatindex'] = weewx.wxformulas.heatindexF(packet['outTemp'], packet['outHumidity'])
        else:
          packet['heatindex'] = None
        packet['dewpoint'] = weewx.wxformulas.dewpointF(packet['outTemp'], packet['outHumidity'])

mwall

unread,
May 17, 2014, 6:53:54 PM5/17/14
to weewx-de...@googlegroups.com
On Saturday, May 17, 2014 6:21:41 PM UTC-4, sesy...@gmail.com wrote:
I am now running it watching for issues.  On the previous version I added some logic to prevent wind chill and heatindex showing when they aren't valid. Is this the proper way to do it?

the logic for whether to apply windchill/heatindex is already in the methods in wxformulas.  when the temperature is beyond the valid bounds for windchill/heatindex, the original temperature is returned (not None).  talk to tom if you think this is not correct behavior.

 
  I also find that the ads.py provides better dewpoint numbers than the owfs.py I am using.

what dewpoint numbers are you using in owfs.py?  you should use wxformulas.dewpointC or wxformulas.dewpointF
 
 

sesy...@gmail.com

unread,
May 17, 2014, 7:11:09 PM5/17/14
to weewx-de...@googlegroups.com
I did think that the logic was already there but for some reason it doesn't appear to work the way I would think.  For instance the is now showing both windchil and heatindex now when the temperature is only 60F. Windchill shouldn't apply at temperatures above 50 and Heatindex shouldn't show below 80. At least I believe so.  I will ask Tom.
I think the problem with the owfs driver is that it is using the C formulas with US units.  I haven't quite figured out how to completely convert it to US units.

Thomas Keffer

unread,
May 17, 2014, 7:17:00 PM5/17/14
to sesy...@gmail.com, weewx-de...@googlegroups.com
Windchill and heat index revert to regular temperatures when their algorithms don't apply.

-tk

sesy...@gmail.com

unread,
May 17, 2014, 8:12:26 PM5/17/14
to weewx-de...@googlegroups.com
I see that is the case. Would it be better to not show them if not valid?  I think it doesn't graph them if invalid.
Steve

Thomas Keffer

unread,
May 17, 2014, 8:17:55 PM5/17/14
to sesy...@gmail.com, weewx-de...@googlegroups.com
Weewx follows the convention done by wview and by Davis. If the wind chill and heat index formulas are not valid, then it substitutes the regular, ambient temperature. This then gets graphed.

The alternative would be to substitute a "null" value. In that case, wind chill and heat index would not be graphed at all when the formula is not valid. I do not think this is what most people would expect. I can imagine all kinds of support questions, "What happened to my wind chill?"

The question wind chill and heat index are trying to answer is, "How cold (hot) does it feel out there?" Substituting regular temperature answers that question. Offering a null value just confuses people.

-tk

sesy...@gmail.com

unread,
May 17, 2014, 8:45:19 PM5/17/14
to weewx-de...@googlegroups.com, sesy...@gmail.com
Ok, that makes sense. Thanks for explaining it.

Steve
Reply all
Reply to author
Forward
0 new messages