>> e.value = (10*(4.5+(data['abs_pressure'])))/10
>> ## to make the pressure correct #
How does adding 4.5 correct the pressure reading? Are all WH1080
stations incorrect by this amount?
>> e.total = (136*(data['rain']))/100
>> ## .to make the rainrate correct #
This may be correct, if your rain gauge requires a 36% correction. I
don't expect all stations have the same error.
>> e.mean.speed = units.MphToMps(data['wind_ave'])
The WH1080 wind speeds are already in m/s, so why is this conversion
being applied?
I would suggest ignoring data when 'logged' is true, so events are
generated at regular 48 second intervals. Otherwise you may get near
duplicate events in close succession when the 48 second data period
falls in phase with the 5 minute logging period.
Lastly, values from the external sensors will be 'None' when radio
contact between the sensors and the base station is interrupted. (The
wind direction can also be an integer value 128 or larger.) You should
test for this before doing any arithmetic with the values.
Jim (pywws developer).
Station configuration affects the station's own display, but not the raw
data sent over USB to the computer.
> If the difference is due to poor sensor calibration (cheap stations
> ,aren't they?), the correction should occur in a dedicated place, not in
> each driver code and be configurable. Note that the following issue also
> reports such problems: http://code.google.com/p/wfrog/issues/detail?id=43.
Poor calibration and poor design. (E.g. the rain collector is shallow
and some rain splashes out, so isn't collected. The proportion lost will
vary with wind direction and strength.) I take the view that they are
not accurate enough to be worth calibrating - all one can say is that
today was wetter, windier and colder than yesterday.
I've not yet put any configurable calibration in pywws, although some
users have asked for it. I feel it should store the uncalibrated data,
so any future adjustment can be applied retrospectively. But some
calibration changes would have a definite start time - e.g. adding a
funnel to the rain gauge to increase its collection area.
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
That's the sort of thing, but note that a test such as:
if data['temp_out']:
will fail when the temperature is zero (which can happen!). A better
test is:
if data['temp_out'] is not None:
These test only need be applied to the external temperature, humidity,
and wind speeds & direction. The direction test should be:
if (data['wind_dir'] is not None and
data['wind_dir'] < 16):