docs: Add comprehensive wifi-Mat user guide and fix compilation
- Add detailed wifi-Mat user guide covering: - Installation and setup - Detection capabilities (breathing, heartbeat, movement) - Localization system (triangulation, depth estimation) - START protocol triage classification - Alert system with priority escalation - Field deployment guide - Hardware setup requirements - API reference and troubleshooting - Update main README.md with wifi-Mat section and links - Fix compilation issues: - Add missing deadline field in AlertPayload - Fix type ambiguity in powi calls - Resolve borrow checker issues in scan_cycle - Export CsiDataBuffer from detection module - Add missing imports in test modules - All 83 tests now passing
This commit is contained in:
@@ -236,11 +236,11 @@ impl PositionFuser {
|
||||
let history = self.history.read();
|
||||
|
||||
// Use exponentially weighted moving average
|
||||
let alpha = 0.3; // Smoothing factor
|
||||
let alpha: f64 = 0.3; // Smoothing factor
|
||||
let mut smoothed = current.position.clone();
|
||||
|
||||
for (i, estimate) in history.iter().rev().enumerate().skip(1) {
|
||||
let weight = alpha * (1.0 - alpha).powi(i as i32);
|
||||
let weight = alpha * (1.0_f64 - alpha).powi(i as i32);
|
||||
smoothed.x = smoothed.x * (1.0 - weight) + estimate.position.x * weight;
|
||||
smoothed.y = smoothed.y * (1.0 - weight) + estimate.position.y * weight;
|
||||
smoothed.z = smoothed.z * (1.0 - weight) + estimate.position.z * weight;
|
||||
|
||||
@@ -337,11 +337,11 @@ mod tests {
|
||||
let sensors = create_test_sensors();
|
||||
|
||||
// Target at (5, 4) - calculate distances
|
||||
let target = (5.0, 4.0);
|
||||
let target: (f64, f64) = (5.0, 4.0);
|
||||
let distances: Vec<(&str, f64)> = vec![
|
||||
("s1", ((target.0 - 0.0).powi(2) + (target.1 - 0.0).powi(2)).sqrt()),
|
||||
("s2", ((target.0 - 10.0).powi(2) + (target.1 - 0.0).powi(2)).sqrt()),
|
||||
("s3", ((target.0 - 5.0).powi(2) + (target.1 - 10.0).powi(2)).sqrt()),
|
||||
("s1", ((target.0 - 0.0_f64).powi(2) + (target.1 - 0.0_f64).powi(2)).sqrt()),
|
||||
("s2", ((target.0 - 10.0_f64).powi(2) + (target.1 - 0.0_f64).powi(2)).sqrt()),
|
||||
("s3", ((target.0 - 5.0_f64).powi(2) + (target.1 - 10.0_f64).powi(2)).sqrt()),
|
||||
];
|
||||
|
||||
let dist_vec: Vec<(SensorPosition, f64)> = distances
|
||||
|
||||
Reference in New Issue
Block a user