mirror of
https://github.com/ruvnet/RuView.git
synced 2026-07-30 03:15:55 +00:00
Operator-initiated calibration that records 30 s of stationary CSI,
emits a per-subcarrier baseline (amplitude mean+variance via Welford,
phase via circular sin/cos sums with von Mises dispersion), and gates
downstream stages on a deviation z-score. Plugs into multistatic
coherence gating, motion/presence detection, and the new ADR-134 CIR
estimator as a reference-subtracted input.
API surface (under wifi_densepose_signal):
CalibrationConfig::{ht20, ht40, he20, he40}
CalibrationRecorder { record(), finalize(), frames_recorded() }
BaselineCalibration {
subcarriers: Vec<SubcarrierBaseline>,
deviation(&CsiFrame), subtract_in_place(&mut CsiFrame),
to_bytes(), from_bytes()
}
CalibrationDeviationScore { amplitude_z_median, amplitude_z_max,
phase_drift_median, motion_flagged }
CalibrationError { SubcarrierMismatch, TierMismatch,
InsufficientFrames, VersionMismatch, TruncatedBuffer }
Binary baseline format: magic 0xCA1B_0001 + u8 version=1 + u8 tier +
captured_at_unix_s (i64) + frame_count (u64) + num_subcarriers (u32) +
[SubcarrierBaseline; N] as 16 bytes each (amp_mean, amp_variance,
phase_mean, phase_dispersion as f32 LE). Hand-written serialisation so
the format is stable across Rust toolchain versions without serde drift.
CLI: new `wifi-densepose calibrate` subcommand binds a UDP listener
(0xC511_0001 frames), streams them through CalibrationRecorder, prints
a real-time z-score banner per ADR-135 §risk 1 (operator-may-be-moving),
aborts on sustained high deviation, and writes the binary baseline to
disk. Local UDP packet parser duplicated from sensing-server (per ADR
discussion — avoids cross-crate API churn).
Witness: cross-platform-deterministic SHA-256 over the per-subcarrier
quantised baseline profile (u16 LE at 1e-2/1e-4/1e-3, no sort) using
the lesson learnt from the CIR PR #837 libm-jitter fix. Hash:
d6bce07ecb1648e6936561df44bf4a3bfc17bb0ba5f692646b2301d105b52f67
CI guard: new "ADR-135 calibration witness proof (determinism guard)"
step under the Rust Workspace Tests job, adjacent to the existing
ADR-134 CIR guard. Regressions are unambiguously attributable.
Hardware-in-loop validation: full 600-frame capture exercised via the
new scripts/synth-csi-udp.py emitter targeting 127.0.0.1:5005. The CLI
binary received 600 frames at 20 Hz, z_med stable at ~0.7, motion
correctly NOT flagged, finalised baseline written to baseline.bin (860
bytes) with correct magic + version + timestamp in the header. Live
ESP32 capture from COM9 is operator follow-up — requires provisioning
the firmware's UDP target IP to match the host running the CLI.
Test results (cargo test -p wifi-densepose-signal --no-default-features):
lib: 382 pass / 0 fail / 1 ignored
calibration_synthetic: 17 pass / 0 fail
calibration_drift: 5 pass / 0 fail
calibration_roundtrip: 10 pass / 0 fail
cir_*: 9 pass + 6 documented P2 ignores
doctest: 10 pass
Bench: 20 Criterion combinations registered
(recorder_record / recorder_finalize / deviation / record_600 /
to_bytes across HT20/HT40/HE20/HE40 tiers).
Witness: bash scripts/verify-calibration-proof.sh → VERDICT: PASS
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| macos-shortcuts | ||
| swarm_presets | ||
| align-ground-truth.js | ||
| apnea-detector.js | ||
| benchmark-model.py | ||
| benchmark-rf-scan.js | ||
| benchmark-ruvllm.js | ||
| benchmark-wiflow.js | ||
| c6-presence-watcher.py | ||
| check_fix_markers.py | ||
| check_health.py | ||
| collect-ground-truth.py | ||
| collect-training-data.py | ||
| csi-graph-visualizer.js | ||
| csi-spectrogram.js | ||
| deep-scan.js | ||
| device-fingerprint.js | ||
| esp32_jsonl_to_rvcsi.py | ||
| esp32_wasm_test.py | ||
| eval-wiflow.js | ||
| export-onnx.py | ||
| fix-markers.json | ||
| gait-analyzer.js | ||
| gcloud-train.sh | ||
| generate-witness-bundle.sh | ||
| generate_nvs_matrix.py | ||
| hap-test-sensor.py | ||
| homecore-seed.sh | ||
| inject_fault.py | ||
| install-qemu.sh | ||
| mac-mini-train.sh | ||
| material-classifier.js | ||
| material-detector.js | ||
| mesh-graph-transformer.js | ||
| mincut-person-counter.js | ||
| mmwave_fusion_bridge.py | ||
| passive-radar.js | ||
| probe-fft-platform.py | ||
| provision.py | ||
| publish-huggingface.py | ||
| publish-huggingface.sh | ||
| qemu-chaos-test.sh | ||
| qemu-cli.sh | ||
| qemu-esp32s3-test.sh | ||
| qemu-mesh-test.sh | ||
| qemu-snapshot-test.sh | ||
| qemu_swarm.py | ||
| record-csi-udp.py | ||
| redact-secrets.py | ||
| release-v0.5.4.sh | ||
| rf-scan-multifreq.js | ||
| rf-scan.js | ||
| rf-tomography.js | ||
| room-fingerprint.js | ||
| rotate-npm-token.sh | ||
| ruview-hap-bridge.py | ||
| ruview-sensing-server.py | ||
| rvagent-mcp-consumer.py | ||
| seed_csi_bridge.py | ||
| sleep-monitor.js | ||
| snn-csi-processor.js | ||
| stress-monitor.js | ||
| swarm_health.py | ||
| synth-csi-udp.py | ||
| through-wall-detector.js | ||
| train-camera-free.js | ||
| train-count.py | ||
| train-ruvllm.js | ||
| train-wiflow-supervised.js | ||
| train-wiflow.js | ||
| training-config-sweep.json | ||
| udp-relay.py | ||
| validate-esp32-mqtt.sh | ||
| validate-ha-blueprints.py | ||
| validate_mesh_test.py | ||
| validate_qemu_output.py | ||
| verify-calibration-proof.sh | ||
| verify-cir-proof.sh | ||
| wiflow-model.js | ||
| witness-adr-115.sh | ||