# junzis/openap architecture

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

- Interactive diagram: https://gitdiagram.com/junzis/openap
- Repository: https://github.com/junzis/openap

## Overview

OpenAP is a Python aircraft-performance toolkit. A typical calculation uses aircraft and engine properties to parameterize performance models, then computes quantities such as thrust, drag, and fuel flow; emissions are a separate capability. Other branches cover flight phases, trajectory generation, kinematics, navigation, filtering, and statistics, with BADA add-ons and alternative math backends. The README documents these capabilities; some implementation paths are unsampled, so only evidenced relationships are drawn.

Main entry points: [`openap/prop.py`](https://github.com/junzis/openap/blob/master/openap/prop.py) (Aircraft properties), [`openap/fuel.py`](https://github.com/junzis/openap/blob/master/openap/fuel.py) (Fuel flow), [`openap/backends/__init__.py`](https://github.com/junzis/openap/blob/master/openap/backends/__init__.py) (Backend selection), [`openap/base.py`](https://github.com/junzis/openap/blob/master/openap/base.py) (Model base classes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_models["Performance models"]
  node_aero["Aerodynamics<br/>[aero.py]"]
  node_thrust["Thrust<br/>[thrust.py]"]
  node_drag["Drag<br/>[drag.py]"]
  node_fuel["Fuel flow<br/>[fuel.py]"]
  node_emission["Emissions<br/>[emission.py]"]
  node_bada3["BADA3 add-on<br/>[bada3.py]"]
  node_bada4["BADA4 add-on<br/>[bada4.py]"]
end

subgraph group_flight["Flight analysis"]
  node_phase["Flight phases<br/>[phase.py]"]
  node_kinematic["Kinematic data<br/>[kinematic.py]"]
  node_generator["Trajectory generation<br/>[gen.py]"]
  node_navigation["Navigation utilities<br/>[nav.py]"]
  node_filters["Flight filters<br/>[filters.py]"]
  node_fuzzy["Fuzzy utilities<br/>[fuzzy.py]"]
  node_statistics["Statistical fitting<br/>[statistics.py]"]
  node_contrail["Contrail model<br/>[contrail.py]"]
  node_geo["Geospatial calculations<br/>[geo.py]"]
end

subgraph group_data["Aircraft data"]
  node_properties["Aircraft properties<br/>[prop.py]"]
  node_mass["Mass models<br/>[mass.py]"]
end

subgraph group_compute["Numerical execution"]
  node_backends["Backend selection<br/>[__init__.py]"]
  node_numpy["NumPy backend<br/>[numpy_backend.py]"]
  node_casadi["CasADi backend<br/>[casadi_backend.py]"]
  node_jax["JAX backend<br/>[jax_backend.py]"]
  node_base["Model base classes<br/>[base.py]"]
  node_arrayutils["Array conversion<br/>[__init__.py]"]
end

node_user(("Engineer"))

node_user -->|"looks up"| node_properties
node_user -->|"requests flow"| node_fuel
node_properties -.->|"provides data"| node_mass
node_thrust -->|"loads aircraft data"| node_properties
node_drag -->|"loads aircraft data"| node_properties
node_fuel -->|"loads aircraft data"| node_properties
node_emission -->|"loads engine data"| node_properties
node_fuel -->|"uses thrust model"| node_thrust
node_fuel -->|"uses drag model"| node_drag
node_fuel -->|"returns flow"| node_user
node_aero -->|"selects math"| node_backends
node_aero -->|"uses calculations"| node_geo
node_base -->|"initializes"| node_aero
node_base -->|"selects backend"| node_backends
node_base -->|"uses conversion"| node_arrayutils
node_backends -->|"provides backend"| node_numpy
node_backends -->|"provides backend"| node_casadi
node_backends -->|"provides backend"| node_jax
node_generator -->|"uses performance data"| node_kinematic
node_generator -->|"loads aircraft data"| node_properties
node_generator -->|"uses conversions"| node_aero
node_navigation -->|"uses conversions"| node_aero
node_phase -->|"uses classification"| node_fuzzy
node_phase -.->|"plots with"| node_filters
node_statistics -.->|"plots with"| node_filters
node_bada3 -->|"extends models"| node_base
node_bada3 -->|"uses aircraft data"| node_properties
node_bada3 -->|"uses conversion"| node_arrayutils
node_bada4 -->|"extends models"| node_base
node_bada4 -->|"uses conversion"| node_arrayutils

click node_properties "https://github.com/junzis/openap/blob/master/openap/prop.py"
click node_mass "https://github.com/junzis/openap/blob/master/openap/mass.py"
click node_aero "https://github.com/junzis/openap/blob/master/openap/aero.py"
click node_thrust "https://github.com/junzis/openap/blob/master/openap/thrust.py"
click node_drag "https://github.com/junzis/openap/blob/master/openap/drag.py"
click node_fuel "https://github.com/junzis/openap/blob/master/openap/fuel.py"
click node_emission "https://github.com/junzis/openap/blob/master/openap/emission.py"
click node_bada3 "https://github.com/junzis/openap/blob/master/openap/addon/bada3.py"
click node_bada4 "https://github.com/junzis/openap/blob/master/openap/addon/bada4.py"
click node_phase "https://github.com/junzis/openap/blob/master/openap/phase.py"
click node_kinematic "https://github.com/junzis/openap/blob/master/openap/kinematic.py"
click node_generator "https://github.com/junzis/openap/blob/master/openap/gen.py"
click node_navigation "https://github.com/junzis/openap/blob/master/openap/extra/nav.py"
click node_filters "https://github.com/junzis/openap/blob/master/openap/extra/filters.py"
click node_fuzzy "https://github.com/junzis/openap/blob/master/openap/extra/fuzzy.py"
click node_statistics "https://github.com/junzis/openap/blob/master/openap/extra/statistics.py"
click node_contrail "https://github.com/junzis/openap/blob/master/openap/contrail.py"
click node_backends "https://github.com/junzis/openap/blob/master/openap/backends/__init__.py"
click node_numpy "https://github.com/junzis/openap/blob/master/openap/backends/numpy_backend.py"
click node_casadi "https://github.com/junzis/openap/blob/master/openap/backends/casadi_backend.py"
click node_jax "https://github.com/junzis/openap/blob/master/openap/backends/jax_backend.py"
click node_base "https://github.com/junzis/openap/blob/master/openap/base.py"
click node_arrayutils "https://github.com/junzis/openap/blob/master/openap/extra/__init__.py"
click node_geo "https://github.com/junzis/openap/blob/master/openap/geo.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_aero,node_thrust,node_drag,node_fuel,node_emission,node_bada3,node_bada4 toneBlue
class node_phase,node_kinematic,node_generator,node_navigation,node_filters,node_fuzzy,node_statistics,node_contrail,node_geo toneAmber
class node_properties,node_mass toneMint
class node_backends,node_numpy,node_casadi,node_jax,node_base,node_arrayutils toneRose
class node_user toneIndigo
```

## Components

### Performance models

- [Aerodynamics](https://github.com/junzis/openap/blob/master/openap/aero.py): `openap/aero.py`
- [Thrust](https://github.com/junzis/openap/blob/master/openap/thrust.py): `openap/thrust.py`
- [Drag](https://github.com/junzis/openap/blob/master/openap/drag.py): `openap/drag.py`
- [Fuel flow](https://github.com/junzis/openap/blob/master/openap/fuel.py): `openap/fuel.py`
- [Emissions](https://github.com/junzis/openap/blob/master/openap/emission.py): `openap/emission.py`
- [BADA3 add-on](https://github.com/junzis/openap/blob/master/openap/addon/bada3.py): `openap/addon/bada3.py`
- [BADA4 add-on](https://github.com/junzis/openap/blob/master/openap/addon/bada4.py): `openap/addon/bada4.py`

### Flight analysis

- [Flight phases](https://github.com/junzis/openap/blob/master/openap/phase.py): `openap/phase.py`
- [Kinematic data](https://github.com/junzis/openap/blob/master/openap/kinematic.py): `openap/kinematic.py`
- [Trajectory generation](https://github.com/junzis/openap/blob/master/openap/gen.py): `openap/gen.py`
- [Navigation utilities](https://github.com/junzis/openap/blob/master/openap/extra/nav.py): `openap/extra/nav.py`
- [Flight filters](https://github.com/junzis/openap/blob/master/openap/extra/filters.py): `openap/extra/filters.py`
- [Fuzzy utilities](https://github.com/junzis/openap/blob/master/openap/extra/fuzzy.py): `openap/extra/fuzzy.py`
- [Statistical fitting](https://github.com/junzis/openap/blob/master/openap/extra/statistics.py): `openap/extra/statistics.py`
- [Contrail model](https://github.com/junzis/openap/blob/master/openap/contrail.py): `openap/contrail.py`
- [Geospatial calculations](https://github.com/junzis/openap/blob/master/openap/geo.py): `openap/geo.py`

### Aircraft data

- [Aircraft properties](https://github.com/junzis/openap/blob/master/openap/prop.py): `openap/prop.py`
- [Mass models](https://github.com/junzis/openap/blob/master/openap/mass.py): `openap/mass.py`

### Numerical execution

- [Backend selection](https://github.com/junzis/openap/blob/master/openap/backends/__init__.py): `openap/backends/__init__.py`
- [NumPy backend](https://github.com/junzis/openap/blob/master/openap/backends/numpy_backend.py): `openap/backends/numpy_backend.py`
- [CasADi backend](https://github.com/junzis/openap/blob/master/openap/backends/casadi_backend.py): `openap/backends/casadi_backend.py`
- [JAX backend](https://github.com/junzis/openap/blob/master/openap/backends/jax_backend.py): `openap/backends/jax_backend.py`
- [Model base classes](https://github.com/junzis/openap/blob/master/openap/base.py): `openap/base.py`
- [Array conversion](https://github.com/junzis/openap/blob/master/openap/extra/__init__.py): `openap/extra/__init__.py`

### Other components

- **Engineer**

## Connections

- Engineer → Aircraft properties: looks up
- Engineer → Fuel flow: requests flow
- Aircraft properties → Mass models: provides data (evidence: `openap/mass.py`)
- Thrust → Aircraft properties: loads aircraft data (evidence: `openap/thrust.py`)
- Drag → Aircraft properties: loads aircraft data (evidence: `openap/drag.py`)
- Fuel flow → Aircraft properties: loads aircraft data (evidence: `openap/fuel.py`)
- Emissions → Aircraft properties: loads engine data (evidence: `openap/emission.py`)
- Fuel flow → Thrust: uses thrust model (evidence: `openap/fuel.py`)
- Fuel flow → Drag: uses drag model (evidence: `openap/fuel.py`)
- Fuel flow → Engineer: returns flow
- Aerodynamics → Backend selection: selects math (evidence: `openap/aero.py`)
- Aerodynamics → Geospatial calculations: uses calculations (evidence: `openap/aero.py`)
- Model base classes → Aerodynamics: initializes (evidence: `openap/base.py`)
- Model base classes → Backend selection: selects backend (evidence: `openap/base.py`)
- Model base classes → Array conversion: uses conversion (evidence: `openap/base.py`)
- Backend selection → NumPy backend: provides backend (evidence: `openap/backends/__init__.py`)
- Backend selection → CasADi backend: provides backend (evidence: `openap/backends/__init__.py`)
- Backend selection → JAX backend: provides backend (evidence: `openap/backends/__init__.py`)
- Trajectory generation → Kinematic data: uses performance data (evidence: `openap/gen.py`)
- Trajectory generation → Aircraft properties: loads aircraft data (evidence: `openap/gen.py`)
- Trajectory generation → Aerodynamics: uses conversions (evidence: `openap/gen.py`)
- Navigation utilities → Aerodynamics: uses conversions (evidence: `openap/extra/nav.py`)
- Flight phases → Fuzzy utilities: uses classification (evidence: `openap/phase.py`)
- Flight phases → Flight filters: plots with
- Statistical fitting → Flight filters: plots with
- BADA3 add-on → Model base classes: extends models (evidence: `openap/addon/bada3.py`)
- BADA3 add-on → Aircraft properties: uses aircraft data (evidence: `openap/addon/bada3.py`)
- BADA3 add-on → Array conversion: uses conversion (evidence: `openap/addon/bada3.py`)
- BADA4 add-on → Model base classes: extends models (evidence: `openap/addon/bada4.py`)
- BADA4 add-on → Array conversion: uses conversion (evidence: `openap/addon/bada4.py`)
