Skip to content

How different data intervals are handled within this extension

roe-dl edited this page Jun 11, 2023 · 3 revisions

Introduction

The general working principle of WeeWX is as follows: The WeeWX core schedules LOOP events if the weather station emits data. How frequent those LOOP events occur depends on the weather station hardware and the driver software. There can be some little seconds between them, but also up to 5 minutes. The disdrometer on the other hand uses a completely different data interval. So one important task of this extension is to handle those different intervals.

WeeWX then accumulates all LOOP events during the archive interval and calculates the values to be stored in database by the accumulator rules defined in weewx.conf or by defaults.

PrecipMeter extension internal Accumulators

As the devices handled by this extension may provide data more frequent than LOOP events occur, the readings are cached by the thread that handles the connection to the device. When the LOOP event asks the PrecipMeter extension for data, the cached values are read and accumulated to get a single value for each observation type. So this is some kind of pre-accumulation, which is done as follows:

  • rain intensity, snow intensity: arithmetic average
  • rain (absolute and accumulated): the last value arrived
  • present weather code (ww and wawa): the maximum of the values arrived (readings that are in contrast to the readings immediately before and after are ignored)
  • meteorological optical range (MOR), radar reflecitivity factor: arithmetic average
  • counting values: the last value arrived