feat: Add wifi-Mat disaster detection enhancements

Implement 6 optional enhancements for the wifi-Mat module:

1. Hardware Integration (csi_receiver.rs + hardware_adapter.rs)
   - ESP32 CSI support via serial/UDP
   - Intel 5300 BFEE file parsing
   - Atheros CSI Tool integration
   - Live UDP packet streaming
   - PCAP replay capability

2. CLI Commands (wifi-densepose-cli/src/mat.rs)
   - `wifi-mat scan` - Run disaster detection scan
   - `wifi-mat status` - Check event status
   - `wifi-mat zones` - Manage scan zones
   - `wifi-mat survivors` - List detected survivors
   - `wifi-mat alerts` - View and acknowledge alerts
   - `wifi-mat export` - Export data in various formats

3. REST API (wifi-densepose-mat/src/api/)
   - Full CRUD for disaster events
   - Zone management endpoints
   - Survivor and alert queries
   - WebSocket streaming for real-time updates
   - Comprehensive DTOs and error handling

4. WASM Build (wifi-densepose-wasm/src/mat.rs)
   - Browser-based disaster dashboard
   - Real-time survivor tracking
   - Zone visualization
   - Alert management
   - JavaScript API bindings

5. Detection Benchmarks (benches/detection_bench.rs)
   - Single survivor detection
   - Multi-survivor detection
   - Full pipeline benchmarks
   - Signal processing benchmarks
   - Hardware adapter benchmarks

6. ML Models for Debris Penetration (ml/)
   - DebrisModel for material analysis
   - VitalSignsClassifier for triage
   - FFT-based feature extraction
   - Bandpass filtering
   - Monte Carlo dropout for uncertainty

All 134 unit tests pass. Compilation verified for:
- wifi-densepose-mat
- wifi-densepose-cli
- wifi-densepose-wasm (with mat feature)
This commit is contained in:
Claude
2026-01-13 18:23:03 +00:00
parent 8a43e8f355
commit 6b20ff0c14
25 changed files with 14452 additions and 60 deletions

View File

@@ -3,5 +3,54 @@ name = "wifi-densepose-cli"
version.workspace = true
edition.workspace = true
description = "CLI for WiFi-DensePose"
authors.workspace = true
license.workspace = true
repository.workspace = true
[[bin]]
name = "wifi-densepose"
path = "src/main.rs"
[features]
default = ["mat"]
mat = []
[dependencies]
# Internal crates
wifi-densepose-mat = { path = "../wifi-densepose-mat" }
# CLI framework
clap = { version = "4.4", features = ["derive", "env", "cargo"] }
# Output formatting
colored = "2.1"
tabled = { version = "0.15", features = ["ansi"] }
indicatif = "0.17"
console = "0.15"
# Async runtime
tokio = { version = "1.35", features = ["full"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
csv = "1.3"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Time
chrono = { version = "0.4", features = ["serde"] }
# UUID
uuid = { version = "1.6", features = ["v4", "serde"] }
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
tempfile = "3.9"

View File

@@ -1 +1,51 @@
//! WiFi-DensePose CLI (stub)
//! WiFi-DensePose CLI
//!
//! Command-line interface for WiFi-DensePose system, including the
//! Mass Casualty Assessment Tool (MAT) for disaster response.
//!
//! # Features
//!
//! - **mat**: Disaster survivor detection and triage management
//! - **version**: Display version information
//!
//! # Usage
//!
//! ```bash
//! # Start scanning for survivors
//! wifi-densepose mat scan --zone "Building A"
//!
//! # View current scan status
//! wifi-densepose mat status
//!
//! # List detected survivors
//! wifi-densepose mat survivors --sort-by triage
//!
//! # View and manage alerts
//! wifi-densepose mat alerts
//! ```
use clap::{Parser, Subcommand};
pub mod mat;
/// WiFi-DensePose Command Line Interface
#[derive(Parser, Debug)]
#[command(name = "wifi-densepose")]
#[command(author, version, about = "WiFi-based pose estimation and disaster response")]
#[command(propagate_version = true)]
pub struct Cli {
/// Command to execute
#[command(subcommand)]
pub command: Commands,
}
/// Top-level commands
#[derive(Subcommand, Debug)]
pub enum Commands {
/// Mass Casualty Assessment Tool commands
#[command(subcommand)]
Mat(mat::MatCommand),
/// Display version information
Version,
}

View File

@@ -0,0 +1,31 @@
//! WiFi-DensePose CLI Entry Point
//!
//! This is the main entry point for the wifi-densepose command-line tool.
use clap::Parser;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
use wifi_densepose_cli::{Cli, Commands};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Initialize logging
tracing_subscriber::registry()
.with(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")))
.with(tracing_subscriber::fmt::layer().with_target(false))
.init();
let cli = Cli::parse();
match cli.command {
Commands::Mat(mat_cmd) => {
wifi_densepose_cli::mat::execute(mat_cmd).await?;
}
Commands::Version => {
println!("wifi-densepose {}", env!("CARGO_PKG_VERSION"));
println!("MAT module version: {}", wifi_densepose_mat::VERSION);
}
}
Ok(())
}

File diff suppressed because it is too large Load Diff