# ianmaddocks/paramoter-audio-flight-computer architecture

> Architecture diagram of the GitHub repository ianmaddocks/paramoter-audio-flight-computer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ianmaddocks/paramoter-audio-flight-computer
- Repository: https://github.com/ianmaddocks/paramoter-audio-flight-computer

## Overview

ParaVario is embedded flight-computer firmware for paramotor pilots. Its main loop samples sensors and handles controls, then updates flight state and guidance; audio, Bluetooth, and the Wi-Fi page expose the resulting cues and information. GPS-dependent features are enabled at runtime, while the microphone supports noise-responsive volume, RPM, and spectrum. The README documents several capabilities whose implementation details were not sampled; those links use README evidence rather than implying source inspection.

Main entry points: [`src/app/App.cpp`](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/app/App.cpp) (Main loop), [`src/comms/WebUi.cpp`](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/WebUi.cpp) (Wi-Fi web UI), [`src/audio/Audio.cpp`](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Audio.cpp) (Audio output), [`src/flight/Flight.cpp`](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Flight.cpp) (Flight state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and state"]
  node_mainloop["Main loop<br/>[App.cpp]"]
end

subgraph group_sensing["Sensors and controls"]
  node_baro["Barometer<br/>[Baro.cpp]"]
  node_gps["GPS receiver<br/>[Gps.cpp]"]
  node_battery["Battery monitor<br/>[Battery.h]"]
  node_microphone["Mic analysis<br/>[Mic.cpp]"]
  node_button["Button input<br/>[Button.cpp]"]
end

subgraph group_flight["Flight functions"]
  node_flightstate["Flight state<br/>[Flight.cpp]"]
  node_wind["Wind estimate<br/>[Wind.cpp]"]
  node_glide["Glide ratio<br/>[Glide.h]"]
  node_approach["Landing approach<br/>[Approach.cpp]"]
  node_emergency["Emergency glide<br/>[Emergency.cpp]"]
  node_announcer["Flight announcements<br/>[Announcer.cpp]"]
  node_igc["IGC logger<br/>[IgcLogger.cpp]"]
end

subgraph group_outputs["Pilot outputs"]
  node_variosound["Vario tone<br/>[VarioSound.cpp]"]
  node_volume["Auto volume<br/>[Volume.cpp]"]
  node_speech["Speech builder<br/>[Speech.cpp]"]
  node_audio["Audio output<br/>[Audio.cpp]"]
  node_ble["Bluetooth feed<br/>[BleFeed.cpp]"]
  node_webui["Wi-Fi web UI<br/>[WebUi.cpp]"]
  node_webpage["Web page<br/>[WebPage.h]"]
end

subgraph group_settings["Configuration"]
  node_settings[("Settings<br/>[Settings.cpp]")]
end

node_pilot(("Pilot"))
node_speaker(("Speaker"))
node_apps(("Flight apps"))
node_phone(("Pilot phone"))

node_pilot -->|"presses"| node_button
node_pilot -->|"views"| node_phone
node_mainloop -->|"reads"| node_baro
node_mainloop -->|"reads"| node_gps
node_mainloop -->|"updates"| node_microphone
node_mainloop -->|"ticks"| node_flightstate
node_mainloop -->|"handles"| node_button
node_mainloop -.->|"samples"| node_battery
node_flightstate -.->|"updates"| node_wind
node_approach -->|"uses"| node_wind
node_mainloop -->|"dispatches"| node_approach
node_mainloop -->|"dispatches"| node_emergency
node_mainloop -.->|"updates"| node_announcer
node_mainloop -.->|"logs flights"| node_igc
node_mainloop -->|"updates"| node_variosound
node_microphone -.->|"provides noise"| node_volume
node_mainloop -->|"updates"| node_volume
node_approach -->|"builds calls"| node_speech
node_announcer -.->|"builds calls"| node_speech
node_speech -->|"queues utterances"| node_audio
node_variosound -.->|"sets tone"| node_audio
node_volume -.->|"sets levels"| node_audio
node_audio -->|"drives"| node_speaker
node_mainloop -->|"updates"| node_ble
node_ble -->|"sends vario data"| node_apps
node_mainloop -->|"updates"| node_webui
node_webui -->|"serves"| node_webpage
node_webpage -->|"requests status and settings"| node_webui
node_phone -->|"connects over Wi-Fi"| node_webui
node_webui -->|"reads spectrum"| node_microphone
node_webui -->|"reads and updates"| node_settings
node_flightstate -.->|"uses configuration"| node_settings

click node_mainloop "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/app/App.cpp"
click node_settings "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/Settings.cpp"
click node_baro "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Baro.cpp"
click node_gps "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Gps.cpp"
click node_battery "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Battery.h"
click node_microphone "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Mic.cpp"
click node_button "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/input/Button.cpp"
click node_flightstate "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Flight.cpp"
click node_wind "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Wind.cpp"
click node_glide "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Glide.h"
click node_approach "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Approach.cpp"
click node_emergency "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Emergency.cpp"
click node_announcer "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Announcer.cpp"
click node_igc "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/logging/IgcLogger.cpp"
click node_variosound "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/app/VarioSound.cpp"
click node_volume "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Volume.cpp"
click node_speech "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Speech.cpp"
click node_audio "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Audio.cpp"
click node_ble "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/BleFeed.cpp"
click node_webui "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/WebUi.cpp"
click node_webpage "https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/WebPage.h"

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_mainloop toneBlue
class node_baro,node_gps,node_battery,node_microphone,node_button toneAmber
class node_flightstate,node_wind,node_glide,node_approach,node_emergency,node_announcer,node_igc toneMint
class node_variosound,node_volume,node_speech,node_audio,node_ble,node_webui,node_webpage toneRose
class node_settings,node_pilot,node_speaker,node_apps,node_phone toneIndigo
```

## Components

### Runtime and state

- [Main loop](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/app/App.cpp): `src/app/App.cpp`

### Sensors and controls

- [Barometer](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Baro.cpp): `src/sensors/Baro.cpp`
- [GPS receiver](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Gps.cpp): `src/sensors/Gps.cpp`
- [Battery monitor](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Battery.h): `src/sensors/Battery.h`
- [Mic analysis](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/sensors/Mic.cpp): `src/sensors/Mic.cpp`
- [Button input](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/input/Button.cpp): `src/input/Button.cpp`

### Flight functions

- [Flight state](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Flight.cpp): `src/flight/Flight.cpp`
- [Wind estimate](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Wind.cpp): `src/flight/Wind.cpp`
- [Glide ratio](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Glide.h): `src/flight/Glide.h`
- [Landing approach](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Approach.cpp): `src/flight/Approach.cpp`
- [Emergency glide](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Emergency.cpp): `src/flight/Emergency.cpp`
- [Flight announcements](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/flight/Announcer.cpp): `src/flight/Announcer.cpp`
- [IGC logger](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/logging/IgcLogger.cpp): `src/logging/IgcLogger.cpp`

### Pilot outputs

- [Vario tone](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/app/VarioSound.cpp): `src/app/VarioSound.cpp`
- [Auto volume](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Volume.cpp): `src/audio/Volume.cpp`
- [Speech builder](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Speech.cpp): `src/audio/Speech.cpp`
- [Audio output](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/audio/Audio.cpp): `src/audio/Audio.cpp`
- [Bluetooth feed](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/BleFeed.cpp): `src/comms/BleFeed.cpp`
- [Wi-Fi web UI](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/WebUi.cpp): `src/comms/WebUi.cpp`
- [Web page](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/comms/WebPage.h): `src/comms/WebPage.h`

### Configuration

- [Settings](https://github.com/ianmaddocks/paramoter-audio-flight-computer/blob/main/src/Settings.cpp): `src/Settings.cpp`

### Other components

- **Pilot**
- **Speaker**
- **Flight apps**
- **Pilot phone**

## Connections

- Pilot → Button input: presses (evidence: `README.md`)
- Pilot → Pilot phone: views (evidence: `README.md`)
- Main loop → Barometer: reads (evidence: `src/app/App.cpp`)
- Main loop → GPS receiver: reads (evidence: `src/app/App.cpp`)
- Main loop → Mic analysis: updates (evidence: `src/app/App.cpp`)
- Main loop → Flight state: ticks (evidence: `README.md`)
- Main loop → Button input: handles (evidence: `src/app/App.cpp`)
- Main loop → Battery monitor: samples
- Flight state → Wind estimate: updates
- Landing approach → Wind estimate: uses (evidence: `src/flight/Approach.cpp`)
- Main loop → Landing approach: dispatches (evidence: `src/app/App.cpp`)
- Main loop → Emergency glide: dispatches (evidence: `src/app/App.cpp`)
- Main loop → Flight announcements: updates
- Main loop → IGC logger: logs flights
- Main loop → Vario tone: updates (evidence: `src/app/App.cpp`)
- Mic analysis → Auto volume: provides noise
- Main loop → Auto volume: updates (evidence: `src/app/App.cpp`)
- Landing approach → Speech builder: builds calls (evidence: `src/flight/Approach.cpp`)
- Flight announcements → Speech builder: builds calls
- Speech builder → Audio output: queues utterances
- Vario tone → Audio output: sets tone
- Auto volume → Audio output: sets levels
- Audio output → Speaker: drives (evidence: `README.md`)
- Main loop → Bluetooth feed: updates (evidence: `src/app/App.cpp`)
- Bluetooth feed → Flight apps: sends vario data (evidence: `README.md`)
- Main loop → Wi-Fi web UI: updates (evidence: `src/app/App.cpp`)
- Wi-Fi web UI → Web page: serves (evidence: `src/comms/WebUi.cpp`)
- Web page → Wi-Fi web UI: requests status and settings (evidence: `src/comms/WebPage.h`)
- Pilot phone → Wi-Fi web UI: connects over Wi-Fi (evidence: `README.md`)
- Wi-Fi web UI → Mic analysis: reads spectrum (evidence: `src/comms/WebUi.cpp`)
- Wi-Fi web UI → Settings: reads and updates (evidence: `src/comms/WebUi.cpp`)
- Flight state → Settings: uses configuration
