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:
Claude
2026-01-13 17:55:50 +00:00
parent a5044b0b4c
commit cd877f87c2
14 changed files with 1341 additions and 63 deletions

View File

@@ -337,36 +337,43 @@ impl DisasterResponse {
/// Execute a single scan cycle
async fn scan_cycle(&mut self) -> Result<()> {
// Collect detections first to avoid borrowing issues
let mut detections = Vec::new();
{
let event = self.event.as_ref()
.ok_or_else(|| MatError::Domain("No active disaster event".into()))?;
for zone in event.zones() {
if zone.status() != &ZoneStatus::Active {
continue;
}
// This would integrate with actual hardware in production
// For now, we process any available CSI data
let detection_result = self.detection_pipeline.process_zone(zone).await?;
if let Some(vital_signs) = detection_result {
// Attempt localization
let location = self.localization_service
.estimate_position(&vital_signs, zone);
detections.push((zone.id().clone(), vital_signs, location));
}
}
}
// Now process detections with mutable access
let event = self.event.as_mut()
.ok_or_else(|| MatError::Domain("No active disaster event".into()))?;
for zone in event.zones_mut() {
if zone.status() != &ZoneStatus::Active {
continue;
}
for (zone_id, vital_signs, location) in detections {
let survivor = event.record_detection(zone_id, vital_signs, location)?;
// This would integrate with actual hardware in production
// For now, we process any available CSI data
let detection_result = self.detection_pipeline.process_zone(zone).await?;
if let Some(vital_signs) = detection_result {
// Attempt localization
let location = self.localization_service
.estimate_position(&vital_signs, zone)
.ok();
// Create or update survivor
let survivor = event.record_detection(
zone.id().clone(),
vital_signs,
location,
)?;
// Generate alert if needed
if survivor.should_alert() {
let alert = self.alert_dispatcher.generate_alert(&survivor)?;
self.alert_dispatcher.dispatch(alert).await?;
}
// Generate alert if needed
if survivor.should_alert() {
let alert = self.alert_dispatcher.generate_alert(survivor)?;
self.alert_dispatcher.dispatch(alert).await?;
}
}