Files
overwatch/simulation/latest_goal.md
thebadking b3608ecfd7
Some checks failed
AERIS-10 CI / Python Lint + Tests (push) Has been cancelled
AERIS-10 CI / MCU Firmware Tests (push) Has been cancelled
AERIS-10 CI / FPGA Regression (push) Has been cancelled
AERIS-10 CI / Cross-Layer Contract Tests (push) Has been cancelled
Rename the simulator to Overwatch and organize the repository for presentation.
The operator interface now uses that name. The radar design, parts list, and simulation sit in separate directories, and the earlier simulator and project license are removed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 06:04:46 +00:00

10 KiB
Raw Blame History

Active development goal — Overwatch

Updated 2026-10-03. Implementation goal completed and verified in the workspace. Codex owns development after the user stopped the previous agent. Prior working-tree edits were preserved and reviewed; the baseline audit remains in physics_auditing_review_and_gaps.md.

Objective

Improve numerical correctness, flight-model choices, measurement-based estimation, event/lifecycle accounting, runtime isolation and visualization. Use real physical models where data is available and declare engineering approximations elsewhere. The implementation does not claim calibrated real-vehicle defensive effectiveness.

Selected Python modules

Module Integrated purpose Selection
SciPy >=1.14 Independent DOP853 trajectory/event reference, attitude/frame conversions, confidence intervals Required
Stone Soup >=1.6,<2 Covariance-aware radar position tracking; bearing-only IR EKF Required
RotorPy >=2.1,<2.2 Attitude, rotor aerodynamics, motor lag and ground-enabled Crazyflie reference dynamics Optional flight extra; explicit profile
JSBSim >=1.2,<2 Headless, explicitly named aircraft dynamics; SI/NED boundary and normalized open-loop controls Optional flight extra; custom aircraft conditions
pymap3d >=3,<4 JSBSim geographic/local NED conversion Optional flight extra
Numba >=0.60 Verified reduced-model hot path acceleration Optional performance extra

Official sources: SciPy, Stone Soup, RotorPy, JSBSim.

Nexus remains a reference checkout. MPC is outside this implementation. RotorPy uses the tested 2.1 ODE API to avoid process-global motor-noise RNG draws. Reference aircraft/rotor parameters are illustrative until calibrated for the user's vehicles.

Implemented work

  • [done] First-contact swept geometry; compare all contact/ground candidates globally; ground wins ties; consumed collision participants cannot hit subsequent threats. Terminal truth and trajectory endpoints match events.
  • [done] Ground-supported idle defenders; avoid dormant dynamics and off-cadence navigation work. Reduced actuator decay evolves at physics cadence; realized bounded velocity determines displacement. Guidance requests bounded thrust instead of overwriting attacker velocity.
  • [done] Standard-atmosphere lapse-rate layers through 86 km geometric altitude; finite configuration/state checks. High-altitude profiles remain reduced models without reentry heating or Mach-dependent aerodynamics.
  • [done] Radar dwell evaluates all targets before advancing; absolute scan phase avoids accumulated tick rounding. Noisy geometry drives covariance; raw Doppler is not interpreted as a complete velocity.
  • [done] Stone Soup timestamped radar tracking, stale/duplicate rejection, covariance and explicit multiple-sample velocity-evidence gate. Forecasting uses declared constant velocity, age-propagated estimates and no hidden aircraft parameters or true wind.
  • [done] Exactly three nearest available defenders ranked by 3D distance to the finite future estimated segment. Necessary reachability checks account for sample age, command delay and travel time and report infeasibility. Delivered commands alone initiate motion; retransmission/release and replan lifecycle is implemented.
  • [done] Navigation samples are queued until ready; processing delay is incurred once; old telemetry cannot overwrite newer data; remote positions propagate using received velocity; remote age is computed from current simulation time.
  • [done] Optional RotorPy Crazyflie and JSBSim aircraft adapters exposed through scenario/server/frontend configuration. Hover, frame conversion, normalized controls and headless SI motion tested.
  • [done] Distance-based altitude reference with airborne start: quintic default, cubic or exponential options. Smoothstep reaches the requested altitude at L; actual flight remains force/vehicle limited. Automatic L has a 500 m floor and 20% nominal peak climb-rate margin; manual L and exponential k are exposed and recorded.
  • [done] Delayed rear-facing bearing-only IR with FOV, lock/acquisition/loss and radar-prior EKF correction. It requests bounded reference corrections, without truth-coordinate guidance or guaranteed contact.
  • [done] Protected-region entry and protected/safe ground-impact outcomes. Monte Carlo records every projectile and separates unresolved cutoffs; finite statistics include resolved counts and Wilson intervals. Multiple correlated threats pooled across a run are descriptive.
  • [done] Socket-owned runs; stop/disconnect cancels only that connection. Full-history event cursor prevents replay after 250; cooperative compute batches keep commands responsive. Output capped at 20 Hz independently of physics.
  • [done] Frontend distinct truth/sample/estimate/inferred-path colors, radar detection lighting, vehicle/ascent selectors and visible altitude exaggeration. Actual trajectories retain 1,800 samples at 0.2 s; radar history retains 600 samples.
  • [done] Final verification: 63 tests passed; strict-JSON CLI/scenario checks, frontend typecheck/build and diff whitespace checks passed.

