Peter,

Don't forget the fact that if for any reason Weewx is stopped, it will, during 
restart, read from the datalogger memory any "missed" archive packets that were 
not captured during the interruption period.  In that case, no loop data are 
available for these archive records, and you have to add code in your  
newArchiveRecord() function to calculate, over the archive interval, the 
sunshine duration on the basis of the archive radiation value. Otherwise, the 
sunshine duration of these imported records will be always 0!

Even if Weewx interruption is short enough so that there is no missed records 
to import from the datalogger memory, the LOOP packets received after startup 
will not cover the full period of  the first archive record captured , and 
sunshine duration calculated from the LOOP data will be underestimated. In my 
code, I detect also this situation and the sunshine duration of the first 
captured archive record  will be also calculated from the archive radiation 
value over the archive interval.


> Le 16 juil. 2022 à 17:01, 'Peter Fletcher' via weewx-user 
> <[email protected]> a écrit :
> 
> The code I am using is pasted below. The main threshold calculation is a copy 
> of the original Meto-France code used by Jacques, but the calculation is only 
> done when the radiation value changes or (approximately) every minute, if it 
> has not changed. Also included is code to store Davis’s ‘Storm Rain’ value in 
> the archive database. The stored value for sunshine time has more apparent 
> precision than is given by Jacques's code, but it is probably neither more 
> nor less accurate, since its accuracy is limited by the relatively slow 
> 'response' of the Davis sensor.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe 
> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/e11727db-7c89-4334-b24c-a5b2f7ca66dbn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/e11727db-7c89-4334-b24c-a5b2f7ca66dbn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/DFA46F50-DF9D-47F6-9BB3-9B9FA272A129%40gmail.com.

Reply via email to