Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
798a3a5
put everything in folders
MuhammadAli8209 Jun 27, 2026
2d0782e
fixes for hilsim
MuhammadAli8209 Jun 27, 2026
6f52b7d
finite-state-machine documentation
MuhammadAli8209 Jun 27, 2026
60d464f
pass fsm sim builds
MuhammadAli8209 Jun 27, 2026
b6d7888
telemetry comments added
wanbings Jun 27, 2026
5810853
Merge pull request #217 from ISSUIUC/telemetry-docs
wanbings Jun 27, 2026
cf68f1e
shell folder
wanbings Jun 28, 2026
ca9a619
Merge pull request #218 from ISSUIUC/shell
wanbings Jun 28, 2026
8306b5f
hardware docs
MuhammadAli8209 Jul 2, 2026
3469c61
Merge pull request #219 from ISSUIUC/hardware_docs
MuhammadAli8209 Jul 2, 2026
a319efe
logging docs
MuhammadAli8209 Jul 2, 2026
3d1c780
build fix
MuhammadAli8209 Jul 2, 2026
def3955
Merge pull request #220 from ISSUIUC/logging_docs
MuhammadAli8209 Jul 2, 2026
5715521
adding some comments on rocket_state.h
mpark108 Jul 2, 2026
1305dc2
adding some comments on sensor_data.h
mpark108 Jul 2, 2026
cbcb6cf
making slight modifications to systems.h comments
mpark108 Jul 2, 2026
dc1c274
commenting through GPS thread in systems.cpp
mpark108 Jul 2, 2026
27dc54f
finishing comments for threads
mpark108 Jul 22, 2026
c56add9
finishing documenting systems.cpp!
mpark108 Jul 22, 2026
a5eab74
Merge pull request #221 from ISSUIUC/docs/flight_systems_docs
mpark108 Jul 22, 2026
bc1ac59
making some changes due to requested changes
mpark108 Aug 13, 2026
b1f5165
making changes on systems.cpp
mpark108 Aug 13, 2026
12b30fa
removing the unnecessary modifications to readme
mpark108 Aug 13, 2026
e1eb189
removing very unnecessary pyro comments
mpark108 Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
297 changes: 281 additions & 16 deletions MIDAS/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,288 @@
# MIDAS Flight Code

## Getting Started
Flight software for the **MIDAS** avionics board. This repository contains the firmware, simulation environments, hardware drivers, telemetry, logging, and testing infrastructure used throughout development.

To being, clone this whole repository onto your computer somewhere.
Documentation:
- Muhammad Ali (2026)
- Melody Parker (2026)
- Jennifer Luo (2026)
---

// todo explain how to install/use platformio
// todo have both VSCode and CLion sections
# Table of Contents

