# yeseo01/electric-aircraft-simulator architecture

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

- Interactive diagram: https://gitdiagram.com/yeseo01/electric-aircraft-simulator
- Repository: https://github.com/yeseo01/electric-aircraft-simulator

## Overview

This repository is an electric-aircraft mission simulator. Its main workflow turns flight or mission data into timed waypoints, computes guidance and control targets, updates propulsion and battery state, propagates aircraft motion, and emits telemetry. `FlightSimulator` provides incremental stepping; `simulator/core/sim_loop.py` also represents the documented batch-oriented simulation workflow. The README documents the overall coordination, while sampled source confirms several internal calls; edges based on the documented workflow cite the README where implementation excerpts do not show the call.

Main entry points: [`simulator/flight_simulator.py`](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/flight_simulator.py) (Incremental simulator), [`simulator/powertrain/system.py`](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/system.py) (Powertrain integration), [`simulator/core/sim_loop.py`](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/sim_loop.py) (Batch simulation loop), [`simulator/core/io_flight.py`](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/io_flight.py) (Flight data and waypoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Mission inputs"]
  node_flight_io["Flight data and waypoints<br/>[io_flight.py]"]
  node_synthetic_data["Synthetic scenarios<br/>[demo_data.py]"]
end

subgraph group_orchestration["Simulation orchestration"]
  node_configuration["Simulation configuration<br/>[config.py]"]
  node_flight_simulator["Incremental simulator"]
  node_batch_loop["Batch simulation loop<br/>[sim_loop.py]"]
end

subgraph group_flight["Flight guidance and dynamics"]
  node_atmosphere["Atmospheric density<br/>[atmosphere.py]"]
  node_guidance["Waypoint guidance<br/>[guidance.py]"]
  node_control["Flight and power control<br/>[control.py]"]
  node_aerodynamics["Aerodynamic forces<br/>[aero.py]"]
  node_flight_dynamics["3-DOF dynamics<br/>[sim_loop.py]"]
  node_frames["Coordinate conversion<br/>[frames.py]"]
end

subgraph group_power["Propulsion and battery"]
  node_powertrain["Powertrain integration<br/>[system.py]"]
  node_battery["Battery state model<br/>[battery.py]"]
  node_motor["Motor conversion<br/>[motor.py]"]
  node_propeller["Propeller surrogate<br/>[prop.py]"]
  node_rpm_solver["RPM solver<br/>[rpm_solve.py]"]
end

subgraph group_outputs["Telemetry and demo"]
  node_state_models["State and telemetry schemas<br/>[schemas.py]"]
  node_telemetry["Telemetry frames<br/>[schemas.py]"]
  node_demo_plot["Demo visualization<br/>[plot_demo.py]"]
end

node_mission_source(("Mission data"))
node_telemetry_consumer(("Simulation consumer"))

node_mission_source -->|"provides data"| node_flight_io
node_synthetic_data -.->|"supplies demo input"| node_flight_simulator
node_flight_io -->|"loads mission"| node_flight_simulator
node_flight_io -->|"builds waypoints"| node_batch_loop
node_configuration -->|"configures"| node_flight_simulator
node_configuration -->|"configures"| node_batch_loop
node_flight_simulator -->|"requests targets"| node_guidance
node_flight_simulator -->|"computes commands"| node_control
node_flight_simulator -->|"steps powertrain"| node_powertrain
node_flight_simulator -->|"propagates state"| node_flight_dynamics
node_flight_simulator -->|"computes density"| node_atmosphere
node_flight_simulator -->|"creates frames"| node_telemetry
node_batch_loop -->|"requests targets"| node_guidance
node_batch_loop -->|"computes commands"| node_control
node_batch_loop -->|"steps powertrain"| node_powertrain
node_batch_loop -->|"integrates state"| node_flight_dynamics
node_guidance -->|"returns targets"| node_state_models
node_control -->|"reads aircraft state"| node_state_models
node_flight_dynamics -->|"evaluates forces"| node_aerodynamics
node_flight_io -->|"converts coordinates"| node_frames
node_powertrain -->|"updates battery"| node_battery
node_powertrain -->|"converts power"| node_motor
node_powertrain -->|"evaluates propeller"| node_propeller
node_powertrain -->|"solves RPM"| node_rpm_solver
node_powertrain -.->|"gets density"| node_atmosphere
node_flight_simulator -->|"uses state types"| node_state_models
node_telemetry -->|"returns telemetry"| node_telemetry_consumer
node_telemetry -.->|"visualizes results"| node_demo_plot

click node_flight_io "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/io_flight.py"
click node_synthetic_data "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/demo_data.py"
click node_configuration "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/config.py"
click node_flight_simulator "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/flight_simulator.py"
click node_batch_loop "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/sim_loop.py"
click node_atmosphere "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/atmosphere.py"
click node_guidance "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/guidance.py"
click node_control "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/control.py"
click node_aerodynamics "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/aero.py"
click node_flight_dynamics "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/sim_loop.py"
click node_frames "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/frames.py"
click node_powertrain "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/system.py"
click node_battery "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/battery.py"
click node_motor "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/motor.py"
click node_propeller "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/prop.py"
click node_rpm_solver "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/rpm_solve.py"
click node_state_models "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/schemas.py"
click node_telemetry "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/schemas.py"
click node_demo_plot "https://github.com/yeseo01/electric-aircraft-simulator/blob/main/scripts/plot_demo.py"

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_flight_io,node_synthetic_data toneBlue
class node_configuration,node_flight_simulator,node_batch_loop toneAmber
class node_atmosphere,node_guidance,node_control,node_aerodynamics,node_flight_dynamics,node_frames toneMint
class node_powertrain,node_battery,node_motor,node_propeller,node_rpm_solver toneRose
class node_state_models,node_telemetry,node_demo_plot,node_mission_source,node_telemetry_consumer toneIndigo
```

## Components

### Mission inputs

- [Flight data and waypoints](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/io_flight.py): `simulator/core/io_flight.py`
- [Synthetic scenarios](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/demo_data.py): `simulator/demo_data.py`

### Simulation orchestration

- [Simulation configuration](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/config.py): `simulator/config.py`
- [Incremental simulator](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/flight_simulator.py): `simulator/flight_simulator.py`
- [Batch simulation loop](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/sim_loop.py): `simulator/core/sim_loop.py`

### Flight guidance and dynamics

- [Atmospheric density](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/atmosphere.py): `simulator/core/atmosphere.py`
- [Waypoint guidance](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/guidance.py): `simulator/core/guidance.py`
- [Flight and power control](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/control.py): `simulator/core/control.py`
- [Aerodynamic forces](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/aero.py): `simulator/core/aero.py`
- [3-DOF dynamics](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/sim_loop.py): `simulator/core/sim_loop.py`
- [Coordinate conversion](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/core/frames.py): `simulator/core/frames.py`

### Propulsion and battery

- [Powertrain integration](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/system.py): `simulator/powertrain/system.py`
- [Battery state model](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/battery.py): `simulator/powertrain/battery.py`
- [Motor conversion](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/motor.py): `simulator/powertrain/motor.py`
- [Propeller surrogate](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/prop.py): `simulator/powertrain/prop.py`
- [RPM solver](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/powertrain/rpm_solve.py): `simulator/powertrain/rpm_solve.py`

### Telemetry and demo

- [State and telemetry schemas](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/schemas.py): `simulator/schemas.py`
- [Telemetry frames](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/simulator/schemas.py): `simulator/schemas.py`
- [Demo visualization](https://github.com/yeseo01/electric-aircraft-simulator/blob/main/scripts/plot_demo.py): `scripts/plot_demo.py`

### Other components

- **Mission data**
- **Simulation consumer**

## Connections

- Mission data → Flight data and waypoints: provides data (evidence: `README.md`)
- Synthetic scenarios → Incremental simulator: supplies demo input
- Flight data and waypoints → Incremental simulator: loads mission (evidence: `simulator/flight_simulator.py`)
- Flight data and waypoints → Batch simulation loop: builds waypoints (evidence: `README.md`)
- Simulation configuration → Incremental simulator: configures (evidence: `simulator/flight_simulator.py`)
- Simulation configuration → Batch simulation loop: configures (evidence: `simulator/core/sim_loop.py`)
- Incremental simulator → Waypoint guidance: requests targets (evidence: `README.md`)
- Incremental simulator → Flight and power control: computes commands (evidence: `README.md`)
- Incremental simulator → Powertrain integration: steps powertrain (evidence: `simulator/flight_simulator.py`)
- Incremental simulator → 3-DOF dynamics: propagates state (evidence: `simulator/flight_simulator.py`)
- Incremental simulator → Atmospheric density: computes density (evidence: `simulator/flight_simulator.py`)
- Incremental simulator → Telemetry frames: creates frames (evidence: `README.md`)
- Batch simulation loop → Waypoint guidance: requests targets (evidence: `simulator/core/sim_loop.py`)
- Batch simulation loop → Flight and power control: computes commands (evidence: `simulator/core/sim_loop.py`)
- Batch simulation loop → Powertrain integration: steps powertrain (evidence: `simulator/core/sim_loop.py`)
- Batch simulation loop → 3-DOF dynamics: integrates state (evidence: `simulator/core/sim_loop.py`)
- Waypoint guidance → State and telemetry schemas: returns targets (evidence: `simulator/core/guidance.py`)
- Flight and power control → State and telemetry schemas: reads aircraft state (evidence: `simulator/core/control.py`)
- 3-DOF dynamics → Aerodynamic forces: evaluates forces (evidence: `simulator/core/aero.py`)
- Flight data and waypoints → Coordinate conversion: converts coordinates (evidence: `simulator/core/io_flight.py`)
- Powertrain integration → Battery state model: updates battery (evidence: `simulator/powertrain/system.py`)
- Powertrain integration → Motor conversion: converts power (evidence: `simulator/powertrain/system.py`)
- Powertrain integration → Propeller surrogate: evaluates propeller (evidence: `simulator/powertrain/system.py`)
- Powertrain integration → RPM solver: solves RPM (evidence: `simulator/powertrain/system.py`)
- Powertrain integration → Atmospheric density: gets density
- Incremental simulator → State and telemetry schemas: uses state types (evidence: `simulator/flight_simulator.py`)
- Telemetry frames → Simulation consumer: returns telemetry (evidence: `README.md`)
- Telemetry frames → Demo visualization: visualizes results
