aliro_rssi_gate.c
BLE-RSSI ranging power gate implementation: EWMA smoothing in Q4 fixed point…
Overview
BLE-RSSI ranging power gate implementation: EWMA smoothing in Q4 fixed point, open/close hysteresis with a sustained-below close hold, and an optional rise-rate fast open so a fast approach is not penalized by the smoothing lag. Pure logic — no radio, clock, or logging dependencies — so the host suite can drive it with synthetic approach traces.
depends on aliro_rssi_gate.h
flowchart TD aliro_rssi_gate_feed --> slope_track
API
Fstatic void slope_track(struct aliro_rssi_gate *g, const struct aliro_rssi_gate_cfg *cfg, uint32_t now_ms)
Advance the rise-rate reference: mid follows the newest smoothed value, and
once it is window/2 old it becomes old, so old always lags the present by
between window/2 and ~window (given a steady sample interval).
aliro_rssi_gate_feedUndocumented (6)
aliro_rssi_gate_reset, aliro_rssi_gate_is_open, aliro_rssi_gate_hold_begin, aliro_rssi_gate_was_capped, aliro_rssi_gate_level_dbm, aliro_rssi_gate_feed