### Command Line
If you want to run SILSIM, you'll need `gcc` to be available on your path.
On Linux/macOS, `gcc` should be preinstalled.
On Windows, you'll need to install the newest version of MinGW-w64 and add it's
`\bin` directory to your PATH environment variable.
* [Overview](#overview)
* [Project Structure](#project-structure)
* [Requirements](#requirements)
* [Getting Started](#getting-started)
* [Building the Project](#building-the-project)
* [Running SILSIM](#running-silsim)
* [Uploading to Hardware](#uploading-to-hardware)
* [Testing](#testing)
* [Development](#development)
* [Future Documentation](#future-documentation)

To flash flight code to the MIDAS board using the command line, run
`pio run -e mcu_main -t upload`. To just build flight code for MIDAS without
actually uploading it (to make sure it compiles), use `pio run -e mcu_main`.
Note that if you never directly installed platformio and instead are just using
the VSCode extension, these commands won't work until you install platformio
manually.
---

To run SILSIM from the command line, use `pio run -e mcu_silsim`.
# Overview

The MIDAS flight code is built using:

* **PlatformIO**
* **ESP32**
* **C++17**
* **FreeRTOS**

The repository contains everything needed to build, simulate, test, and deploy the rocket flight software.

The software is organized into independent modules such as the flight state machine, guidance/navigation, hardware drivers, telemetry, logging, and simulation.

---

# Project Structure

```
MIDAS/
├── lib/ # External and custom driver libraries
├── src/
│ ├── flight-systems/ # Main system initialization
│ ├── finite-state-machines/ # Flight state machines
│ ├── gnc/ # Guidance, Navigation & Control
│ ├── hardware/ # Hardware interfaces
│ ├── hilsim/ # Hardware-In-The-Loop simulation
│ ├── silsim/ # Software-In-The-Loop simulation
│ ├── telemetry/ # Telemetry systems
│ ├── logging/ # Data logging
│ ├── util/ # Utility files that help
│ └── ...
├── test/ # Test programs and previous flight data
├── tools/ # Tools to help unload midas flight data (log_enc.py)
├── platformio.ini # PlatformIO configuration
└── README.md
```

Additional modules will be documented individually as development progresses.

---

# Requirements

Before building the project, install:

* PlatformIO
* Git
* C++ compiler

For **SILSIM**, a native compiler is also required.

### Linux / macOS

`gcc` is typically already installed.

### Windows

Install the latest version of **MinGW-w64** and add its `bin` directory to your system `PATH`.
Comment thread
MelodyParker marked this conversation as resolved.
Outdated

---

# Getting Started

Clone the repository:

```bash
git clone https://github.com/ISSUIUC/MIDAS-Software.git
cd MIDAS
```

More setup instructions will be added for:

* VSCode
* PlatformIO installation

---

# Building the Project

## Build Flight Code

Compile the firmware without uploading:

```bash
pio run -e mcu_main
```

This verifies that the project builds successfully.

---

# Uploading to Hardware

Flash the firmware to the MIDAS board:

```bash
pio run -e mcu_main -t upload
```

Make sure the board is connected before uploading.

---

# Running SILSIM

To build and execute the Software-In-The-Loop simulator:

```bash
pio run -e mcu_silsim
```

SILSIM allows flight code to be tested without physical hardware.

> More documentation describing simulation inputs, outputs, and workflows will be added later.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

silsim is insanely outdated and does not do anything with the current midas software so I don't think its useful to document how to run it until we having a working version in this repo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


---

# Testing

The `test/` directory contains:

* Previous flight datasets
* Test programs
* Validation utilities

Future documentation will include:

* Running unit tests
* Regression testing
* Flight replay testing
* Hardware validation

---

# Development

The project is divided into several major subsystems.

## Flight State Machines

Responsible for rocket state transitions throughout flight.

Future documentation:

* State diagrams
* Transition conditions
* Recovery logic

---

## Guidance, Navigation & Control (GNC)

Contains the vehicle estimation and control algorithms.

Future documentation:

* Sensor fusion
* Filtering
* Apogee detection
* Velocity estimation

---

## Hardware

Interfaces for onboard peripherals including sensors and communication devices.

Future documentation:

* Sensor drivers
* EEPROM
* SD card
* Radios
* Buzzer
* LEDs

---

## Telemetry

Handles communication between the flight computer and the ground station.

Future documentation:

* Packet formats
* Message types
* Protocol documentation

---

## Logging

Responsible for onboard data recording.

Future documentation:

* Log format
* Storage layout
* Replay tools

---

## SILSIM

Software-In-The-Loop simulator used during development.

Future documentation:

* Flight replay
* Sensor injection
* Configuration
* Debugging

---

## HILSIM

Hardware-In-The-Loop testing framework.

Future documentation:

* Hardware setup
* Test workflow
* Communication protocol

---

# Coding Style

Documentation for coding conventions, formatting, and contribution guidelines will be added in the future.

---

# Future Documentation

Planned additions include:

* PlatformIO installation guide
* VSCode setup
* CLion setup
* Project architecture
* State machine documentation
* Sensor documentation
* Telemetry protocol
* Logging format
* Build environments
* Flashing multiple boards
* Debugging with PlatformIO
* Simulation guide
* Contribution guidelines
* Continuous Integration (CI)
* Flight data analysis

---

# License

*To be added.*
2 changes: 1 addition & 1 deletion MIDAS/lib/MS5611/MS5611.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void MS5611::reset() {
digitalWrite(_cspin, HIGH); // pull CS line high
SPI.endTransaction(); // end SPI transaction
}
#include"../../src/hal.h"
#include"../../src/util/hal.h"
void MS5611::convert(const uint8_t addr, uint8_t bits) {
uint8_t del[5] = {1, 2, 3, 5,
10}; // array of MS5611 conversion time (in ms)
Expand Down
Loading
Loading