mirror of
https://github.com/ruvnet/RuView
synced 2026-07-23 17:33:20 +00:00
fix(cli): keep proven mean-amplitude carrier for room features
The max-variance-subcarrier carrier locked onto motion artifacts (not breathing) and also had an out-of-bounds bug on variable CSI subcarrier counts. Reverted to the mean-amplitude carrier, which is validated live to detect breathing. Phase-based extraction on a stable subcarrier remains the proper higher-SNR refinement (ADR-151 §4). Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -32,8 +32,12 @@ fn now_unix() -> i64 {
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
/// One scalar per frame: mean amplitude across all subcarriers/streams.
|
||||
/// Carries presence/motion energy and the breathing amplitude modulation.
|
||||
/// Per-frame scalar: mean amplitude across all subcarriers/streams.
|
||||
///
|
||||
/// Carries presence/motion energy plus the breathing amplitude modulation.
|
||||
/// (Validated live on the ESP32 — picks up breathing where a max-variance
|
||||
/// subcarrier instead locks onto motion artifacts. A phase-based carrier on a
|
||||
/// *stable* subcarrier is the proper higher-SNR refinement — ADR-151 §4.)
|
||||
fn frame_scalar(frame: &CsiFrame) -> f32 {
|
||||
let a = &frame.amplitude;
|
||||
if a.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user