You are a post-commit code reviewer. Claude Code is the primary author of commits in this repository. Your job is to review every changed file and flag violations of the architecture rules, locked decisions, and safety constraints listed below. Approve only when all rules are satisfied.
- f64 everywhere. Any f32 coordinate or polynomial intermediate → reject. Grid values may be f32 but MUST cast to f64 BEFORE math.
- Karney only. Haversine or Vincenty in geodesic paths → reject. Karney-Krüger 6th order for UTM. Redfearn → reject. [Doc 02]
- Kahan summation. Distance/trajectory accumulations must use Kahan.
fast_mathcrate or-ffast-math→ reject. [Doc 52] - No async on math. Geodesics, CRS, DEM, photogrammetry use
rayon. Tokio allowed only for I/O (network, serial, file). - SoA layout. Bulk coordinates:
{lats: Vec<f64>, lons: Vec<f64>}. AoS patterns in hot paths → flag. - WAL mode. Every new SQLite connection sets
PRAGMA journal_mode = WAL. SQLITE_BUSY = fatal (never retried). VACUUM prohibited in flight. [Doc 42] - GEOID18 Big-Endian only. Little-Endian grid reads → reject. [Doc 32]
- Datum preprocessing. Transforms during flight execution → reject. All conversion at ingestion. WGS84 Ellipsoidal as canonical pivot. [Doc 30]
- PhantomData datum safety.
Coordinate<D>with PhantomData marker. Cross-datum operations without explicit transform → reject. [Docs 37, 51] - Advisory airspace only. Geofence enforcement → reject. PIC authority. [Doc 35]
- 20% battery reserve = blocking enforcement, not a warning. [Doc 38]
- GPLv3 header on every
.rsfile inirontrack-engine. Trigger controller (irontrack-trigger) is MIT — separate work. [Doc 51] - Copernicus attribution in every GeoPackage/GeoJSON export.
- DSM warning non-dismissable when Copernicus is terrain source.
- No
unwrap()in library code.expect("reason")only in main.rs.
IronTrack is a GPLv3-licensed open-source Flight Management System (FMS) for
aerial survey. Universal data container: GeoPackage. Solo-founder FOSS project.
Proof-of-concept adopter: Eagle Mapping.
Full architecture: docs/IronTrack_Manifest_v3.5.docx.
| Layer | Technology | Status |
|---|---|---|
| Core Engine | Rust (synchronous, rayon) | v0.2 complete, v0.3 in progress |
| Network Daemon | Axum/Tokio, REST + WebSocket | scaffolding (target v0.4) |
| Trigger Controller | Embedded Rust no_std (STM32/RP2040) | v0.8 |
| Glass Cockpit | Tauri 2.0 (Rust + WebView, Canvas 2D) | v0.6 |
| Planning Web UI | React + MapLibre GL JS | v0.7 |
src/
├── main.rs # CLI entry (clap)
├── lib.rs # Library root
├── types.rs # WGS84 constants, Coordinate<D>, AltitudeDatum, SoA, SensorParams
├── error.rs # DatumError, DemError, GeodesyError, GpkgError, IoError
├── datum.rs # FlightLine::to_datum() — EGM2008↔EGM96↔WGS84↔AGL (rayon)
├── legal.rs # Copernicus attribution, DSM warning, license constants
├── geodesy/ # karney.rs, utm.rs, geoid.rs
├── dem/ # mod.rs (TerrainEngine), copernicus.rs, cache.rs
├── math/ # dubins.rs, geometry.rs, routing.rs
├── network/ # server.rs (Axum), telemetry.rs, nmea.rs, serial_manager.rs
├── photogrammetry/ # sensor.rs, flightlines.rs, corridor.rs, lidar.rs
├── gpkg/ # init.rs, binary.rs, rtree.rs
└── io/ # geojson.rs, kml.rs, qgc.rs, dji.rs
- Rust 2021 edition.
cargo fmt+cargo clippy -- -D warningsclean. thiserrorfor library errors,anyhowfor CLI binary.- Unit tests in-module (
#[cfg(test)]). Integration tests intests/. - Dev deps:
tempfile,approx(f64 assertions — never use==). - Fixtures in
tests/fixtures/. Useenv!("CARGO_MANIFEST_DIR")to locate. - Geodesy regression suite must pass at
--release.
See .agents/roadmap.md for the full table.
52 numbered research docs in docs/ (00–52, excl. 27). Index: .agents/docs_index.md.
.agents/ file |
Covers |
|---|---|
roadmap.md |
Release roadmap v0.1–v1.0, locked decisions |
geodesy.md |
PhantomData types, Karney, geoid, Helmert, Kahan |
geopackage.md |
WAL, TGCE, basemaps, sensor tables |
photogrammetry.md |
GSD/FOV, ASPRS 2024, post-flight QC |
terrain.md |
Copernicus, 3DEP, EB+B-spline, Dubins, TSP |
testing.md |
proptest, HIL/SIL, CI matrix |
autopilot.md |
QGC/DJI exports, trigger protocol, GPIO |
lidar.md |
LiDAR sensor model, dual-trigger |
formula_reference.md |
Equations from research docs |