Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa4927d

Browse files
committed
feat(mat/tracking): add fingerprint re-ID + lib.rs integration (WIP)
- tracking/fingerprint.rs: CsiFingerprint for CSI-based survivor re-ID across signal gaps. Weighted normalized Euclidean distance on breathing rate, breathing amplitude, heartbeat rate, and location hint. EMA update (α=0.3) blends new observations into the fingerprint. - lib.rs: fully integrated tracking bounded context - pub mod tracking added - TrackingEvent added to domain::events re-exports - pub use tracking::{SurvivorTracker, TrackerConfig, TrackId, ...} - DisasterResponse.tracker field + with_defaults() init - tracker()/tracker_mut() public accessors - prelude updated with tracking types Remaining: tracking/tracker.rs (SurvivorTracker aggregate root) https://claude.ai/code/session_0164UZu6rG6gA15HmVyLZAmU
1 parent 01d42ad commit fa4927d

2 files changed

Lines changed: 354 additions & 2 deletions

File tree

rust-port/wifi-densepose-rs/crates/wifi-densepose-mat/src/lib.rs

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ pub mod domain;
8484
pub mod integration;
8585
pub mod localization;
8686
pub mod ml;
87+
pub mod tracking;
8788

8889
// Re-export main types
8990
pub use domain::{
@@ -97,7 +98,7 @@ pub use domain::{
9798
},
9899
triage::{TriageStatus, TriageCalculator},
99100
coordinates::{Coordinates3D, LocationUncertainty, DepthEstimate},
100-
events::{DetectionEvent, AlertEvent, DomainEvent, EventStore, InMemoryEventStore},
101+
events::{DetectionEvent, AlertEvent, DomainEvent, EventStore, InMemoryEventStore, TrackingEvent},
101102
};
102103

103104
pub use detection::{
@@ -141,6 +142,13 @@ pub use ml::{
141142
UncertaintyEstimate, ClassifierOutput,
142143
};
143144

145+
pub use tracking::{
146+
SurvivorTracker, TrackerConfig, TrackId, TrackedSurvivor,
147+
DetectionObservation, AssociationResult,
148+
KalmanState, CsiFingerprint,
149+
TrackState, TrackLifecycle,
150+
};
151+
144152
/// Library version
145153
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
146154

@@ -289,6 +297,7 @@ pub struct DisasterResponse {
289297
alert_dispatcher: AlertDispatcher,
290298
event_store: std::sync::Arc<dyn domain::events::EventStore>,
291299
ensemble_classifier: EnsembleClassifier,
300+
tracker: tracking::SurvivorTracker,
292301
running: std::sync::atomic::AtomicBool,
293302
}
294303

@@ -312,6 +321,7 @@ impl DisasterResponse {
312321
alert_dispatcher,
313322
event_store,
314323
ensemble_classifier,
324+
tracker: tracking::SurvivorTracker::with_defaults(),
315325
running: std::sync::atomic::AtomicBool::new(false),
316326
}
317327
}
@@ -335,6 +345,7 @@ impl DisasterResponse {
335345
alert_dispatcher,
336346
event_store,
337347
ensemble_classifier,
348+
tracker: tracking::SurvivorTracker::with_defaults(),
338349
running: std::sync::atomic::AtomicBool::new(false),
339350
}
340351
}
@@ -372,6 +383,16 @@ impl DisasterResponse {
372383
&self.detection_pipeline
373384
}
374385

386+
/// Get the survivor tracker
387+
pub fn tracker(&self) -> &tracking::SurvivorTracker {
388+
&self.tracker
389+
}
390+
391+
/// Get mutable access to the tracker (for integration in scan_cycle)
392+
pub fn tracker_mut(&mut self) -> &mut tracking::SurvivorTracker {
393+
&mut self.tracker
394+
}
395+
375396
/// Initialize a new disaster event
376397
pub fn initialize_event(
377398
&mut self,
@@ -547,7 +568,7 @@ pub mod prelude {
547568
Coordinates3D, Alert, Priority,
548569
// Event sourcing
549570
DomainEvent, EventStore, InMemoryEventStore,
550-
DetectionEvent, AlertEvent,
571+
DetectionEvent, AlertEvent, TrackingEvent,
551572
// Detection
552573
DetectionPipeline, VitalSignsDetector,
553574
EnsembleClassifier, EnsembleConfig, EnsembleResult,
@@ -559,6 +580,8 @@ pub mod prelude {
559580
MlDetectionConfig, MlDetectionPipeline, MlDetectionResult,
560581
DebrisModel, MaterialType, DebrisClassification,
561582
VitalSignsClassifier, UncertaintyEstimate,
583+
// Tracking
584+
SurvivorTracker, TrackerConfig, TrackId, DetectionObservation, AssociationResult,
562585
};
563586
}
564587

0 commit comments

Comments
 (0)