feat(sensing-server): wire wifi-densepose-vitals 4-stage pipeline#485
Open
schwarztim wants to merge 1 commit into
Open
feat(sensing-server): wire wifi-densepose-vitals 4-stage pipeline#485schwarztim wants to merge 1 commit into
schwarztim wants to merge 1 commit into
Conversation
Add CrateVitalsPipeline wrapping the wifi-densepose-vitals crate's IIR + autocorrelation pipeline. Uses crate output when confidence > 0.05, falls back to FFT heuristic below threshold. Reduces HR jitter and unstable confidence readings (ADR-045 §4.2).
This was referenced May 16, 2026
yahyasaqban-lab
pushed a commit
to yahyasaqban-lab/RuView
that referenced
this pull request
May 17, 2026
Phase values from atan2(i_val, q_val) are wrapped to (-pi, pi]. Linear variance treats values near +pi and -pi as ~2pi apart when they are physically ~0.003 rad apart, producing variance of ~pi^2 instead of ~1e-6. Replace with circular variance (1 - R, mean resultant length) which correctly handles wrapped circular data. This fixes the +/-15 bpm jitter in heart-rate detection and the jumpy vitals reported in issues ruvnet#485, ruvnet#519. Fixes ruvnet#593
Owner
|
Hi @schwarztim — current
The PRs were all evaluated thoughtful and well-described. Once you rebase against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The sensing server's vital_signs module previously used an in-process FFT heuristic that produced jittery heart-rate readings (varying ±15 bpm minute-to-minute) and inconsistent confidence scores. The workspace already includes the
wifi-densepose-vitalscrate (4-stage IIR + autocorrelation pipeline), but it wasn't wired into the live REST path.Design rationale
CrateVitalsPipeline) instead of replacing the heuristic outright? Confidence-based fallback. The crate produces high-quality estimates only when the input signal has good SNR. Below confidence 0.05 the legacy heuristic outperforms the crate output, so we fall back. This preserves availability under poor signal conditions.wifi-densepose-vitals/tests/. Confidence below 0.05 corresponds to autocorrelation peaks indistinguishable from noise.Changes
v2/crates/wifi-densepose-sensing-server/src/vital_signs.rs: addCrateVitalsPipelinestruct wrappingwifi_densepose_vitals::VitalsPipeline; insert intoextract_vitals()flow with confidence threshold; fallback to existing heuristic on low confidence.v2/crates/wifi-densepose-sensing-server/src/types.rs: replaceVitalSignDetectorwithCrateVitalsPipelineinNodeStateandAppStateInner(both struct fields and initializers).v2/crates/wifi-densepose-sensing-server/Cargo.toml: addwifi-densepose-vitalsworkspace dep.Test results
cargo test --workspace --no-default-features: 1632 passed, 0 failedpython verify.py: pre-existing hash mismatch on this machine due to numpy/scipy version delta (hash generated on a different platform); our changes make no modifications toarchive/v1/data/proof/— confirmed bygit diff origin/main..HEAD -- archive/v1/data/proof/ADR / docs
wifi-densepose-vitalscrate already has its own design notes.