GNC Flight Software

Core Functionality

A generic flight software stack for actively stabilized rockets (jet vanes, fin tabs, thrust vector control)

  • Ground station GUI for displaying real-time telemetry and sending commands reliably
  • On-board data logging for higher resolution data and redundancy
  • Filtering and sensor fusion to feed into control algorithms

Task Architecture

The software uses FreeRTOS to handle concurrent tasks and reduce latency, making use of stream buffers to stream telemetry data from an ISR, a mutex to protect the rocket's global state struct from data races, and notifications to control execution of tasks.

  • Transmit: Sends updated rocket state to the ground station in a series of data packets
  • Receive: Receives commands from the radio using a stream buffer
  • Controls: Runs an LQR control algorithm and sends PWM signal to actuators
  • Sensors: Reads sensor data, performing sensor fusion and an Extended Kalman Filter to update rocket state
  • Logger: Records data to the flash chip and copies it to an SD card once landed
Task Architecture Diagram

Hardware Interfaces

  • W25Q Flash - Quad SPI
  • ADIS16500 IMU - SPI
  • LIS3MDL Magnetometer - SPI
  • ZED-F9P-04B GPS - UART
  • XBee Pro S3B Radio - UART
  • Servos - PWM
  • ADCs - DMA

Communication Protocol

  • Packet integrity via CRC-8 checks
  • Frame boundary encoding using COBS (zero-encoded packets)
  • Separated command and dataframe structures (commands include UUID + command ID)
  • Commands require acknowledgments; up to 3 retries on failure

Simulation (Work in progress)

The software is simulated using Renode to allow the firmware to run on a virtual STM32 microcontroller. This setup enables realistic, automated tests without requiring physical hardware.

  • Supports SD card read/write emulation for testing data logging and retrieval
  • Allows injection of synthetic sensor data for edge-case validation
  • Integrates with the Robot Framework for automated unit and regression testing
← Back to all projects