wifi-densepose/v2/crates/wifi-densepose-hardware/src
ruv 0c311a202b feat(adr-110): SyncPacket::mesh_aligned_us_for_sequence (interpolation) + NodeState hook
Iter 17 — closes the per-frame mesh-time loop for ADR-018 CSI frames
that carry no per-frame local_us field (the v1 wire format reserves no
slot — see WITNESS-LOG-110 §A0.11).

Math: pair the frame's sequence number against the sync packet's
sequence high-water + an assumed CSI frame rate. Δframes × 1/fps
estimates the node-local delta from the sync, then apply_to_local
recovers the mesh epoch.

  SyncPacket::mesh_aligned_us_for_sequence(frame_seq: u32, fps_hz: f64) -> u64

3 new unit tests (13 total in sync_packet::tests, all green):
  * mesh_aligned_for_sequence_identity_at_sync_point — at sync.sequence
    returns sync.epoch_us exactly
  * mesh_aligned_for_sequence_extrapolates_forward — 20 frames @ 20 fps
    extrapolates by exactly 1 s
  * mesh_aligned_for_sequence_handles_seq_wraparound — u32 sequence
    wrap doesn't jump backward by 2^32 (wrapping_sub guards it)

NodeState hook:
  NodeState::mesh_aligned_us_for_csi_frame(frame_sequence: u32) -> Option<u64>
    Wraps the SyncPacket method, defaults fps_hz=20.0 (matches the
    firmware's CSI_MIN_SEND_INTERVAL_US-implied ceiling), enforces the
    same 9 s staleness gate as mesh_aligned_us.

cargo check -p wifi-densepose-sensing-server --no-default-features → green.
cargo test -p wifi-densepose-hardware sync_packet → 13/13, 122 filtered.

Downstream ADR-029/030 multistatic fusion code can now do:
  if frame.adr018_flags.ieee802154_sync_valid {
      if let Some(mesh_us) = ns.mesh_aligned_us_for_csi_frame(frame.sequence) {
          // pair this frame with frames from sibling nodes by mesh_us
      }
  }

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-23 13:19:06 -04:00
..
aggregator chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
bin fix(hardware): aggregator tolerates sibling RuView UDP packet magics (#517) 2026-05-11 10:48:00 -04:00
esp32 chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
bridge.rs feat(rust): host-side decode for ADR-018 byte 18-19 (ADR-110 closure) 2026-05-22 22:42:49 -04:00
csi_frame.rs feat(rust): host-side decode for ADR-018 byte 18-19 (ADR-110 closure) 2026-05-22 22:42:49 -04:00
error.rs fix(hardware): aggregator tolerates sibling RuView UDP packet magics (#517) 2026-05-11 10:48:00 -04:00
esp32_parser.rs feat(rust): host-side decode for ADR-018 byte 18-19 (ADR-110 closure) 2026-05-22 22:42:49 -04:00
lib.rs feat(hardware): Rust SyncPacket decoder + 7 unit tests (ADR-110 §A0.12) 2026-05-23 13:06:08 -04:00
radio_ops.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
sync_packet.rs feat(adr-110): SyncPacket::mesh_aligned_us_for_sequence (interpolation) + NodeState hook 2026-05-23 13:19:06 -04:00