# skripsi-fixedwing/flightcontroller-edrones architecture

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

- Interactive diagram: https://gitdiagram.com/skripsi-fixedwing/flightcontroller-edrones
- Repository: https://github.com/skripsi-fixedwing/flightcontroller-edrones

## Overview

KHAGESWARA-FC-2026 is fixed-wing autopilot firmware. The principal workflow is scheduled sensor acquisition, state estimation, guidance and energy/attitude control, then vehicle actuation, with MAVLink and persistent configuration supporting flight operations. The excerpts establish the firmware entry point and several subsystem interfaces; many implementation files were not sampled and there is no README, so unverified runtime links are omitted rather than inferred from imports alone.

Main entry points: [`src/main.cpp`](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/main.cpp) (Firmware entry), [`include/modes/VehicleContext.h`](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/include/modes/VehicleContext.h) (Vehicle context), [`src/control/AttitudeController.cpp`](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/control/AttitudeController.cpp) (Attitude control), [`src/drivers/Imu.cpp`](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Imu.cpp) (IMU driver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Flight Integration"]
  node_main["Firmware entry<br/>[main.cpp]"]
  node_context["Vehicle context<br/>[VehicleContext.h]"]
  node_modes["Fixed-wing modes<br/>[FixedWingModes.cpp]"]
end

subgraph group_sensing["Sensors and Estimation"]
  node_imu["IMU driver<br/>[Imu.cpp]"]
  node_barometer["Barometer<br/>[Barometer.cpp]"]
  node_airspeed["Airspeed<br/>[Airspeed.cpp]"]
  node_gnss["GNSS receivers"]
  node_ahrs["AHRS<br/>[Ahrs.cpp]"]
  node_altitude["Altitude filter"]
  node_mahony["Mahony filter"]
end

subgraph group_flight["Guidance and Control"]
  node_navigation["Navigation<br/>[Navigation.cpp]"]
  node_l1["L1 guidance<br/>[L1Controller.cpp]"]
  node_fuzzy["L1 tuner<br/>[FuzzyL1Tuner.cpp]"]
  node_tecs["TECS<br/>[Tecs.cpp]"]
  node_attitude["Attitude control"]
  node_lqr["LQR axis control"]
end

subgraph group_vehicle["Vehicle I/O"]
  node_actuator["Actuators<br/>[Actuator.cpp]"]
  node_radio["Radio input<br/>[Radio.cpp]"]
  node_battery["Battery monitor<br/>[Battery.cpp]"]
end

subgraph group_support["Telemetry and Persistence"]
  node_mavlink["MAVLink<br/>[Mavlink.cpp]"]
  node_datalogger["Data logger<br/>[DataLogger.cpp]"]
  node_sdlogger["SD logger<br/>[SdLogger.cpp]"]
  node_params[("Parameters<br/>[Params.cpp]")]
  node_waypoints[("Waypoints<br/>[Waypoints.cpp]")]
  node_imu_cal[("IMU calibration store")]
end

node_pilot(("Pilot / GCS"))

node_main -->|"constructs"| node_l1
node_main -->|"starts"| node_fuzzy
node_main -->|"constructs"| node_tecs
node_main -->|"constructs"| node_navigation
node_main -->|"constructs"| node_attitude
node_context -->|"holds reference"| node_attitude
node_context -->|"holds reference"| node_imu
node_context -->|"holds reference"| node_ahrs
node_context -->|"holds reference"| node_navigation
node_context -->|"holds reference"| node_tecs
node_attitude -->|"delegates axis control"| node_lqr
node_imu -->|"persists offsets"| node_imu_cal
node_pilot -.->|"sends controls"| node_radio
node_pilot -.->|"sends commands"| node_mavlink

click node_main "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/main.cpp"
click node_context "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/include/modes/VehicleContext.h"
click node_modes "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/modes/FixedWingModes.cpp"
click node_imu "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Imu.cpp"
click node_barometer "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Barometer.cpp"
click node_airspeed "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Airspeed.cpp"
click node_gnss "https://github.com/skripsi-fixedwing/flightcontroller-edrones/tree/master/include/drivers"
click node_ahrs "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/Ahrs.cpp"
click node_altitude "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/AltitudeComplementaryFilter.cpp"
click node_mahony "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/AttitudeMahonyFilter.cpp"
click node_navigation "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/Navigation.cpp"
click node_l1 "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/L1Controller.cpp"
click node_fuzzy "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/FuzzyL1Tuner.cpp"
click node_tecs "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/Tecs.cpp"
click node_attitude "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/control/AttitudeController.cpp"
click node_lqr "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/control/LqrAxisController.cpp"
click node_actuator "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Actuator.cpp"
click node_radio "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Radio.cpp"
click node_battery "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Battery.cpp"
click node_mavlink "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/Mavlink.cpp"
click node_datalogger "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/DataLogger.cpp"
click node_sdlogger "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/SdLogger.cpp"
click node_params "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/Params.cpp"
click node_waypoints "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/Waypoints.cpp"
click node_imu_cal "https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/ImuCalibrationStorage.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_main,node_context,node_modes toneBlue
class node_imu,node_barometer,node_airspeed,node_gnss,node_ahrs,node_altitude,node_mahony toneAmber
class node_navigation,node_l1,node_fuzzy,node_tecs,node_attitude,node_lqr toneMint
class node_actuator,node_radio,node_battery toneRose
class node_mavlink,node_datalogger,node_sdlogger,node_params,node_waypoints,node_imu_cal,node_pilot toneIndigo
```

## Components

### Flight Integration

- [Firmware entry](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/main.cpp): `src/main.cpp`
- [Vehicle context](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/include/modes/VehicleContext.h): `include/modes/VehicleContext.h`
- [Fixed-wing modes](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/modes/FixedWingModes.cpp): `src/modes/FixedWingModes.cpp`

### Sensors and Estimation

- [IMU driver](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Imu.cpp): `src/drivers/Imu.cpp`
- [Barometer](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Barometer.cpp): `src/drivers/Barometer.cpp`
- [Airspeed](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/drivers/Airspeed.cpp): `src/drivers/Airspeed.cpp`
- [GNSS receivers](https://github.com/skripsi-fixedwing/flightcontroller-edrones/tree/master/include/drivers): `include/drivers`
- [AHRS](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/Ahrs.cpp): `src/estimation/Ahrs.cpp`
- [Altitude filter](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/AltitudeComplementaryFilter.cpp): `src/estimation/AltitudeComplementaryFilter.cpp`
- [Mahony filter](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/estimation/AttitudeMahonyFilter.cpp): `src/estimation/AttitudeMahonyFilter.cpp`

### Guidance and Control

- [Navigation](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/Navigation.cpp): `src/navigation/Navigation.cpp`
- [L1 guidance](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/L1Controller.cpp): `src/navigation/L1Controller.cpp`
- [L1 tuner](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/FuzzyL1Tuner.cpp): `src/navigation/FuzzyL1Tuner.cpp`
- [TECS](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/navigation/Tecs.cpp): `src/navigation/Tecs.cpp`
- [Attitude control](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/control/AttitudeController.cpp): `src/control/AttitudeController.cpp`
- [LQR axis control](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/control/LqrAxisController.cpp): `src/control/LqrAxisController.cpp`

### Vehicle I/O

- [Actuators](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Actuator.cpp): `src/vehicle/Actuator.cpp`
- [Radio input](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Radio.cpp): `src/vehicle/Radio.cpp`
- [Battery monitor](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/vehicle/Battery.cpp): `src/vehicle/Battery.cpp`

### Telemetry and Persistence

- [MAVLink](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/Mavlink.cpp): `src/communication/Mavlink.cpp`
- [Data logger](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/DataLogger.cpp): `src/communication/DataLogger.cpp`
- [SD logger](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/communication/SdLogger.cpp): `src/communication/SdLogger.cpp`
- [Parameters](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/Params.cpp): `src/storage/Params.cpp`
- [Waypoints](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/Waypoints.cpp): `src/storage/Waypoints.cpp`
- [IMU calibration store](https://github.com/skripsi-fixedwing/flightcontroller-edrones/blob/master/src/storage/ImuCalibrationStorage.cpp): `src/storage/ImuCalibrationStorage.cpp`

### Other components

- **Pilot / GCS**

## Connections

- Firmware entry → L1 guidance: constructs (evidence: `src/main.cpp`)
- Firmware entry → L1 tuner: starts (evidence: `src/main.cpp`)
- Firmware entry → TECS: constructs (evidence: `src/main.cpp`)
- Firmware entry → Navigation: constructs (evidence: `src/main.cpp`)
- Firmware entry → Attitude control: constructs (evidence: `src/main.cpp`)
- Vehicle context → Attitude control: holds reference (evidence: `include/modes/VehicleContext.h`)
- Vehicle context → IMU driver: holds reference (evidence: `include/modes/VehicleContext.h`)
- Vehicle context → AHRS: holds reference (evidence: `include/modes/VehicleContext.h`)
- Vehicle context → Navigation: holds reference (evidence: `include/modes/VehicleContext.h`)
- Vehicle context → TECS: holds reference (evidence: `include/modes/VehicleContext.h`)
- Attitude control → LQR axis control: delegates axis control
- IMU driver → IMU calibration store: persists offsets
- Pilot / GCS → Radio input: sends controls
- Pilot / GCS → MAVLink: sends commands
