Files
ruvnet--RuView/v2/crates/wifi-densepose-geo/examples/validate.rs
rUv f49c722764 chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427)
The Rust port lived two directories deep (rust-port/wifi-densepose-rs/)
without any sibling under rust-port/ that warranted the extra level.
Move the whole workspace up to v2/ to match v1/ (Python) at the same
depth and shorten every cd / build command across the repo.

git mv preserves history for all tracked files. 60 files updated for
path references (CI workflows, ADRs, docs, scripts, READMEs, internal
.claude-flow state). Two manual fixes for relative-cd paths in
CLAUDE.md and ADR-043 that became wrong after the depth change
(cd ../.. → cd ..).

Validated:
- cargo check --workspace --no-default-features → clean (after target/
  nuke; the gitignored target/ was carried by the OS rename and had
  hard-coded old paths in build scripts)
- cargo test --workspace --no-default-features → 1,539 passed, 0 failed,
  8 ignored (same totals as pre-rename)
- ESP32-S3 on COM7 → still streaming live CSI (cb #40300, RSSI -64 dBm)

After-merge follow-up: contributors should `rm -rf v2/target` once and
let cargo regenerate from the new path.
2026-04-25 21:28:13 -04:00

48 lines
2.2 KiB
Rust

use wifi_densepose_geo::*;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
println!("╔══════════════════════════════════════════════╗");
println!("║ ruview-geo — Real Data Validation ║");
println!("╚══════════════════════════════════════════════╝\n");
let t0 = std::time::Instant::now();
let cache = cache::TileCache::new("/tmp/ruview-geo-validate");
let loc = locate::get_location(&format!("{}/location.json", cache.base_dir.display())).await?;
println!(" Location: {:.4}N, {:.4}W", loc.lat, loc.lon);
let bbox = GeoBBox::from_center(&loc, 300.0);
let tiles_list = tiles::fetch_area(&tiles::TileProvider::Sentinel2Cloudless, &bbox, 16, &cache).await?;
println!(" Tiles: {} ({:.0}KB)", tiles_list.len(),
tiles_list.iter().map(|t| t.data.len()).sum::<usize>() as f64 / 1024.0);
let dem = terrain::fetch_elevation(&loc, &cache).await?;
println!(" Elevation: {:.0}m (grid {}x{})", terrain::elevation_at(&dem, &loc), dem.cols, dem.rows);
let buildings = osm::fetch_buildings(&loc, 300.0).await.unwrap_or_default();
let roads = osm::fetch_roads(&loc, 300.0).await.unwrap_or_default();
println!(" OSM: {} buildings, {} roads", buildings.len(), roads.len());
let weather = temporal::fetch_weather(&loc).await?;
println!(" Weather: {:.0}°C humidity={:.0}% wind={:.1}m/s",
weather.temperature_c, weather.humidity_pct, weather.wind_speed_ms);
let scene = GeoScene {
location: loc.clone(), bbox, elevation_m: terrain::elevation_at(&dem, &loc),
buildings, roads, tile_count: tiles_list.len(),
registration: register::auto_register(&loc),
last_updated: chrono::Utc::now().to_rfc3339(),
};
println!("\n {}", fuse::summarize(&scene));
match brain::store_geo_context(&scene).await {
Ok(n) => println!(" Brain: {} memories stored", n),
Err(e) => println!(" Brain: {e}"),
}
println!("\n Total: {}ms | Cache: {:.0}KB",
t0.elapsed().as_millis(), cache.size_bytes() as f64 / 1024.0);
Ok(())
}