[[Calculations]] on archive record not loop packet?

55 views
Skip to first unread message

Graham Eddy

unread,
Dec 18, 2020, 10:10:23 AM12/18/20
to weewx...@googlegroups.com
my reading of the 4.3.0 source is that [[Calculations]] calculates the specified xtypes on each loop packet. is there a simple way now, or is it in plan, to be able to have them calculated for archive records only?

i do not want to calculate AQI from averaged pollutant values except when the averages are updated, which for me is at the end of each archive interval. i have written a data service to call the xtypes each archive record, but i would prefer StdWXCalculate handled it for me with ‘= software’ declarations

Tom Keffer

unread,
Dec 21, 2020, 7:06:38 PM12/21/20
to weewx-user
Hi, Graham

Seems like a reasonable thing to do but, no, there is no way at this point. Perhaps the [[Calculations]] section should be expanded to:

[StdWXCalculate]
  [[Calculations]]
    aqi = software, record

That is, it takes an optional second positional parameter that can be one of 'loop', 'record', or 'both'. The default would be 'both'.



On Fri, Dec 18, 2020 at 7:10 AM Graham Eddy <graha...@gmail.com> wrote:
my reading of the 4.3.0 source is that [[Calculations]] calculates the specified xtypes on each loop packet. is there a simple way now, or is it in plan, to be able to have them calculated for archive records only?

i do not want to calculate AQI from averaged pollutant values except when the averages are updated, which for me is at the end of each archive interval. i have written a data service to call the xtypes each archive record, but i would prefer StdWXCalculate handled it for me with ‘= software’ declarations

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/D43D0E70-13A6-4B6B-905C-F7597C97DE0A%40gmail.com.

Graham Eddy

unread,
Dec 21, 2020, 7:47:27 PM12/21/20
to weewx...@googlegroups.com
good idea. i'll code & submit that

Graham Eddy

unread,
Dec 26, 2020, 4:06:28 AM12/26/20
to weewx...@googlegroups.com
‘push request’ created (i think… github said something about deprecated) for ‘loop’ and/or ‘archive’
i.e. aqi=software (defaults to both bindings) or aqi=software,loop or aqi=software,archive or aqi=software,loop,archive
Reply all
Reply to author
Forward
0 new messages