Validation and performance

Use .venv/bin/python -m pytest -q -p no:cacheprovider, CLI smoke .venv/bin/python -m defense_sim.cli --steps 300 --seed 7, and pnpm typecheck / pnpm build in frontend/.

Final complete regression run: 63 passed in 8.11 s. This includes first-contact/ground ties, consumed-drone multi-threat ordering, scan phase, delayed bearing-only IR, strict JSON for mature tracks, all ascent curves and independent connection/event-cursor checks. CLI strict-JSON smoke passed. Frontend type checking and production build passed; existing Vue Macros warnings about UI library type resolution remain. The later operator-feedback follow-up includes an authenticated browser check on the served app.

Warm benchmark: seed 7, reduced Shahed-238 example, no wind, 24 mostly idle defenders, 3,000 steps: 30 simulated seconds in 4.218 wall seconds (7.11x real time). This is a throughput measurement for this machine/configuration, not a certified speedup ratio or a benchmark of 24 airborne RotorPy vehicles.

Deliberate boundaries and future calibration

Reduced default drones remain kinematic surrogates; their display-yaw rate is not a full maneuverability model. Select RotorPy for coupled rotor/attitude dynamics and provide calibrated airframe parameters before interpreting physical performance. JSBSim requires a suitable aircraft definition and trim/control configuration; C172 reference motion does not validate named threat presets. Flat terrain, straight swept segments, shared Dryden-inspired gusts, ideal target association, illustrative radar/IR performance and ideal attitude observations remain declared approximations. Command receipt is known to the simulator; a separately lossy ACK return channel is not implemented. Exponential guidance begins with nonzero slope; smoothstep's reference endpoint does not guarantee physical attainment of altitude. Automatic L screens nominal climb rate, not the full acceleration envelope.

Coordinate contract: SI and NED/FRD at simulator boundaries. Simulator clock is fixed-step. Live physics is paced at 1× elapsed wall time; offline execution is unpaced. Contact-as-neutralization consumes both entities and omits blast, damage and debris. Calibration, broader stochastic error-distribution studies and hardware evidence are future work rather than implied by passing software tests.

Operator feedback follow-up (2026-10-03)

Implemented absolute monotonic 1× live pacing, persistent screen-sized radar evidence, longer faint attacker traces, visible attacker forecasts after velocity evidence, first-detection standby launch through the modeled radio, frontend standby altitude (150 m default) and early-takeoff toggle, and distinct dashed drone intentions versus actual trails. Standby is independent of the later feasible three-drone assignment. Intention preview is a delivered command reference, not a physical prediction. Grounded drones do not launch before an alert packet arrives.

Regression verification: 70 tests passed, including monotonic pacing with transport cost, first-detection launch before velocity evidence, configurable/disabled standby, total packet loss, late standby supersession, persistent trails and non-mutating intention previews. Frontend type checking passed.

Live deployment verification: production frontend rebuilt and backend restarted. Authenticated demo-account browser regression passed on the configured site: measured live rate 1.008× across 6.31 simulated seconds, custom 30 m standby setting preserved, four airborne defenders, four retained radar samples, a mature attacker forecast and both drone path types. Screenshot: /tmp/defense-standby-scene.png. A seeded default-layout probe launched all 24 drones from 30.08 s; by 50 s every drone was airborne at about 92–94 m while the later assignment remained infeasible. The dashboard also distinguishes airborne count from tasked count.

Final served-UI recheck after adding the airborne count passed: measured 0.997× across 9.94 simulated seconds; frontend-controlled 30 m standby, four airborne drones, persistent radar evidence, attacker forecast and drone paths verified. Altitude exaggeration was exercised for the inspection screenshot without changing physics. Frontend typecheck and production build passed again after the display change.

Radar GUI and tracking follow-up — 2026-10-03

Implemented the PLFM radar console port: Radar List with per-site central-report status and explicit USB placeholders; Python-backed V6 demo, scene evidence and bundled synthetic I/Q replay; Vue heatmap, A-Scope, spectrum, settings, diagnostics, bounded recording and config/data export. NumPy/SciPy handle replay and host display diagnostics; Stone Soup now uses polar/radial-Doppler EKF updates with Joseph covariance and innovation rejection. Raw scatter remains visible. Displayed forecasts shorten according to uncertainty instead of projecting noisy velocity for 600 seconds. Hardware transport and calibrated raw DSP remain future adapter work.

Validation: 91 Python regressions, frontend typecheck and production build passed; authenticated served-browser checks passed for list/site selection, radar views, start/stop, recording and CSV replay. See the port document for source provenance and physical limits.