A complete 6-Degrees-of-Freedom (6-DoF) flight dynamics simulation of the Airbus A380 in engine-off glider mode.
This project models aerodynamic, kinematic, and control behaviour, incorporating wind disturbance modelling, Monte Carlo analysis, and machine-learning-based flight prediction.
Developed as part of an advanced aerospace simulation initiative to explore large-aircraft stability, glide performance, and control robustness under uncertainty.
-
Full 6-DoF rigid-body dynamics
Simulates translational and rotational motion using realistic aircraft mass and inertia parameters. -
Aerodynamic model (
src/glider/aero.py)
Computes lift, drag, side-force, and moment coefficients as functions of angle of attack, sideslip, and control deflections. -
Flight dynamics engine (
src/glider/dynamics.py)
Integrates Newton–Euler equations of motion using adaptive time-stepping. -
Control surface model (
src/glider/controls.py)
Implements elevator, aileron, and rudder control logic for glide stabilisation. -
Atmospheric & wind modelling (
src/glider/wind_model.py)
Adds stochastic gusts, turbulence, and altitude-dependent wind profiles. -
Monte Carlo simulation (
src/glider/monte_carlo.py)
Runs 100 randomised flight scenarios, each seeded and reproducible, from 13,000 m to ground impact. -
Machine-Learning performance predictor (
src/glider/ml/model.py)
Fits a linear regression predicting glide distance from the wind conditions, with a random forest kept as a benchmark. -
Model evaluation (
src/glider/ml/evaluate.py)
Cross-validation, coefficient inference, regression assumption checks, residual analysis and a learning curve. -
Automated plotting modules (
src/glider/plotting/)
Generates trajectory plots, attitude histories, energy curves, and statistical summaries.
Glider-6-DoF-Simulation/
├── scripts/ # Entry points, run these
│ ├── run_simulation.py # Single 6-DoF glide + flight plots
│ ├── run_monte_carlo.py # Monte Carlo campaign -> CSV
│ ├── plot_monte_carlo.py # Monte Carlo statistics plots
│ ├── run_ml.py # Fit models + ML plots
│ └── evaluate_ml.py # Evidence behind the model choice
├── src/glider/ # Library code
│ ├── aero.py # Aerodynamic coefficients, ISA atmosphere
│ ├── dynamics.py # 6-DoF equations, ground-impact event
│ ├── controls.py # Elevator, aileron, rudder control laws
│ ├── wind_model.py # Steady wind and turbulence model
│ ├── monte_carlo.py # Monte Carlo campaign
│ ├── paths.py # Project directory locations
│ ├── ml/
│ │ ├── model.py # Linear model + random forest benchmark
│ │ └── evaluate.py # Cross-validation and diagnostics
│ └── plotting/
│ ├── flight.py # Trajectory, attitude, energy, L/D
│ ├── monte_carlo.py # Distance histogram, altitude envelope
│ └── ml.py # Model accuracy and partial dependence
├── data/monte_carlo_results.csv # Generated dataset (100 runs)
├── plots/
│ ├── main/ # Figures from run_simulation.py
│ └── additional/ # Monte Carlo and ML figures
├── docs/glider_simulation_project.pdf # Project report
├── requirements.txt # Python dependencies
└── README.md # Documentation (this file)
No installation step is needed. The scripts add src/ to the import path, so
python scripts/run_simulation.py works directly in a fresh clone.
The translational motion of the aircraft in body axes is governed by:
Where:
-
$m$ – aircraft mass -
$\dot{\mathbf{v}}$ – time derivative of velocity (acceleration) in the body frame -
$\mathbf{F}_{\text{aero}}$ – aerodynamic force vector -
$\mathbf{F}_{\text{gravity}}$ – gravitational force vector -
$\mathbf{F}_{\text{wind}}$ – wind disturbance force vector
The rotational motion of the aircraft about its center of gravity is governed by the Euler rotational equations:
Where:
-
$\mathbf{I}$ – inertia matrix of the aircraft -
$\boldsymbol{\omega}$ – angular velocity vector in body frame -
$\dot{\boldsymbol{\omega}}$ – angular acceleration vector -
$\mathbf{M}_{\text{aero}}$ – aerodynamic moment vector -
$\mathbf{M}_{\text{control}}$ – control surface moment vector
Implemented using SciPy's solve_ivp with the adaptive-step RK45 integrator.
Attitude is propagated as Euler angles (roll, pitch, yaw). This carries a singularity at
| Module | Purpose |
|---|---|
scripts/run_simulation.py |
Sets up simulation, loads parameters, executes 6-DoF loop |
glider/monte_carlo.py |
Randomises base wind, turbulence intensity and correlation time; integrates each case to ground impact |
glider/wind_model.py |
Adds dry and turbulent wind components |
glider/ml/model.py |
Learns mapping between flight inputs and performance |
glider/ml/evaluate.py |
Compares models and tests the regression assumptions |
glider/plotting/flight.py |
Generates trajectory, orientation, and energy plots |
glider/plotting/monte_carlo.py |
Plots statistical distribution of outcomes |
glider/plotting/ml.py |
Visualises model accuracy and predicted performance |
When executed, the simulation produces:
- Time-series data (
.csv): position, velocity, attitude, angular rates - Flight plots:
- 3D trajectory and attitude evolution
- Lift/drag coefficient variation
- Altitude and velocity vs time
- Monte Carlo summaries (
data/monte_carlo_results.csv, one row per run):- Logged inputs,
flight_time_s,distance_m, and 200 altitude samples spread over that run's own descent - Histograms of glide distance and impact time
- Mean ± σ envelopes for altitude decay
- Logged inputs,
- Machine learning diagnostics:
- Predicted vs actual glide performance scatter plots
- Feature importance rankings
Example visualisations:
- Glide trajectory (3D)
- Monte Carlo envelope of altitude decay
- ML-predicted glide ratio vs true values
From 13,000 m, engines off, over 100 seeded Monte Carlo runs:
| Quantity | Value |
|---|---|
| Glide distance | 161.5 km (152.4 – 169.0) |
| Time aloft | 1,620 s (27 min) |
| Glide ratio (L/D) | 12.4 |
The glide ratio sits below the A380's quoted figure of roughly 20 for two reasons, both traceable to the model. The elevator trims to 0° angle of attack, where
Predicting glide distance from the logged wind, using 5-fold cross-validation repeated 10 times:
| Model | CV R² | CV MAE |
|---|---|---|
| Always predict the mean | −0.072 | 2757 m |
| Random forest, 4 raw inputs | +0.565 ± 0.181 | 1653 m |
| Linear, 4 raw inputs | +0.290 ± 0.218 | 2253 m |
Linear, wind_u + |wind_v| |
+0.684 ± 0.200 | 1182 m |
The fitted relationship is
Both coefficients are significant (
The linear model beats the forest because the underlying physics is close to a straight line, and a decision tree approximates a slope with flat steps. R² is 0.697 across all runs; the remaining variance comes from the turbulence realisation, which is not recorded in the CSV. The learning curve is flat from 20 training runs onward, so more Monte Carlo runs would not improve this — logging more per run would.
Reproduce with python scripts/evaluate_ml.py.
docs/glider_simulation_project.pdf is the report as submitted in April 2025.
The code has moved on since, so several numbers in it no longer match the
results above. The report has deliberately been left as a dated snapshot rather
than edited to agree.
| Quantity | Report | Repository now | Why it changed |
|---|---|---|---|
| Glide distance | 108 – 118 km, mean 113 km | 152.4 – 169.0 km, mean 161.5 km | Runs then stopped at a fixed 600 s, with the aircraft still at about 7,600 m — only 41% of the descent. They now integrate to ground impact. |
| Turbulence intensity | 3 – 10 m/s | 0.5 – 3.0 m/s | The old range exceeded the ±5 m/s base wind, so the turbulence noise swamped the wind signal and the logged parameters could not explain the outcome. |
| Elevator trim | described as 5° angle of attack | 0° in controls.py |
The report describes the intended trim; the code has always used alpha_trim_deg=0.0. |
| Machine learning | not covered | linear model plus forest benchmark | Added after the report was submitted. |
The trim difference is the one that matters physically. At 0° angle of attack
For context, published figures for the A380 put the cruise lift-to-drag ratio near 19–20 and the engine-out glide ratio around 15:1, so the report's quoted 15:1 is the right comparison for a glide. This model reaches 12.4 because it holds a fixed trim rather than flying at best glide, and because the drag polar used here caps at 17.7 regardless of trim.
-
Clone the repository
git clone https://github.com/Anay2005/Glider-6-DoF-Simulation.git cd Glider-6-DoF-Simulation -
Install dependencies
pip install -r requirements.txt
-
Run a single 6-DoF glide and its plots
python scripts/run_simulation.py
-
Regenerate the Monte Carlo dataset (100 runs, roughly 45 minutes)
python scripts/run_monte_carlo.py
-
Plot the Monte Carlo statistics
python scripts/plot_monte_carlo.py
-
Fit the models and plot their predictions
python scripts/run_ml.py
-
Print the evidence behind the model choice
python scripts/evaluate_ml.py
Steps 1–3 and 5–7 are quick. Step 4 regenerates the committed dataset and is
only needed if you change the simulation. Figures for every step are already
committed under plots/.