-
Notifications
You must be signed in to change notification settings - Fork 5
Description
SDI-12 soil sensors (TDR315, 5TM) were moved from the standard 5-second slowsequence into a separate 1-min slowsequence to avoid data acquisition stalling due to sensor delays. By default the running averages are supposed to represent the previous 1-minute of data. However, the parameter dictating the number of samples to include in said averages (NMBR_SOIL_T_WTR_DEL_SAMPLES) was not updated and as a result, the averaging windows for those sensors was inadvertently expanded to previous 12 minutes.
Const SLOWSEQUENCE_SCAN_INTERVAL = 5000 'Unique: slow sequence measurement rate (ms) (For this CR3K program, the shortest scan interval is 2000 ms)
[...]
Const NMBR_SOIL_T_WTR_DEL_SAMPLES = (60*1000)/SLOWSEQUENCE_SCAN_INTERVAL 'Unique: Number of measurements to compute a one-minute mean of soil temperature and water
Standard slow sequence:
SlowSequence
Scan (SLOWSEQUENCE_SCAN_INTERVAL, mSec, 3, 0)
[...]
#If ((SENSOR_HFP) AND (SENSOR_CS616) AND (SENSOR_TCAV)) Then
AvgRun (soil_wtr_current(1), NMBR_CS6xx, soil_wtr_T(1), NMBR_SOIL_T_WTR_DEL_SAMPLES)
New sequence:
SlowSequence
Scan (1, Min, 0, 0)
[...]
#If ((SENSOR_HFP) AND (SENSOR_CS6XX) AND (SENSOR_SOIL_T))) Then
AvgRun (soil_wtr_current(1), NMBR_CS6xx, (tdr31X_wc(1)/100), NMBR_SOIL_T_WTR_DEL_SAMPLES) 'HINT scale % -> v/v
The trivial fix (scaling parameter to match new slowsequence time base) would mean just one data point is included in those averages. Maybe it should be a 15-, 20-, or 30-second scan instead?
Alternately: revert the addition of a new slowsequence and specify up-front that if SDI-12 soil sensors are used, the slowsequence interval must be increased from 5000msec to [whatever the actual minimum should be, probably determined through some bench testing].