# community-a-4e/community-a4e-c architecture

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

- Interactive diagram: https://gitdiagram.com/community-a-4e/community-a4e-c
- Repository: https://github.com/community-a-4e/community-a4e-c

## Overview

A-4E-C is a DCS World aircraft module. Its principal runtime path is DCS simulator interaction with the external flight model, which models aircraft motion, engine and fuel behavior, damage, and aircraft systems; pilots interact through the clickable cockpit and controls. The README documents additional avionics, weapons, carrier operations, and refueling. The sampled C++ establishes engine behavior and the DCS physics API, but not the full runtime wiring or the unsampled avionics/cockpit implementations, so those links are documented or marked unverified.

Main entry points: [`A-4E-C/ExternalFM/FM/FlightModel.cpp`](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/FlightModel.cpp) (Flight model), [`A-4E-C/ExternalFM/FM/Avionics.cpp`](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Avionics.cpp) (Avionics), [`A-4E-C/ExternalFM/FM/Interface.h`](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Interface.h) (Clickable cockpit), [`A-4E-C/ExternalFM/FM/Input.h`](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Input.h) (Flight controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight simulation"]
  node_aircraft_state["Aircraft state<br/>[AircraftState.h]"]
  node_flight_model["Flight model<br/>[FlightModel.cpp]"]
  node_airframe["Airframe<br/>[Airframe.cpp]"]
  node_engine["Engine simulation<br/>[Engine2.cpp]"]
end

subgraph group_systems["Aircraft systems"]
  node_fuel["Fuel system<br/>[FuelSystem2.cpp]"]
  node_damage["Damage model<br/>[Damage.cpp]"]
  node_carrier["Carrier operations"]
  node_refueling["Air refueling"]
end

subgraph group_avionics["Avionics and armament"]
  node_avionics["Avionics<br/>[Avionics.cpp]"]
  node_radar["APG-53A radar<br/>[Radar.cpp]"]
  node_doppler["Doppler radar<br/>[Radar.cpp]"]
  node_navigation["Navigation systems"]
  node_bombing["CP-741 computer<br/>[CP741.cpp]"]
  node_weapons["Weapons systems"]
end

subgraph group_interfaces["Simulator interfaces"]
  node_physics_api["Physics API"]
  node_input["Flight controls<br/>[Input.h]"]
  node_cockpit["Clickable cockpit<br/>[Interface.h]"]
end

node_pilot(("Pilot"))
node_dcs["DCS World"]

node_pilot -.->|"operates"| node_cockpit
node_pilot -.->|"sets controls"| node_input
node_dcs -->|"calls callbacks"| node_physics_api
node_input -.->|"supplies controls"| node_flight_model
node_flight_model -.->|"updates state"| node_aircraft_state
node_flight_model -.->|"models forces"| node_airframe
node_flight_model -.->|"updates engine"| node_engine
node_flight_model -.->|"uses fuel system"| node_fuel
node_flight_model -.->|"applies damage"| node_damage
node_cockpit -.->|"controls systems"| node_avionics
node_avionics -.->|"includes radar"| node_radar
node_avionics -.->|"includes radar"| node_doppler
node_avionics -.->|"includes systems"| node_navigation
node_avionics -.->|"includes computer"| node_bombing
node_cockpit -.->|"controls release"| node_weapons
node_pilot -.->|"performs operations"| node_carrier
node_pilot -.->|"performs operation"| node_refueling

click node_physics_api "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/include/FM/wHumanCustomPhysicsAPI.h"
click node_input "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Input.h"
click node_aircraft_state "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/AircraftState.h"
click node_flight_model "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/FlightModel.cpp"
click node_airframe "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Airframe.cpp"
click node_engine "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Engine2.cpp"
click node_fuel "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/FuelSystem2.cpp"
click node_damage "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Damage.cpp"
click node_avionics "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Avionics.cpp"
click node_radar "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Radar.cpp"
click node_doppler "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Radar.cpp"
click node_navigation "https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM"
click node_bombing "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/CP741.cpp"
click node_weapons "https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM"
click node_cockpit "https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Interface.h"
click node_carrier "https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM"
click node_refueling "https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM"

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_aircraft_state,node_flight_model,node_airframe,node_engine toneBlue
class node_fuel,node_damage,node_carrier,node_refueling toneAmber
class node_avionics,node_radar,node_doppler,node_navigation,node_bombing,node_weapons toneMint
class node_physics_api,node_input,node_cockpit toneRose
class node_pilot,node_dcs toneIndigo
```

## Components

### Flight simulation

- [Aircraft state](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/AircraftState.h): `A-4E-C/ExternalFM/FM/AircraftState.h`
- [Flight model](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/FlightModel.cpp): `A-4E-C/ExternalFM/FM/FlightModel.cpp`
- [Airframe](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Airframe.cpp): `A-4E-C/ExternalFM/FM/Airframe.cpp`
- [Engine simulation](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Engine2.cpp): `A-4E-C/ExternalFM/FM/Engine2.cpp`

### Aircraft systems

- [Fuel system](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/FuelSystem2.cpp): `A-4E-C/ExternalFM/FM/FuelSystem2.cpp`
- [Damage model](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Damage.cpp): `A-4E-C/ExternalFM/FM/Damage.cpp`
- [Carrier operations](https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM): `A-4E-C/ExternalFM/FM`
- [Air refueling](https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM): `A-4E-C/ExternalFM/FM`

### Avionics and armament

- [Avionics](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Avionics.cpp): `A-4E-C/ExternalFM/FM/Avionics.cpp`
- [APG-53A radar](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Radar.cpp): `A-4E-C/ExternalFM/FM/Radar.cpp`
- [Doppler radar](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Radar.cpp): `A-4E-C/ExternalFM/FM/Radar.cpp`
- [Navigation systems](https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM): `A-4E-C/ExternalFM/FM`
- [CP-741 computer](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/CP741.cpp): `A-4E-C/ExternalFM/FM/CP741.cpp`
- [Weapons systems](https://github.com/community-a-4e/community-a4e-c/tree/master/A-4E-C/ExternalFM/FM): `A-4E-C/ExternalFM/FM`

### Simulator interfaces

- [Physics API](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/include/FM/wHumanCustomPhysicsAPI.h): `A-4E-C/ExternalFM/include/FM/wHumanCustomPhysicsAPI.h`
- [Flight controls](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Input.h): `A-4E-C/ExternalFM/FM/Input.h`
- [Clickable cockpit](https://github.com/community-a-4e/community-a4e-c/blob/master/A-4E-C/ExternalFM/FM/Interface.h): `A-4E-C/ExternalFM/FM/Interface.h`

### Other components

- **Pilot**
- **DCS World**

## Connections

- Pilot → Clickable cockpit: operates (evidence: `README.md`)
- Pilot → Flight controls: sets controls (evidence: `README.md`)
- DCS World → Physics API: calls callbacks (evidence: `A-4E-C/ExternalFM/include/FM/wHumanCustomPhysicsAPI.h`)
- Flight controls → Flight model: supplies controls
- Flight model → Aircraft state: updates state
- Flight model → Airframe: models forces
- Flight model → Engine simulation: updates engine
- Flight model → Fuel system: uses fuel system
- Flight model → Damage model: applies damage
- Clickable cockpit → Avionics: controls systems (evidence: `README.md`)
- Avionics → APG-53A radar: includes radar (evidence: `README.md`)
- Avionics → Doppler radar: includes radar (evidence: `README.md`)
- Avionics → Navigation systems: includes systems (evidence: `README.md`)
- Avionics → CP-741 computer: includes computer (evidence: `README.md`)
- Clickable cockpit → Weapons systems: controls release (evidence: `README.md`)
- Pilot → Carrier operations: performs operations (evidence: `README.md`)
- Pilot → Air refueling: performs operation (evidence: `README.md`)
