ruv
|
9c95bfac0c
|
feat(nvsim): scaffold + scene + frame [nvsim:pass1]
Pass 1 of the NV-diamond magnetometer pipeline simulator per
docs/research/quantum-sensing/15-nvsim-implementation-plan.md.
Standalone leaf crate at v2/crates/nvsim — deliberately NO internal
RuView dependencies. RuView ecosystem integrations
(wifi-densepose-core frame alignment, ruvector trace compression)
are tracked as Optional Integrations in README and land behind
feature flags after the core simulator ships.
Surfaces shipped:
- scene::Scene — aggregate ground-truth scene (dipoles, current loops,
ferrous objects, eddy-current discs, sensor positions, ambient field)
- scene::DipoleSource — point magnetic dipole, SI units
- scene::CurrentLoop — planar current loop with 64-segment default
Biot–Savart discretisation
- scene::FerrousObject — linearly-induced moment from ambient field
(χ_steel ≈ 5000 default per Cullity & Graham 2e §2)
- scene::EddyCurrent — Faraday + Ohm eddy-current disc primitive
- frame::MagFrame — 60-byte fixed-layout binary record, magic
0xC51A_6E70 (distinct from ADR-018 CSI 0xC51F... and ADR-084 sketch
0xC511_0084)
- frame::flag::* — bit-set constants (saturation, ADC clip, heavy
attenuation, shot-noise-disabled). Raw u16 to avoid pulling
bitflags as a workspace dep.
- NvsimError — typed errors for parse / serialisation failures
- MU_0, GAMMA_E, D_GS — shared physics constants
12 unit tests covering:
- scene JSON round-trip preserves all primitive types
- magic locked to documented value (0xC51A_6E70)
- frame size fixed at 60 bytes
- frame round-trip is byte-exact
- frame deserialiser rejects short / bad-magic / bad-version inputs
- byte-order determinism across repeated serialisations
- flag set/check helpers
Acceptance per plan §3 Pass 1:
- cargo check -p nvsim --no-default-features → clean
- cargo test -p nvsim --no-default-features → 12 passed (target ≥6)
- Workspace test count 1,575 → 1,587 (+12)
- ESP32-S3 on COM7 unaffected (cb #625100, alive)
Two research documents committed alongside:
- 14-nv-diamond-sensor-simulator.md (469 lines, SOTA + verdict)
- 15-nvsim-implementation-plan.md (268 lines, 6-pass build spec)
Status: Pass 1 only. Passes 2-6 (source, propagation, sensor,
digitiser+pipeline, proof+bench) ship in subsequent commits per the
implementation plan.
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-26 15:57:58 -04:00 |
ruv
|
a4bd2308b7
|
feat: ADR-069 ESP32 CSI → Cognitum Seed RVF pipeline (v0.5.4-esp32)
Hardware-validated pipeline connecting ESP32-S3 CSI sensing to Cognitum
Seed (Pi Zero 2 W) edge intelligence appliance via 8-dim feature vectors.
Firmware:
- New 48-byte feature vector packet (magic 0xC5110003) at 1 Hz with
normalized presence, motion, breathing, heart rate, phase variance,
person count, fall detection, and RSSI
- Compressed frame magic reassigned 0xC5110003 → 0xC5110005
- Guard against uninitialized s_top_k read when count=0
Bridge (scripts/seed_csi_bridge.py):
- UDP→HTTPS ingest with bearer token, hash-based vector IDs
- --validate (kNN), --stats, --compact, --allowed-sources modes
- NaN/inf rejection, retry logic, SEED_TOKEN env var support
Validated on live hardware:
- 941 vectors ingested, 100% kNN exact match
- Witness chain SHA-256 verified (1,325 entries)
- 1,463 Rust tests passed, Python proof VERDICT: PASS
Research: 26 docs covering Arena Physica, Maxwell's equations in WiFi
sensing, SOTA survey 2025-2026, GOAP implementation plan
Security: removed hardcoded credentials, added NVS patterns to
.gitignore, source IP filtering, NaN validation
Co-Authored-By: claude-flow <ruv@ruv.net>
|
2026-04-02 19:32:18 -04:00 |