RN-01 · FLIGHT NAVIGATION COMPUTER FW 1.0.0 · TELEMETRY SCHEMA 1 · 2026

RocketNav

A rocket navigation computer built from first principles — a 16-state error-state Kalman filter on an STM32F7, a hand-written IMU driver, a LoRa telemetry link, and a single-file ground station. No fusion libraries. Every equation is in the repo, and every claim below is tested.

+X SAM-M8Q · GNSS STM32F722 · NAV MCU BME280 · BARO LIS3MDL · MAG ICM-45686 · IMU · 400 Hz ONE I²C BUS · 400 kHz UART TELEMETRY · 921 600 Bd
FIG. 01 — VEHICLE INSTRUMENTATION, SIDE ELEVATION SENSOR FRAMES MAPPED BODY-X OUT THE NOSE
01

The filter

eskf.cpp · 739 lines, no dependencies
Error stateDimUnitsBounded by
δp3mGNSS position · baro (vertical)
δv3m/sGNSS velocity · baro damping
δθ3radgravity when still · mag heading
δbg3rad/saveraged in the alignment window
δba3m/s²observable once anchored
δbb1mGNSS-vs-baro altitude, weather drift

The attitude error lives in the world frame, not the body. That one choice makes heading error exactly the down component of δθ — so the magnetometer structurally cannot corrupt roll or pitch — and it makes the transition matrix exact: F is nilpotent, and Φ = I + Fdt + F²dt²/2 + F³dt³/6 is the full exponential, not a truncation.

Every update is Joseph-form with a χ² gate at 99%, and the baro noise model inflates with speed² and through the transonic — driven by the estimated state, never by flight-phase logic.

Altitude never waits for GNSS. The baro-damped vertical channel runs from the end of alignment, indoors or out; a late fix upgrades to full navigation with the altitude kept continuous.

FIG. 02 — covariance P, block structure Hover a block. Solid diagonal — state variance. Hatched — coupled by the exact transition Φ. Orange frame — written directly by a measurement.
02

Flight sequence

FiltState — the enum, verbatim
FS_0

Init

Power on. The first IMU sample arms the filter and starts the clock.

FS_1

Align

2.5 s of measured stillness. Gravity gives tilt, the mag gives heading, and the averaged gyro rate is the calibration.

FS_2

Wait fix

Attitude and the baro vertical channel run. The first valid GNSS fix anchors the world origin.

FS_3

Run

Full 3-D navigation: position, velocity, attitude, and three bias estimates, output at 50 Hz.

FS_4

Att-only

No fix in 20 s? Fly on attitude + baro altitude. Nothing blocks on the sky.

The branch heals itself: a fix arriving in FS_4 anchors late and upgrades 4 → 3, rebuilding position and re-seeding the baro bias so altitude stays continuous — a late anchor is identical to an on-time one.

03

Ground station

viewer/index.html · one file, no libraries
{"t":"hdr","fw":"1.0.0","sch":1,"imu":1,"mag":1,"bar":1,"gps":1,"iodr":400,"mmode":"cont","gmode":"auto"}
{"t":"msg","txt":"cal: averaging gyro + gravity (hold still)"}
{"t":"cal","bg":[0.4584,-0.6875,0.2865],"eul":[0.11,-0.23,1.5],"alq":1,"dur":3.01}
{"t":"st","fst":3,"lat":40.1164012,"lon":-88.2433975,"alt":223.1,"ral":2.7,"rvs":0.05,"q":[0.9998,0.002,-0.001,0.02],"sp":[0.5,0.5,0.7],"nbr":9.8,"kbr":0, …}
NDJSON · EVERY FIELD DOCUMENTED IN SCHEMA.MD · NOTHING UNDOCUMENTED EMITTED 90-COLUMN CSV EXPORT

USB or LoRa

Pick USB for the rocket's 50 Hz stream or LoRa for the ESP32-C3 base station's 4 Hz bridge — same records, same page. Line-buffered parsing resynchronizes mid-stream.

Live plots

Altitude, rates, biases, innovations and χ² NIS with rejection marks — the filter argues its own health.

3-D attitude

Hand-rolled renderer, orbit camera, your own STL decimated to a closed surface — no wireframes.

Pad-anchored map

Satellite tiles with metric range rings, live track, distance and bearing from the pad.

Session capture

Pause, scroll back, export CSV or raw JSONL. Disconnect and reconnect without a reload.

Visible degradation

Stale badges and dashes, never invented numbers. If a sensor dies, the page says so.

04

Verification

test/eskf_test.cpp · viewer/parse_test.js
ItemMethodResultCall
Filter, six scenarios Native host build, truth simulation: static, mag-off, GPS-less, nose-up gimbal lock, 400 m GPS-less climb 91 / 91GO
Baro latency model 40 m/s steady climb; innovation mean with compensation 0.06 m vs 0.80 mGO
Late-anchor continuity Anchor at 400 m AGL; baro acceptance after bias re-seed 50 / 50 acceptedGO
Stream parser Replay file with torn, malformed and future records 41 / 41GO
Firmware build arduino-cli, GENERIC_F722RETX 145 612 B / 20 072 BGO
LoRa link Bench, 433.5 MHz SF7 / 500 kHz: rocket Ra-02 ⇄ ESP32-C3 base station, 4 Hz downlink with command uplink 0 % loss · 6 / 6 uplinksGO
First flight — awaiting vehicleHOLD
Bench-
verified
Not yet flown