pub struct Threshold {
pub level: u16,
pub hold_ms: u16,
pub variation_only: bool,
}Expand description
Parameters of Reporting::ThresholdBased.
The node keeps a slow running average of the channel’s amplitude profile over up to 32 sampled
subcarriers, and scores every measurement by how far its profile’s shape departs from that
average, on a 0..=65535 scale. Both profiles are normalised by their own totals first, so the
receiver’s per-frame gain changes score nothing; 65535 is a profile with no overlap at all. A
measurement scoring at least level is reported and opens a hold_ms window in which every
measurement is reported, so a movement is captured whole rather than as its loudest frames.
Calibrate level on your own link. Raw 8-bit estimates carry per-frame quantisation noise,
so a still room does not score zero. Measured on two ESP32-C5s at HE20 (245 subcarriers,
100 frames/s, an empty room), single-frame scores had a median of ~2700 and a 99th percentile
of ~4300. Run the node with variation_only first, read the scores it
reports while nothing moves, and set level comfortably above their high percentile; the level
that separates motion from stillness has not been measured here and depends on the room.
Fields§
§level: u16Score at or above which a measurement is reported.
hold_ms: u16How long to keep reporting after a measurement crosses level, in milliseconds.
variation_only: boolReport only the score, as a CsiPayload::Variation,
instead of the full measurement. The lightest report a node can send.