Run python demo.py in a terminal — or just wait: a recorded flight will start automatically.
APEX-1 · HOW THIS WORKS
This is the cockpit of APEX-1, a small rocket that flies up and comes back down. The point of the project: while it is in the air, a machine-learning model on the ground predicts where and when it will land — so a recovery team knows where to drive. The sentence under the top bar tells you in plain words what is happening right now; the glowing instruments are the same data, in cockpit style.
The big instruments
The glowing ring in the middle — how high the rocket is right now (the number in metres).
LNDG PRED (right side) — the model's live answer: how long until it lands, its impact speed, and the landing spot. The amber circle on the map is how sure the model is — it shrinks the closer the rocket gets.
TACTICAL MAP (bottom-left) — a top-down map: the white dot is the rocket, the amber reticle is the predicted landing, the amber arrow is the wind.
The gauges (left/right edges) — speed, push-back force, air pressure, temperature.
The charts (bottom) — altitude and speed over the last 30 seconds.
The four modes
● LIVE
LIVE
Real data from the rocket (or its PC simulator).
REPLAY
REPLAY
Playing a captured flight file. This is what the public page shows by default.
DEMO
DEMO
A synthetic flight running entirely in your browser when nothing is connected — its predictions are clearly labeled as estimator output, not the ML model.
● REC
REC
You are capturing whatever is on screen (the button glows red).
Recording a flight
Press ● REC to start saving what you're watching. Press again to stop — your browser downloads the flight as a mission file. Press ▶ PLAY to watch it again. (To publish one for everyone, add the file to web/missions/ in the repository.)
The 3D GLOBE
The GLOBE button opens the 3D view of the same flight — the rocket on a real map, with the model's landing prediction drawn right on it. The two pages read the same data, so they always agree.
Two small conventions
Wind is drawn as an arrow pointing the way it blows toward (the direction it pushes the rocket), not the way it comes from.
The model is trained on 2,000 simulated flights; its confidence (the CONF bar and the amber circle) is measured, not guessed.
One-command demo
The whole show from one terminal: python demo.py starts the vehicle simulator and the ground station together, then opens the 3D globe at http://localhost:8501. (Run it with --no-browser to open either page yourself.)
Technical details
Telemetry: the vehicle (ESP32 firmware or the Python simulator) streams 50 frames/s over UDP to the ground station (gcs.py), which fans them out to the browser over a WebSocket. No frames for 1.5 s → LINK STALE.
Modes on the wire: LIVE = the WebSocket feed; REPLAY = a cursor over web/missions/*.ndjson (one JSON frame per line, played at the recorded 50 Hz, never re-simulated); DEMO = a faithful in-browser re-implementation of the simulator's flight + sensor model; REC captures every frame that reaches handleFrame() and downloads it on stop.
Prediction: LIVE = the GCS's LightGBM model (model/apex1_landing_v2.pkl, trained on 2,000 simulated flights, ~385k test rows held out); REPLAY = predictions baked into the mission file at capture time; DEMO = an in-browser closed-form estimator (same drag law, 0.05 s integration) — the badge says so. MODEL ✓/?/— next to LNDG PRED reflects the one /api/state probe at boot, then flips to — after 2 s pred-less in-flight frames on a live link.
Map: keyless Esri World Imagery tiles (z19, fixed ±45 m window) under a tactical-grid fallback; any tile failure silently degrades to the grid — the MAP tag says which is showing. ATT (pitch) and HDG are synthesized from velocity — honest, labeled SYNTH.
Where data lives: your Downloads (browser records) · missions/ on your PC (tools/record.py) · data/*.csv (the simulator's own ground-truth log) · web/missions/ (what the public site plays).
URL shortcuts: ?demo=1 forces the synthetic demo · ?replay=1 forces replay without a live link.