# issuiuc/midas-software architecture

> Architecture diagram of the GitHub repository issuiuc/midas-software, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/issuiuc/midas-software
- Repository: https://github.com/issuiuc/midas-software

## Overview

MIDAS-Software is the Illinois Space Society’s rocket-avionics software: flight firmware gathers sensor data, runs flight-state and guidance logic, and supports actuation, logging, and telemetry. Ground-station software receives radio telemetry and exposes it to consumers while supporting command traffic; separate utilities simulate flight and retrieve onboard logs. The tree and excerpts support the main entry points and several subsystem capabilities, but not every internal call among flight modules, so those links are left out.

Main entry points: [`MIDAS/src/systems.cpp`](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/systems.cpp) (Flight systems), [`ground/gss_combiner/main.py`](https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/main.py) (Telemetry combiner), [`MIDAS/src/silsim/main.cpp`](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/main.cpp) (Simulation entry), [`ground/src/feather/main.cpp`](https://github.com/issuiuc/midas-software/blob/main/ground/src/feather/main.cpp) (LoRa ground radio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight avionics"]
  node_flight_main["Flight startup<br/>[main.cpp]"]
  node_systems["Flight systems<br/>[systems.cpp]"]
  node_sensor_drivers["Sensor drivers"]
  node_sensor_data["Sensor data<br/>[sensor_data.h]"]
  node_fsm["Flight state logic<br/>[fsm.cpp]"]
  node_gnc["Guidance filters"]
  node_pyro["Pyro control<br/>[Pyro.cpp]"]
  node_sdlog[("Flight log sink<br/>[SDLog.cpp]")]
  node_telemetry["Telemetry packet<br/>[telemetry.cpp]"]
end

subgraph group_ground["Ground telemetry"]
  node_radio["LoRa ground radio<br/>[main.cpp]"]
  node_duo_radio["Dual-radio station<br/>[main.cpp]"]
  node_combiner["Telemetry combiner<br/>[main.py]"]
  node_serial_threads["Radio telemetry threads<br/>[mqtt.py]"]
  node_mqtt["MQTT transport<br/>[mqtt.py]"]
end

subgraph group_simulation["Flight simulation"]
  node_sim_entry["Simulation entry<br/>[main.cpp]"]
  node_flight_sim["Rocket simulation<br/>[simulation.cpp]"]
  node_sim_sensors["Emulated sensors"]
  node_sim_sink[("Simulation log sink<br/>[FileSink.cpp]")]
  node_hilsim_stream["HIL serial stream<br/>[main.cpp]"]
end

subgraph group_tools["Log access"]
  node_emmc["eMMC log utility<br/>[main.cpp]"]
end

node_rocket(("Rocket sensors"))
node_serial_gui(("Ground serial client"))
node_consumer(("Telemetry consumers"))
node_onboard_log[("Onboard log files")]

node_rocket -->|"provides readings"| node_sensor_drivers
node_flight_main -->|"starts systems"| node_systems
node_systems -->|"maintains state"| node_sensor_data
node_systems -->|"runs state logic"| node_fsm
node_systems -->|"runs filters"| node_gnc
node_systems -->|"controls pyros"| node_pyro
node_systems -->|"writes flight logs"| node_sdlog
node_systems -->|"produces telemetry"| node_telemetry
node_sensor_drivers -->|"fills readings"| node_sensor_data
node_telemetry -->|"radio packets"| node_radio
node_radio -->|"prints serial data"| node_serial_gui
node_serial_gui -->|"sends commands"| node_radio
node_duo_radio -->|"prints telemetry"| node_consumer
node_combiner -->|"creates threads"| node_serial_threads
node_combiner -->|"creates transport"| node_mqtt
node_serial_threads -->|"forwards packets"| node_combiner
node_combiner -->|"broadcasts telemetry"| node_consumer
node_consumer -->|"submits commands"| node_combiner
node_sim_entry -->|"steps simulation"| node_flight_sim
node_sim_entry -->|"attaches sensors"| node_sim_sensors
node_sim_entry -->|"starts flight logic"| node_systems
node_systems -->|"writes simulated logs"| node_sim_sink
node_hilsim_stream -.->|"serial protocol"| node_serial_gui
node_onboard_log -->|"reads selected log"| node_emmc
node_emmc -->|"streams log bytes"| node_serial_gui

click node_flight_main "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/main.cpp"
click node_systems "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/systems.cpp"
click node_sensor_drivers "https://github.com/issuiuc/midas-software/tree/main/MIDAS/src/hardware"
click node_sensor_data "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/sensor_data.h"
click node_fsm "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/finite-state-machines/fsm.cpp"
click node_gnc "https://github.com/issuiuc/midas-software/tree/main/MIDAS/src/gnc"
click node_pyro "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/Pyro.cpp"
click node_sdlog "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/SDLog.cpp"
click node_telemetry "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/telemetry.cpp"
click node_radio "https://github.com/issuiuc/midas-software/blob/main/ground/src/feather/main.cpp"
click node_duo_radio "https://github.com/issuiuc/midas-software/blob/main/ground/src/feather_duo/main.cpp"
click node_combiner "https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/main.py"
click node_serial_threads "https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/util/mqtt.py"
click node_mqtt "https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/util/mqtt.py"
click node_sim_entry "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/main.cpp"
click node_flight_sim "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/simulation/simulation.cpp"
click node_sim_sensors "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/emulated_sensors.cpp"
click node_sim_sink "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/FileSink.cpp"
click node_hilsim_stream "https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hilsim/stream/main.cpp"
click node_emmc "https://github.com/issuiuc/midas-software/blob/main/eMMC/src/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_flight_main,node_systems,node_sensor_drivers,node_sensor_data,node_fsm,node_gnc,node_pyro,node_sdlog,node_telemetry,node_serial_gui toneBlue
class node_radio,node_duo_radio,node_combiner,node_serial_threads,node_mqtt,node_onboard_log toneAmber
class node_sim_entry,node_flight_sim,node_sim_sensors,node_sim_sink,node_hilsim_stream toneMint
class node_emmc toneRose
class node_rocket,node_consumer toneIndigo
```

## Components

### Flight avionics

- [Flight startup](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/main.cpp): `MIDAS/src/hardware/main.cpp`
- [Flight systems](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/systems.cpp): `MIDAS/src/systems.cpp`
- [Sensor drivers](https://github.com/issuiuc/midas-software/tree/main/MIDAS/src/hardware): `MIDAS/src/hardware`
- [Sensor data](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/sensor_data.h): `MIDAS/src/sensor_data.h`
- [Flight state logic](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/finite-state-machines/fsm.cpp): `MIDAS/src/finite-state-machines/fsm.cpp`
- [Guidance filters](https://github.com/issuiuc/midas-software/tree/main/MIDAS/src/gnc): `MIDAS/src/gnc`
- [Pyro control](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/Pyro.cpp): `MIDAS/src/hardware/Pyro.cpp`
- [Flight log sink](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hardware/SDLog.cpp): `MIDAS/src/hardware/SDLog.cpp`
- [Telemetry packet](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/telemetry.cpp): `MIDAS/src/telemetry.cpp`

### Ground telemetry

- [LoRa ground radio](https://github.com/issuiuc/midas-software/blob/main/ground/src/feather/main.cpp): `ground/src/feather/main.cpp`
- [Dual-radio station](https://github.com/issuiuc/midas-software/blob/main/ground/src/feather_duo/main.cpp): `ground/src/feather_duo/main.cpp`
- [Telemetry combiner](https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/main.py): `ground/gss_combiner/main.py`
- [Radio telemetry threads](https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/util/mqtt.py): `ground/gss_combiner/util/mqtt.py`
- [MQTT transport](https://github.com/issuiuc/midas-software/blob/main/ground/gss_combiner/util/mqtt.py): `ground/gss_combiner/util/mqtt.py`

### Flight simulation

- [Simulation entry](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/main.cpp): `MIDAS/src/silsim/main.cpp`
- [Rocket simulation](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/simulation/simulation.cpp): `MIDAS/src/silsim/simulation/simulation.cpp`
- [Emulated sensors](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/emulated_sensors.cpp): `MIDAS/src/silsim/emulated_sensors.cpp`
- [Simulation log sink](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/silsim/FileSink.cpp): `MIDAS/src/silsim/FileSink.cpp`
- [HIL serial stream](https://github.com/issuiuc/midas-software/blob/main/MIDAS/src/hilsim/stream/main.cpp): `MIDAS/src/hilsim/stream/main.cpp`

### Log access

- [eMMC log utility](https://github.com/issuiuc/midas-software/blob/main/eMMC/src/main.cpp): `eMMC/src/main.cpp`

### Other components

- **Rocket sensors**
- **Ground serial client**
- **Telemetry consumers**
- **Onboard log files**

## Connections

- Rocket sensors → Sensor drivers: provides readings
- Flight startup → Flight systems: starts systems
- Flight systems → Sensor data: maintains state
- Flight systems → Flight state logic: runs state logic
- Flight systems → Guidance filters: runs filters
- Flight systems → Pyro control: controls pyros
- Flight systems → Flight log sink: writes flight logs
- Flight systems → Telemetry packet: produces telemetry
- Sensor drivers → Sensor data: fills readings
- Telemetry packet → LoRa ground radio: radio packets
- LoRa ground radio → Ground serial client: prints serial data
- Ground serial client → LoRa ground radio: sends commands
- Dual-radio station → Telemetry consumers: prints telemetry
- Telemetry combiner → Radio telemetry threads: creates threads
- Telemetry combiner → MQTT transport: creates transport
- Radio telemetry threads → Telemetry combiner: forwards packets
- Telemetry combiner → Telemetry consumers: broadcasts telemetry
- Telemetry consumers → Telemetry combiner: submits commands
- Simulation entry → Rocket simulation: steps simulation
- Simulation entry → Emulated sensors: attaches sensors
- Simulation entry → Flight systems: starts flight logic
- Flight systems → Simulation log sink: writes simulated logs
- HIL serial stream → Ground serial client: serial protocol
- Onboard log files → eMMC log utility: reads selected log
- eMMC log utility → Ground serial client: streams log bytes
