# oafundador/6-dof-ballistic-model architecture

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

- Interactive diagram: https://gitdiagram.com/oafundador/6-dof-ballistic-model
- Repository: https://github.com/oafundador/6-dof-ballistic-model

## Overview

This is a refactored 6-DOF exterior-ballistics library, with optional anti-air lethality and Monte Carlo analysis layers. The main workflow configures a shot and aerodynamic data, integrates its flight into a trajectory, then optionally evaluates a proximity burst and fragment damage or runs dispersion and engagement studies. Relationships below are limited to the excerpts, SOURCE INDEX references, and README statements; several internal calls and the Monte Carlo implementations were not sampled, so those links are omitted rather than inferred.

Main entry points: [`src/sixdof/simulator.py`](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/simulator.py) (Shot simulator), [`src/sixdof/presets.py`](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/presets.py) (Presets), [`src/sixdof/dynamics.py`](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/dynamics.py) (6-DOF equations), [`src/sixdof/trajectory.py`](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/trajectory.py) (Trajectory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Shot configuration"]
  node_presets["Presets<br/>[presets.py]"]
  node_projectile["Projectile<br/>[projectile.py]"]
  node_weapon["Weapon mount<br/>[weapon.py]"]
  node_vessel["Vessel platform<br/>[vessel.py]"]
  node_environment["Atmosphere<br/>[environment.py]"]
  node_aero["Aero coefficients<br/>[aerodynamics.py]"]
end

subgraph group_flight["Flight simulation"]
  node_simulator["Shot simulator<br/>[simulator.py]"]
  node_dynamics["6-DOF equations<br/>[dynamics.py]"]
  node_events["Flight events<br/>[events.py]"]
  node_trajectory["Trajectory<br/>[trajectory.py]"]
  node_diagnostics["Flight diagnostics<br/>[diagnostics.py]"]
  node_plotting["Trajectory plotting<br/>[plotting.py]"]
end

subgraph group_antiair["Anti-air evaluation"]
  node_fuze["Proximity fuze<br/>[fuze.py]"]
  node_geometry["Target geometry<br/>[geometry.py]"]
  node_warhead["Fragment warhead<br/>[warhead.py]"]
  node_damage["Damage assessment<br/>[damage.py]"]
  node_report["Engagement report<br/>[report.py]"]
end

subgraph group_analysis["Campaign analysis"]
  node_sweep["Angle sweep<br/>[sweep.py]"]
  node_selection["Aim selection<br/>[selection.py]"]
  node_dispersion["Shot dispersion<br/>[dispersion.py]"]
  node_proximity["Closest approach<br/>[proximity.py]"]
  node_cost["Engagement cost<br/>[cost.py]"]
end

node_engineer(("Library user"))

node_engineer -->|"configures with"| node_presets
node_engineer -->|"runs shot"| node_simulator
node_presets -->|"builds"| node_projectile
node_presets -->|"builds"| node_weapon
node_presets -->|"builds"| node_environment
node_presets -->|"builds"| node_aero
node_weapon -->|"reads platform"| node_vessel
node_simulator -->|"integrates"| node_dynamics
node_dynamics -->|"uses properties"| node_projectile
node_dynamics -->|"reads launch state"| node_weapon
node_dynamics -->|"reads atmosphere"| node_environment
node_dynamics -->|"reads coefficients"| node_aero
node_simulator -->|"uses events"| node_events
node_simulator -->|"produces"| node_trajectory
node_simulator -->|"checks flight"| node_diagnostics
node_trajectory -->|"reads atmosphere"| node_environment
node_trajectory -->|"reads properties"| node_projectile
node_plotting -->|"plots"| node_trajectory
node_simulator -->|"accepts fuze"| node_fuze
node_fuze -->|"finds burst"| node_trajectory
node_damage -->|"reads facets"| node_geometry
node_damage -->|"reads pattern"| node_warhead
node_report -->|"reports assessment"| node_damage
node_report -->|"reports burst"| node_fuze
node_engineer -->|"runs campaign"| node_sweep
node_engineer -->|"analyzes approach"| node_proximity
node_sweep -->|"runs shots"| node_simulator
node_selection -.->|"selects aim points"| node_sweep
node_dispersion -->|"perturbs shots"| node_simulator
node_dispersion -->|"uses platform"| node_vessel
node_cost -.->|"scores engagements"| node_dispersion

click node_presets "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/presets.py"
click node_projectile "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/projectile.py"
click node_weapon "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/weapon.py"
click node_vessel "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/vessel.py"
click node_environment "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/environment.py"
click node_aero "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aerodynamics.py"
click node_simulator "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/simulator.py"
click node_dynamics "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/dynamics.py"
click node_events "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/events.py"
click node_trajectory "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/trajectory.py"
click node_diagnostics "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/diagnostics.py"
click node_plotting "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/plotting.py"
click node_fuze "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/fuze.py"
click node_geometry "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/geometry.py"
click node_warhead "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/warhead.py"
click node_damage "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/damage.py"
click node_report "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/report.py"
click node_sweep "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/sweep.py"
click node_selection "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/selection.py"
click node_dispersion "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/dispersion.py"
click node_proximity "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/proximity.py"
click node_cost "https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/cost.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_presets,node_projectile,node_weapon,node_vessel,node_environment,node_aero,node_engineer toneBlue
class node_simulator,node_dynamics,node_events,node_trajectory,node_diagnostics,node_plotting toneAmber
class node_fuze,node_geometry,node_warhead,node_damage,node_report toneMint
class node_sweep,node_selection,node_dispersion,node_proximity,node_cost toneRose
```

## Components

### Shot configuration

- [Presets](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/presets.py): `src/sixdof/presets.py`
- [Projectile](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/projectile.py): `src/sixdof/projectile.py`
- [Weapon mount](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/weapon.py): `src/sixdof/weapon.py`
- [Vessel platform](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/vessel.py): `src/sixdof/vessel.py`
- [Atmosphere](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/environment.py): `src/sixdof/environment.py`
- [Aero coefficients](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aerodynamics.py): `src/sixdof/aerodynamics.py`

### Flight simulation

- [Shot simulator](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/simulator.py): `src/sixdof/simulator.py`
- [6-DOF equations](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/dynamics.py): `src/sixdof/dynamics.py`
- [Flight events](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/events.py): `src/sixdof/events.py`
- [Trajectory](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/trajectory.py): `src/sixdof/trajectory.py`
- [Flight diagnostics](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/diagnostics.py): `src/sixdof/diagnostics.py`
- [Trajectory plotting](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/plotting.py): `src/sixdof/plotting.py`

### Anti-air evaluation

- [Proximity fuze](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/fuze.py): `src/sixdof/aa/fuze.py`
- [Target geometry](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/geometry.py): `src/sixdof/aa/geometry.py`
- [Fragment warhead](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/warhead.py): `src/sixdof/aa/warhead.py`
- [Damage assessment](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/damage.py): `src/sixdof/aa/damage.py`
- [Engagement report](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/aa/report.py): `src/sixdof/aa/report.py`

### Campaign analysis

- [Angle sweep](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/sweep.py): `src/sixdof/montecarlo/sweep.py`
- [Aim selection](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/selection.py): `src/sixdof/montecarlo/selection.py`
- [Shot dispersion](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/dispersion.py): `src/sixdof/montecarlo/dispersion.py`
- [Closest approach](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/proximity.py): `src/sixdof/montecarlo/proximity.py`
- [Engagement cost](https://github.com/oafundador/6-dof-ballistic-model/blob/main/src/sixdof/montecarlo/cost.py): `src/sixdof/montecarlo/cost.py`

### Other components

- **Library user**

## Connections

- Library user → Presets: configures with (evidence: `README.md`)
- Library user → Shot simulator: runs shot (evidence: `README.md`)
- Presets → Projectile: builds (evidence: `src/sixdof/presets.py`)
- Presets → Weapon mount: builds (evidence: `src/sixdof/presets.py`)
- Presets → Atmosphere: builds (evidence: `src/sixdof/presets.py`)
- Presets → Aero coefficients: builds (evidence: `src/sixdof/presets.py`)
- Weapon mount → Vessel platform: reads platform (evidence: `src/sixdof/weapon.py`)
- Shot simulator → 6-DOF equations: integrates (evidence: `src/sixdof/simulator.py`)
- 6-DOF equations → Projectile: uses properties (evidence: `src/sixdof/dynamics.py`)
- 6-DOF equations → Weapon mount: reads launch state (evidence: `src/sixdof/dynamics.py`)
- 6-DOF equations → Atmosphere: reads atmosphere (evidence: `src/sixdof/dynamics.py`)
- 6-DOF equations → Aero coefficients: reads coefficients (evidence: `README.md`)
- Shot simulator → Flight events: uses events (evidence: `src/sixdof/simulator.py`)
- Shot simulator → Trajectory: produces (evidence: `src/sixdof/simulator.py`)
- Shot simulator → Flight diagnostics: checks flight (evidence: `src/sixdof/simulator.py`)
- Trajectory → Atmosphere: reads atmosphere (evidence: `src/sixdof/trajectory.py`)
- Trajectory → Projectile: reads properties (evidence: `src/sixdof/trajectory.py`)
- Trajectory plotting → Trajectory: plots (evidence: `src/sixdof/plotting.py`)
- Shot simulator → Proximity fuze: accepts fuze (evidence: `src/sixdof/simulator.py`)
- Proximity fuze → Trajectory: finds burst (evidence: `src/sixdof/aa/fuze.py`)
- Damage assessment → Target geometry: reads facets (evidence: `src/sixdof/aa/damage.py`)
- Damage assessment → Fragment warhead: reads pattern (evidence: `src/sixdof/aa/damage.py`)
- Engagement report → Damage assessment: reports assessment (evidence: `src/sixdof/aa/report.py`)
- Engagement report → Proximity fuze: reports burst (evidence: `src/sixdof/aa/report.py`)
- Library user → Angle sweep: runs campaign (evidence: `README.md`)
- Library user → Closest approach: analyzes approach (evidence: `README.md`)
- Angle sweep → Shot simulator: runs shots (evidence: `src/sixdof/montecarlo/sweep.py`)
- Aim selection → Angle sweep: selects aim points
- Shot dispersion → Shot simulator: perturbs shots (evidence: `src/sixdof/montecarlo/dispersion.py`)
- Shot dispersion → Vessel platform: uses platform (evidence: `src/sixdof/montecarlo/dispersion.py`)
- Engagement cost → Shot dispersion: scores engagements
