Apply instrument drift corrections based on calibration check results.

drift_correct(t, v, z = NULL, s = NULL, config)

Arguments

t

Measurement times (POSIXct).

v

Measurement values.

z

Data frame of zero calibration checks. Should contain columns time, value, and corrected (logical, whether the instrument was adjusted).

s

Data frame of span calibration checks. Should contain columns time, value, and corrected (logical, whether the instrument was adjusted).

config

list of Configuration options from the measurement_types config table.

Value

Drift-corrected measurements.

Details

Zero and span values are estimated using estimate_cals. If not provided, zeros and spans are assumed to be 0 and 1, respectively. The corrected values are calculated as \((measurement - zero) / span\).

See also