Skip to content

Core avionics package for all CURE on-rocket flight computers, including the MARTHA program

License

Notifications You must be signed in to change notification settings

CURocketEngineering/Avionics

Repository files navigation

Avionics for Clemson University Rocket Engineering

Avionics is a modular, Arduino-core based system powering the flight computers of Clemson University Rocket Engineering. Designed for high reliability and efficiency, it supports real-time state estimation, data logging, and robust communication across multiple rockets.

Table of Contents

Introduction

This repository contains the avionics system used across various flight computers within the Clemson University Rocket Engineering organization. Designed to be modular and highly configurable, the system supports critical functions such as state detection, data logging, and robust communication.

Project Goals

  • Deliver a reusable avionics toolbox that can be utilized across multiple rocket platforms.
  • Prioritize flight safety through redundant sensing, conservative state transitions, and explicit error handling.
  • Maintain traceable telemetry and post-flight data for analysis and certification.
  • Enable rapid iteration with simulation hooks, configurable command interfaces, and host-side unit testing.

Architecture Overview

  • State estimation: Launch/apogee detection, burnout/landing state machines, and vertical velocity filtering to gate deployment logic.
  • Data handling: SPI flash/SD logging, serial streaming, and documented Byte5 binary format for efficient on-vehicle storage (see docs/FlashDataSaving.md).
  • Communication: UART command handler for runtime configuration, telemetry, and debugging without reflashing firmware.
  • Power and platform: Power management utilities plus HAL abstractions to keep sensor/MCU specifics isolated from flight logic.
  • Simulation: Serial-driven sensor simulators (e.g., LSM6DSOX, LIS3MDL, BMP390) to inject prerecorded data for hardware-in-the-loop testing.

Flight Tests

See a comprehensive list of all flights using this software at 🚀Flight Tests🚀.

Features

State Detection Tools

  • Launch Detection:
    The Launch Detector uses a rolling median of acceleration data to accurately detect launches. It is highly configurable to accommodate different launch profiles and includes stringent data rate and error-handling mechanisms.

  • Vertical Velocity Estimation:
    The Vertical Velocity Estimator employs a 1D Kalman filter to estimate vertical velocity from acceleration and altitude data.

  • Apogee Detection:
    The Apogee Detector utilizes the vertical velocity estimator to detect when the rocket begins to fall. Also checks if the altitude has dropped by a certain threshold from the highest recorded altitude.

  • Apogee Prediction:
    The Apogee Predictor utilizes the vertical velocity estimator to predict the time until apogee and the maximum altitude.

Data Logging

  • SPI Embedded Flash-based Logging:
    DataSaverSPI logs sensor data directly to any W25 SPI flash chip. Each sensor logs data at its own rate using the "Byte5" format, which is optimized for space efficiency while allowing for unordered data. Data is stored in a circular buffer until post-launch mode is activated.

  • SPI SD Card-based Logging:
    DataSaverBigSD logs data to a large capacity SD card. Data is saved in a stream with less regard for space efficiency. Saves data in a stream format rather than a CSV.

  • Serial-based Logging:
    DataSaverSDSerial provides an alternative logging mechanism by streaming binary data to a serial interface. Although less space-efficient than "Byte5", it is designed for applications with large SD cards. Refer to the Serial-Logger-Decoding repository for decoding instructions.

Communication

  • Serial Command Handler:
    The UARTCommandHandler offers a fully configurable command interface for runtime configuration, debugging, and data retrieval, using function pointers for flexibility.

Dependent Systems

The following systems integrate Avionics as a submodule:

Documentation

  • Doxygen: run doxygen Doxyfile from the repository root. HTML output is placed in build/doxygen/index.html (README is used as the main page).
  • High-level notes: data logging constraints and Byte5 format are summarized in docs/FlashDataSaving.md.
  • Flight history: see docs/FlightTests.md for vehicles and dates that have flown with this codebase.

Unit Testing

Unit tests are managed by the Native repository, allowing for module testing without requiring embedded hardware.

License

This project is licensed under the MIT License. Please review the LICENSE file for complete details.

About

Core avionics package for all CURE on-rocket flight computers, including the MARTHA program

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 14