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

Skip to content

Commit 6b20ff0

Browse files
committed
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)
1 parent 8a43e8f commit 6b20ff0

25 files changed

Lines changed: 14452 additions & 60 deletions

File tree

rust-port/wifi-densepose-rs/Cargo.lock

Lines changed: 1209 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-port/wifi-densepose-rs/crates/wifi-densepose-cli/Cargo.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,54 @@ name = "wifi-densepose-cli"
33
version.workspace = true
44
edition.workspace = true
55
description = "CLI for WiFi-DensePose"
6+
authors.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
10+
[[bin]]
11+
name = "wifi-densepose"
12+
path = "src/main.rs"
13+
14+
[features]
15+
default = ["mat"]
16+
mat = []
617

718
[dependencies]
19+
# Internal crates
20+
wifi-densepose-mat = { path = "../wifi-densepose-mat" }
21+
22+
# CLI framework
23+
clap = { version = "4.4", features = ["derive", "env", "cargo"] }
24+
25+
# Output formatting
26+
colored = "2.1"
27+
tabled = { version = "0.15", features = ["ansi"] }
28+
indicatif = "0.17"
29+
console = "0.15"
30+
31+
# Async runtime
32+
tokio = { version = "1.35", features = ["full"] }
33+
34+
# Serialization
35+
serde = { version = "1.0", features = ["derive"] }
36+
serde_json = "1.0"
37+
csv = "1.3"
38+
39+
# Error handling
40+
anyhow = "1.0"
41+
thiserror = "1.0"
42+
43+
# Time
44+
chrono = { version = "0.4", features = ["serde"] }
45+
46+
# UUID
47+
uuid = { version = "1.6", features = ["v4", "serde"] }
48+
49+
# Logging
50+
tracing = "0.1"
51+
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
52+
53+
[dev-dependencies]
54+
assert_cmd = "2.0"
55+
predicates = "3.0"
56+
tempfile = "3.9"
Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
//! WiFi-DensePose CLI (stub)
1+
//! WiFi-DensePose CLI
2+
//!
3+
//! Command-line interface for WiFi-DensePose system, including the
4+
//! Mass Casualty Assessment Tool (MAT) for disaster response.
5+
//!
6+
//! # Features
7+
//!
8+
//! - **mat**: Disaster survivor detection and triage management
9+
//! - **version**: Display version information
10+
//!
11+
//! # Usage
12+
//!
13+
//! ```bash
14+
//! # Start scanning for survivors
15+
//! wifi-densepose mat scan --zone "Building A"
16+
//!
17+
//! # View current scan status
18+
//! wifi-densepose mat status
19+
//!
20+
//! # List detected survivors
21+
//! wifi-densepose mat survivors --sort-by triage
22+
//!
23+
//! # View and manage alerts
24+
//! wifi-densepose mat alerts
25+
//! ```
26+
27+
use clap::{Parser, Subcommand};
28+
29+
pub mod mat;
30+
31+
/// WiFi-DensePose Command Line Interface
32+
#[derive(Parser, Debug)]
33+
#[command(name = "wifi-densepose")]
34+
#[command(author, version, about = "WiFi-based pose estimation and disaster response")]
35+
#[command(propagate_version = true)]
36+
pub struct Cli {
37+
/// Command to execute
38+
#[command(subcommand)]
39+
pub command: Commands,
40+
}
41+
42+
/// Top-level commands
43+
#[derive(Subcommand, Debug)]
44+
pub enum Commands {
45+
/// Mass Casualty Assessment Tool commands
46+
#[command(subcommand)]
47+
Mat(mat::MatCommand),
48+
49+
/// Display version information
50+
Version,
51+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//! WiFi-DensePose CLI Entry Point
2+
//!
3+
//! This is the main entry point for the wifi-densepose command-line tool.
4+
5+
use clap::Parser;
6+
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
7+
8+
use wifi_densepose_cli::{Cli, Commands};
9+
10+
#[tokio::main]
11+
async fn main() -> anyhow::Result<()> {
12+
// Initialize logging
13+
tracing_subscriber::registry()
14+
.with(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")))
15+
.with(tracing_subscriber::fmt::layer().with_target(false))
16+
.init();
17+
18+
let cli = Cli::parse();
19+
20+
match cli.command {
21+
Commands::Mat(mat_cmd) => {
22+
wifi_densepose_cli::mat::execute(mat_cmd).await?;
23+
}
24+
Commands::Version => {
25+
println!("wifi-densepose {}", env!("CARGO_PKG_VERSION"));
26+
println!("MAT module version: {}", wifi_densepose_mat::VERSION);
27+
}
28+
}
29+
30+
Ok(())
31+
}

0 commit comments

Comments
 (0)