# inavflight/inav architecture

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

- Interactive diagram: https://gitdiagram.com/inavflight/inav
- Repository: https://github.com/inavflight/inav
- Video tour (about a minute): https://gitdiagram.com/inavflight/inav/video

## Overview

INAV is embedded flight-controller firmware for multirotors, fixed-wing aircraft, and other vehicles. A pilot configures a controller and selects a flight mode; during flight, sensor and positioning inputs support stabilization and navigation, whose outputs are mixed for vehicle actuators. The README also identifies OSD, logging, telemetry, and programmable logic as product capabilities. Those subsystems are documented but their implementation paths and wiring are not present in the supplied tree, so they use the supported enclosing path `src/main` and only documented relationships are shown. USB mass-storage details are grounded in sampled source; other internal wiring was not inspected.

Main entry points: [`src/main`](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main) (Navigation), [`src/main/msc/usbd_storage_sd_spi.c`](https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_sd_spi.c) (USB Mass Storage), [`lib/main/MAVLink/common/mavlink_msg_storage_information.h`](https://github.com/inavflight/inav/blob/maintenance-10.x/lib/main/MAVLink/common/mavlink_msg_storage_information.h) (MAVLink Messages), [`src/main/msc/usbd_storage_emfat.c`](https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_emfat.c) (Flash Disk Image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight Control"]
  node_modes["Flight Modes"]
  node_navigation["Navigation"]
  node_stabilization["Flight Stabilization"]
  node_mixer["Configurable Mixer"]
  node_actuators["Vehicle Actuators"]
  node_logic["Logic And Functions"]
end

subgraph group_sensors["Sensing And Navigation"]
  node_sensors_in["Sensor Inputs"]
  node_gps["GPS Positioning"]
  node_altitude["Altitude Sensing"]
end

subgraph group_interfaces["Pilot And Display"]
  node_config["Flight Configuration"]
  node_osd["On-screen Display"]
  node_telemetry["Telemetry"]
  node_mavlink["MAVLink Messages"]
  node_gimbal_msg["Gimbal Control Message"]
end

subgraph group_storage["Logging And Storage"]
  node_blackbox["Blackbox Recorder"]
  node_usb_host(("USB Host"))
  node_msc["USB Mass Storage"]
  node_sdcard[("SD Card")]
  node_emfat["Flash Disk Image"]
  node_flashfs[("Flash Filesystem")]
end

node_pilot(("Pilot"))

node_pilot -->|"configures"| node_config
node_pilot -->|"selects"| node_modes
node_sensors_in -->|"provides measurements"| node_stabilization
node_gps -->|"provides position"| node_navigation
node_altitude -->|"provides altitude"| node_navigation
node_modes -->|"selects behavior"| node_stabilization
node_navigation -->|"guides control"| node_mixer
node_stabilization -->|"provides control"| node_mixer
node_mixer -->|"drives outputs"| node_actuators
node_sensors_in -->|"supplies display data"| node_osd
node_navigation -->|"supplies status"| node_osd
node_sensors_in -->|"records flight data"| node_blackbox
node_navigation -->|"records navigation"| node_blackbox
node_pilot -->|"receives telemetry"| node_telemetry
node_telemetry -.->|"encodes messages"| node_mavlink
node_pilot -.->|"exchanges messages"| node_mavlink
node_mavlink -.->|"includes dialect message"| node_gimbal_msg
node_usb_host -->|"requests block access"| node_msc
node_msc -->|"reads and writes blocks"| node_sdcard
node_msc -->|"serves flash disk"| node_emfat
node_emfat -->|"reads flash files"| node_flashfs

click node_config "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_modes "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_sensors_in "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_gps "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_altitude "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_navigation "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_stabilization "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_mixer "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_osd "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_telemetry "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_logic "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_blackbox "https://github.com/inavflight/inav/tree/maintenance-10.x/src/main"
click node_msc "https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_sd_spi.c"
click node_emfat "https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_emfat.c"
click node_mavlink "https://github.com/inavflight/inav/blob/maintenance-10.x/lib/main/MAVLink/common/mavlink_msg_storage_information.h"
click node_gimbal_msg "https://github.com/inavflight/inav/blob/maintenance-10.x/lib/main/MAVLink/storm32/mavlink_msg_storm32_gimbal_manager_control.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_modes,node_navigation,node_stabilization,node_mixer,node_actuators,node_logic toneBlue
class node_sensors_in,node_gps,node_altitude toneAmber
class node_config,node_osd,node_telemetry,node_mavlink,node_gimbal_msg toneMint
class node_blackbox,node_usb_host,node_msc,node_sdcard,node_emfat,node_flashfs toneRose
class node_pilot toneIndigo
```

## Components

### Flight Control

- [Flight Modes](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [Navigation](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [Flight Stabilization](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [Configurable Mixer](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- **Vehicle Actuators**
- [Logic And Functions](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`

### Sensing And Navigation

- [Sensor Inputs](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [GPS Positioning](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [Altitude Sensing](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`

### Pilot And Display

- [Flight Configuration](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [On-screen Display](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [Telemetry](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- [MAVLink Messages](https://github.com/inavflight/inav/blob/maintenance-10.x/lib/main/MAVLink/common/mavlink_msg_storage_information.h): `lib/main/MAVLink/common/mavlink_msg_storage_information.h`
- [Gimbal Control Message](https://github.com/inavflight/inav/blob/maintenance-10.x/lib/main/MAVLink/storm32/mavlink_msg_storm32_gimbal_manager_control.h): `lib/main/MAVLink/storm32/mavlink_msg_storm32_gimbal_manager_control.h`

### Logging And Storage

- [Blackbox Recorder](https://github.com/inavflight/inav/tree/maintenance-10.x/src/main): `src/main`
- **USB Host**
- [USB Mass Storage](https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_sd_spi.c): `src/main/msc/usbd_storage_sd_spi.c`
- **SD Card**
- [Flash Disk Image](https://github.com/inavflight/inav/blob/maintenance-10.x/src/main/msc/usbd_storage_emfat.c): `src/main/msc/usbd_storage_emfat.c`
- **Flash Filesystem**

### Other components

- **Pilot**

## Connections

- Pilot → Flight Configuration: configures
- Pilot → Flight Modes: selects
- Sensor Inputs → Flight Stabilization: provides measurements
- GPS Positioning → Navigation: provides position
- Altitude Sensing → Navigation: provides altitude
- Flight Modes → Flight Stabilization: selects behavior
- Navigation → Configurable Mixer: guides control
- Flight Stabilization → Configurable Mixer: provides control
- Configurable Mixer → Vehicle Actuators: drives outputs
- Sensor Inputs → On-screen Display: supplies display data
- Navigation → On-screen Display: supplies status
- Sensor Inputs → Blackbox Recorder: records flight data
- Navigation → Blackbox Recorder: records navigation
- Pilot → Telemetry: receives telemetry
- Telemetry → MAVLink Messages: encodes messages
- Pilot → MAVLink Messages: exchanges messages
- MAVLink Messages → Gimbal Control Message: includes dialect message
- USB Host → USB Mass Storage: requests block access
- USB Mass Storage → SD Card: reads and writes blocks
- USB Mass Storage → Flash Disk Image: serves flash disk
- Flash Disk Image → Flash Filesystem: reads flash files
