To measure my lake elevation I use a MaxBotix ultrasonic range finder. In my python code, running on the Pi, which every 10 minutes takes a reading from the sensor and stores it in a static file on /dev/sda1, I do a simple QC check, comparing the previous reading and if the delta is unreasonable I set a data-invalid flag and the code leaves the previous reading for the weewx service to pickup. It's not perfect but prevents the kind of crazy spikes that comes from a bird or otter sitting under the sensor or other electronic artifact. Phil
On Tuesday, April 7, 2020 at 3:28:02 PM UTC+2, Jens-Jørgen Kjærgaard wrote: > > I have been a user for many years, and the software is usually running > smoothly. > Some years back, I added the temperature of my lake as extraTemp1 - also > fine. > Now, I also monitor the water level, by means of ultrasound, using the > HC-SR04. I have added this as extraTemp2, and don't min it shows as C in > the graphs. > I have a little problem with that sensor, though. Sometimes it will show a > far off reading, which has to be ignored, ie if it is more than 2 cm off > the previous reading. > But I can't figure out how to do that. Is there a way to store the > previous reading and use that (temporarily) for comparison? Or the average > of the readings up to that point? > > Jens-Jørgen Kjærgaard > Tuenvej 818 > 9870 Sindal > Denmark > +45 21204417 > www.jensjk.dk > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/86ecb1ba-a81d-4145-9409-600ffabf9593%40googlegroups.com.