Team project · UQ Space · 2026
HAVOC-2 firmware and COSMOS ground station
about 540 m, every frame passed
The C++ flight firmware I wrote for UQ Space's HAVOC-2 flight computer, and COSMOS, the ground station I built, which the team runs at launches. On HAVOC-2's first flight, to about 540 m, every logged frame passed its cyclic redundancy check (CRC), and every intact radio frame matched the SD card byte for byte.
- My role
- Lead avionics engineer until November 2026. Developed HAVOC-2's C++ flight firmware (all 24 firmware commits) from June to November 2026, when the team moved to a consolidated flight computer. Built COSMOS; nobody else has committed to it
- Team
- UQ Space avionics team; teammates designed the HAVOC-2 board
- When
- HAVOC-2 firmware Jun – Nov 2026; COSMOS May 2026 – present
- Tools
- C++, Teensy 4.1, RFD900 radio, Python, React, WebSockets, OpenRocket for Monte Carlo ensembles
- Code
- Private: UQ Space team repositories
The full write-up
- The problem
- What I did
- Result
- What went wrong
- Credits
The problem
The team needed a flight computer that logs a rocket's flight and streams it to the ground reliably, and a ground station that shows the flight live and keeps a record that can be checked afterwards.
What I did
HAVOC-2 firmware
- The firmware read an IMU, a high-g accelerometer, a barometer, 2 magnetometers and GPS, logged the IMU at 50 Hz to SD, and streamed CRC-checked packets to the ground over an RFD900 radio.
- After the low velocity estimate on the first flight, I compared 3 replacement designs in replay and chose a complementary filter that blends the barometer with the IMU.
- To keep the flash stall out of flight, I changed the firmware to write flash only on the ground.
- I tracked down the magnetometer short that had hidden the IMU.
COSMOS ground station
- The radio, the flight computer on USB, a GPS tracker and the weather station each get their own Python process, which parses its stream and feeds a React page over WebSockets.
- The page shows flight state, altitude, position and alarms, and speaks flight callouts. The same parser drives a terminal view for launch day.
- Every session goes into a hash-chained log (each entry is tied to the one before, so any change shows) that can be verified and replayed afterwards.
- Operator commands are rate limited, and the ones that change settings need confirmation. The tests run in CI on every push.
Result
- On its first flight, in July 2026, HAVOC-2 flew as the data recorder on a sub-scale rocket that reached about 540 m after an 11.7 g boost.
- On the replayed flight log, the new estimator cut false speed on the pad from a peak of 137 m/s to 0.37 m/s, and with sensor faults injected it never called apogee early.
- At the 2026 Australian Universities Rocket Competition, COSMOS recorded flight computer data from the launch rail and, about 3 hours before launch, ran a 512-run OpenRocket Monte Carlo ensemble from the weather station's pressure and wind to predict the apogee spread and the landing footprint.
What went wrong
- Brownout: HAVOC-2 browned out at ejection on the first flight. Logging resumed, but about 9 s of the descent went unrecorded while it rebooted.
- Low velocity estimate: on the first flight the onboard velocity estimate read about 5 times too low.
- Flash stall: erasing the onboard flash stalled the clock for 225 ms every 5 s.
- Magnetometer short: a shorted magnetometer breakout took down the I2C bus and hid the IMU behind it.
- No flight data yet: the new estimator sat on the launch rail at the 2026 competition, but the rocket broke up 2.8 s into the flight and the nosecone holding the recorders has not been found.
Credits
HAVOC-2's board was designed by teammates in the UQ Space avionics team; the page covers its firmware and the ground station.