# ozcelik329/aeropico-fc architecture

> Architecture diagram of the GitHub repository ozcelik329/aeropico-fc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ozcelik329/aeropico-fc
- Repository: https://github.com/ozcelik329/aeropico-fc

## Overview

AeroPico FC is RP2350 fixed-wing flight-controller firmware, with an accompanying desktop configurator. The primary runtime path acquires sensor and SBUS data, estimates vehicle state, and feeds the flight manager’s mode/control and safety decisions before actuator outputs are produced. MAVLink carries telemetry, parameters, and bench-service commands; flash storage preserves settings and calibration. The README documents the main runtime capabilities and relationships; several implementation details are unsampled, so the graph avoids inferring their internal wiring.

Main entry points: [`src/core/flight/FlightManager.cpp`](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/flight/FlightManager.cpp) (Flight Manager), [`src/telemetry/MavlinkHandler.cpp`](https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/MavlinkHandler.cpp) (MAVLink Handler), [`src/core/control/ControlPipeline.cpp`](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/ControlPipeline.cpp) (Control Pipeline), [`src/core/data/SystemBlackboard.cpp`](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/data/SystemBlackboard.cpp) (Typed Blackboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Acquisition and Estimation"]
  node_drivers["Sensor Drivers<br/>[Sensors.cpp]"]
  node_sensorpipe["Sensor Pipeline<br/>[SensorPipeline.cpp]"]
  node_estimators["State Estimators"]
  node_gps["GPS Capability<br/>[GpsManager.cpp]"]
  node_rcdriver["SBUS Receiver<br/>[RX.cpp]"]
  node_rcpipe["RC Pipeline<br/>[RCPipeline.cpp]"]
end

subgraph group_flight["Flight and Safety"]
  node_blackboard["Typed Blackboard"]
  node_flightmanager["Flight Manager<br/>[FlightManager.cpp]"]
  node_control["Control Pipeline"]
  node_flightmode["Flight Modes"]
  node_pid["Cascaded PID<br/>[PID.cpp]"]
  node_mixer["Fixed-Wing Mixer<br/>[FixedWingMixer.cpp]"]
  node_failsafe["Failsafe Policy"]
  node_preflight["Preflight Gates"]
  node_health["Health Monitoring"]
end

subgraph group_comms["Telemetry and Setup"]
  node_mavlink["MAVLink Handler<br/>[MavlinkHandler.cpp]"]
  node_transport["MAVLink Transport<br/>[MavlinkTransport.h]"]
  node_params["Parameter Service<br/>[ParamManager.cpp]"]
  node_services["Bench Commands"]
  node_mailbox["Command Mailbox"]
  node_processor["Command Processor"]
  node_blackbox["Blackbox Logging<br/>[Blackbox.cpp]"]
  node_paramstore[("Parameter Flash<br/>[ParamStorage.cpp]")]
  node_calstore[("Calibration Flash")]
end

subgraph group_platform["Hardware Platform"]
  node_boot["Runtime Setup<br/>[main.cpp]"]
  node_scheduler["Task Scheduler<br/>[Scheduler.cpp]"]
  node_outputs["Servo Outputs<br/>[Output.cpp]"]
end

node_configurator["AeroPico Configurator<br/>[app.js]"]
node_groundstations(("Ground Stations"))
node_servos(("Airframe Servos"))

node_boot -->|"initializes"| node_flightmanager
node_boot -->|"configures tasks"| node_scheduler
node_drivers -.->|"feeds samples"| node_sensorpipe
node_sensorpipe -->|"estimates state"| node_estimators
node_estimators -.->|"publishes state"| node_blackboard
node_rcdriver -.->|"provides input"| node_rcpipe
node_rcpipe -->|"supplies RC state"| node_flightmanager
node_sensorpipe -->|"supplies vehicle state"| node_flightmanager
node_flightmanager -->|"publishes state"| node_blackboard
node_blackboard -.->|"provides typed state"| node_control
node_flightmanager -->|"updates control"| node_control
node_control -->|"delegates modes"| node_flightmode
node_control -.->|"runs cascaded PID"| node_pid
node_pid -.->|"computes actuator demand"| node_mixer
node_flightmanager -->|"evaluates failsafe"| node_failsafe
node_preflight -.->|"checks readiness"| node_health
node_failsafe -.->|"overrides outputs"| node_mixer
node_mixer -.->|"sets servo demand"| node_outputs
node_outputs -.->|"drives"| node_servos
node_groundstations -->|"sends MAVLink"| node_transport
node_transport -.->|"carries messages"| node_mavlink
node_mavlink -->|"returns telemetry"| node_groundstations
node_mavlink -->|"handles parameters"| node_params
node_params -.->|"persists settings"| node_paramstore
node_mavlink -.->|"dispatches commands"| node_services
node_services -->|"queues work"| node_mailbox
node_mailbox -->|"delivers commands"| node_processor
node_processor -->|"uses calibration"| node_calstore
node_configurator -->|"acts as GCS"| node_groundstations
node_flightmanager -.->|"records flight data"| node_blackbox
node_gps -.->|"provides GPS capability"| node_blackboard

click node_boot "https://github.com/ozcelik329/aeropico-fc/blob/main/src/main.cpp"
click node_scheduler "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/scheduling/Scheduler.cpp"
click node_drivers "https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/Sensors.cpp"
click node_sensorpipe "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/sensors/SensorPipeline.cpp"
click node_estimators "https://github.com/ozcelik329/aeropico-fc/tree/main/src/estimators"
click node_gps "https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/gps/GpsManager.cpp"
click node_rcdriver "https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/RX.cpp"
click node_rcpipe "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/rc/RCPipeline.cpp"
click node_blackboard "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/data/SystemBlackboard.cpp"
click node_flightmanager "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/flight/FlightManager.cpp"
click node_control "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/ControlPipeline.cpp"
click node_flightmode "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/FlightModeController.cpp"
click node_pid "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/PID.cpp"
click node_mixer "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/FixedWingMixer.cpp"
click node_failsafe "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/FailsafeManager.cpp"
click node_preflight "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/PreflightRuntime.cpp"
click node_health "https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/PreflightHealth.cpp"
click node_outputs "https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/Output.cpp"
click node_mavlink "https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/MavlinkHandler.cpp"
click node_transport "https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/MavlinkTransport.h"
click node_params "https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/ParamManager.cpp"
click node_services "https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/MavlinkServiceCommands.cpp"
click node_mailbox "https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/ServiceCommandMailbox.h"
click node_processor "https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/ServiceCommandProcessor.cpp"
click node_blackbox "https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/Blackbox.cpp"
click node_paramstore "https://github.com/ozcelik329/aeropico-fc/blob/main/src/storage/ParamStorage.cpp"
click node_calstore "https://github.com/ozcelik329/aeropico-fc/blob/main/src/storage/CalibrationStorage.cpp"
click node_configurator "https://github.com/ozcelik329/aeropico-fc/blob/main/tools/aeropico-configurator/src/renderer/app.js"

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_drivers,node_sensorpipe,node_estimators,node_gps,node_rcdriver,node_rcpipe toneBlue
class node_blackboard,node_flightmanager,node_control,node_flightmode,node_pid,node_mixer,node_failsafe,node_preflight,node_health toneAmber
class node_mavlink,node_transport,node_params,node_services,node_mailbox,node_processor,node_blackbox,node_paramstore,node_calstore toneMint
class node_boot,node_scheduler,node_outputs toneRose
class node_configurator toneTeal
class node_groundstations,node_servos toneIndigo
```

## Components

### Acquisition and Estimation

- [Sensor Drivers](https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/Sensors.cpp): `src/drivers/Sensors.cpp`
- [Sensor Pipeline](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/sensors/SensorPipeline.cpp): `src/core/sensors/SensorPipeline.cpp`
- [State Estimators](https://github.com/ozcelik329/aeropico-fc/tree/main/src/estimators): `src/estimators`
- [GPS Capability](https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/gps/GpsManager.cpp): `src/drivers/gps/GpsManager.cpp`
- [SBUS Receiver](https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/RX.cpp): `src/drivers/RX.cpp`
- [RC Pipeline](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/rc/RCPipeline.cpp): `src/core/rc/RCPipeline.cpp`

### Flight and Safety

- [Typed Blackboard](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/data/SystemBlackboard.cpp): `src/core/data/SystemBlackboard.cpp`
- [Flight Manager](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/flight/FlightManager.cpp): `src/core/flight/FlightManager.cpp`
- [Control Pipeline](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/ControlPipeline.cpp): `src/core/control/ControlPipeline.cpp`
- [Flight Modes](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/FlightModeController.cpp): `src/core/control/FlightModeController.cpp`
- [Cascaded PID](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/PID.cpp): `src/core/control/PID.cpp`
- [Fixed-Wing Mixer](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/control/FixedWingMixer.cpp): `src/core/control/FixedWingMixer.cpp`
- [Failsafe Policy](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/FailsafeManager.cpp): `src/core/safety/FailsafeManager.cpp`
- [Preflight Gates](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/PreflightRuntime.cpp): `src/core/safety/PreflightRuntime.cpp`
- [Health Monitoring](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/safety/PreflightHealth.cpp): `src/core/safety/PreflightHealth.cpp`

### Telemetry and Setup

- [MAVLink Handler](https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/MavlinkHandler.cpp): `src/telemetry/MavlinkHandler.cpp`
- [MAVLink Transport](https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/MavlinkTransport.h): `src/telemetry/MavlinkTransport.h`
- [Parameter Service](https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/ParamManager.cpp): `src/telemetry/ParamManager.cpp`
- [Bench Commands](https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/MavlinkServiceCommands.cpp): `src/app/MavlinkServiceCommands.cpp`
- [Command Mailbox](https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/ServiceCommandMailbox.h): `src/app/ServiceCommandMailbox.h`
- [Command Processor](https://github.com/ozcelik329/aeropico-fc/blob/main/src/app/ServiceCommandProcessor.cpp): `src/app/ServiceCommandProcessor.cpp`
- [Blackbox Logging](https://github.com/ozcelik329/aeropico-fc/blob/main/src/telemetry/Blackbox.cpp): `src/telemetry/Blackbox.cpp`
- [Parameter Flash](https://github.com/ozcelik329/aeropico-fc/blob/main/src/storage/ParamStorage.cpp): `src/storage/ParamStorage.cpp`
- [Calibration Flash](https://github.com/ozcelik329/aeropico-fc/blob/main/src/storage/CalibrationStorage.cpp): `src/storage/CalibrationStorage.cpp`

### Hardware Platform

- [Runtime Setup](https://github.com/ozcelik329/aeropico-fc/blob/main/src/main.cpp): `src/main.cpp`
- [Task Scheduler](https://github.com/ozcelik329/aeropico-fc/blob/main/src/core/scheduling/Scheduler.cpp): `src/core/scheduling/Scheduler.cpp`
- [Servo Outputs](https://github.com/ozcelik329/aeropico-fc/blob/main/src/drivers/Output.cpp): `src/drivers/Output.cpp`

### Other components

- [AeroPico Configurator](https://github.com/ozcelik329/aeropico-fc/blob/main/tools/aeropico-configurator/src/renderer/app.js): `tools/aeropico-configurator/src/renderer/app.js`
- **Ground Stations**
- **Airframe Servos**

## Connections

- Runtime Setup → Flight Manager: initializes (evidence: `src/main.cpp`)
- Runtime Setup → Task Scheduler: configures tasks (evidence: `src/main.cpp`)
- Sensor Drivers → Sensor Pipeline: feeds samples (evidence: `README.md`)
- Sensor Pipeline → State Estimators: estimates state
- State Estimators → Typed Blackboard: publishes state (evidence: `README.md`)
- SBUS Receiver → RC Pipeline: provides input (evidence: `README.md`)
- RC Pipeline → Flight Manager: supplies RC state
- Sensor Pipeline → Flight Manager: supplies vehicle state
- Flight Manager → Typed Blackboard: publishes state
- Typed Blackboard → Control Pipeline: provides typed state (evidence: `README.md`)
- Flight Manager → Control Pipeline: updates control
- Control Pipeline → Flight Modes: delegates modes
- Control Pipeline → Cascaded PID: runs cascaded PID (evidence: `README.md`)
- Cascaded PID → Fixed-Wing Mixer: computes actuator demand (evidence: `README.md`)
- Flight Manager → Failsafe Policy: evaluates failsafe
- Preflight Gates → Health Monitoring: checks readiness (evidence: `README.md`)
- Failsafe Policy → Fixed-Wing Mixer: overrides outputs (evidence: `README.md`)
- Fixed-Wing Mixer → Servo Outputs: sets servo demand (evidence: `README.md`)
- Servo Outputs → Airframe Servos: drives (evidence: `README.md`)
- Ground Stations → MAVLink Transport: sends MAVLink (evidence: `README.md`)
- MAVLink Transport → MAVLink Handler: carries messages (evidence: `README.md`)
- MAVLink Handler → Ground Stations: returns telemetry (evidence: `README.md`)
- MAVLink Handler → Parameter Service: handles parameters (evidence: `src/telemetry/ParamManager.cpp`)
- Parameter Service → Parameter Flash: persists settings (evidence: `README.md`)
- MAVLink Handler → Bench Commands: dispatches commands (evidence: `README.md`)
- Bench Commands → Command Mailbox: queues work
- Command Mailbox → Command Processor: delivers commands
- Command Processor → Calibration Flash: uses calibration
- AeroPico Configurator → Ground Stations: acts as GCS (evidence: `README.md`)
- Flight Manager → Blackbox Logging: records flight data (evidence: `README.md`)
- GPS Capability → Typed Blackboard: provides GPS capability (evidence: `README.md`)
