Documentation - Terrapin-Rocket-Team/SRAD-Avionics GitHub Wiki

Home/Documentation

TODO:

  • Rework organization to further separate out general "Code" from specifically "FC Code".

Documentation

This is the documentation for the SRAD Avionics platform. It is intended to be a comprehensive guide to the systems and tools we use to develop our avionics systems. This includes the flight computer, ground station, and any other systems we develop.

General Overview

There are two main folders in the repository. The "Spaceport" folder contains the files that relate to the competition. The "Side Projects" folder contains projects that people have started but are either not ready for or not related to the competition. This page is split up by "project" so-to-speak, with the hardware and software components under each project's heading.

Flight Computer:

The flight computer is the brain of the avionics system. It is responsible for collecting data from the sensors, logging that data, and transmitting it to the ground station.

Code Structure:

The flight computer code is written in C++ and is compiled using PlatformIO. It can be found under Spaceport/23-24/Code/Teensy-based Avionics/.

There are a number of main and auxiliary files that combine to make the flight computer work. main.cpp is the entry point. It establishes the sensors and initializes everything. Every 100ms (10hz), it makes a call to the State object to update itself. State represents, perhaps unsurprisingly, the state of the rocket. It knows what stage it's in, where it is, and how fast it's going. As it updates itself with new data from the sensors, it logs that data to the SD card. Every two seconds, main sends the latest update to the ground station via radio.

All sensor implementations, main, and State are stored in the src folder.

The lib folder contains some libraries used in the project, both custom written and third-party.

  • RecordData - A mostly custom library for recording data to the SD card.
  • RadioHead - A third-party library for transmitting data over the radio.
  • KalmanFilter - A library written by Abhi Senthilkumar and Avi Komarlingam for implementing Kalman filtering.

The include folder contains the header files for the sensor interfaces.

The test folder contains tests for the sensors, but needs work.

src/StateTest contains code related to testing the state estimation system.

Hardware:

Most of the PCB and CAD files are located in the PCB and CAD folders, respectively.

Flight Computer

The flight computer is the brain of the avionics system. It is responsible for collecting data from the sensors, logging that data, and transmitting it to the ground station.

Code:

You can see our current implementation of each sensor by following the links to their interfaces. See also Avionics Equipment.

Look here for information about how to run code on the flight computer.

Hardware:

Files are located at Spaceport/23-24/PCBs/Unified Board. The other files are no longer in use. (see Master Board)

  • Unified Board - Our custom-designed and -built PCB that the Flight computer and sensors are mounted to.
  • Teensy 4.1 - Our flight computer of choice. A highly capable Arduino-based board.
  • STM32 - Our in-progress Teensy replacement.

Ground Station

The ground station is the interface between the flight computer and the user. It is responsible for receiving data from the flight computer, and displaying it on a nice UI. It uses an Arduino to receive data and passes that data to a computer via serial. See Ground Station for more information.

  • Arduino Uno - The microcontroller currently used in the ground station.

Live Video Streaming

We are currently working on implementing live video streaming from the rocket to the ground station. This will be done using a Raspberry Pi and a camera module. See Live Video Streaming for more information.