nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
|
Thresholds for detecting significant changes in readings. More...
#include <nrfcxx/sensor/ccs811.hpp>
Public Member Functions | |
int | env_data_changed (uint32_t ed1, uint32_t ed2) const |
Compare two encoded environmental values for closeness. More... | |
int | observation_beacon_changed (const observation_beacon_type &ob1, const observation_beacon_type &ob2) const |
Assess whether two observations differ significantly. More... | |
Data Fields | |
uint16_t | eCO2_ppm = 20 |
Threshold for changes in observations_type::eCO2. | |
uint16_t | eTVOC_ppb = 5 |
Threshold for changes in observations_type::eTVOC. | |
uint8_t | temperature_Cel = 1 |
Threshold for changes to the temperature value in env_data(). | |
uint8_t | humidity_pph = 2 |
Threshold for changes to the relative humidity value in env_data(). | |
Thresholds for detecting significant changes in readings.
int nrfcxx::sensor::ccs811::threshold_s::env_data_changed | ( | uint32_t | ed1, |
uint32_t | ed2 | ||
) | const |
Compare two encoded environmental values for closeness.
The HTS221 sensor on the Thingy:52 has abysmal repeatability and frequently bounces back and forth across half-unit boundaries, resulting in unnecessary updates to the environment setting and possibly contributing to variation in eCO2 estimates.
Determine whether the difference between two values is large enough to warrant doing an update, using the threshold limits specified in temperature_Cel and humidity_pph.
int nrfcxx::sensor::ccs811::threshold_s::observation_beacon_changed | ( | const observation_beacon_type & | ob1, |
const observation_beacon_type & | ob2 | ||
) | const |
Assess whether two observations differ significantly.
A change is diagnosed if:
from | a previous instance against which differences are calculated. |
thr | the thresholds for detecting differences. |