As an aside, the other related issue I have faced in writing loop-based 
generators of near realtime data files used as a feed for some other 
display/app (eg clientraw.txt, gauge-data.txt or the old customclientraw.txt) 
is that aggregates can no longer reliably just use an aggregate from the 
weeWX database. At anytime of the day, dayRain (from the database) returns 
the day's rainfall up until the last archive record timestamp, if you are 4 
minutes into a 5 minute archive period there is potentially 4 minutes of 
rain that has not been included. Similarly, today's max outTemp excludes 4 
minutes of outTemp data from the aggregate. Again this is most noticeable 
with rain, but consider a station with a longer archive interval and you 
potentialy have many minutes of data not included in a database aggregate. 
Use of native dayRain from a loop packet is a solution, but only for 
Vantage stations (no other drivers include dayRain in loop packets) and 
dayRain does nothing to help day max outTemp. The issue is also quite 
evident with windrun.

I have worked around the issue by caching selected loop obs and calculating 
the required aggregates from the db and the relevant cached obs. The cached 
is 'trimmed' each time a new archive record is written.

It's a less than ideal approach but it is effective and removes the little 
discrepancies that users do notice, particuarly in the first archive period 
after midnight. And believe you me, discrepancies like 'outTemp shows 15.5 
but today's max outTemp shows 15.4' get noticed!

Gary

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to