Saving Jet Fuel
A Boeing 787-9 Dreamliner flying nonstop from Newark Liberty International Airport (EWR) to Leonardo da Vinci-Fiumicino Airport (FCO) could need $68K in jet fuel over the 8.5-hour flight. Adjusting the flight path for wind conditions could reduce fuel consumption and possibly save a few thousand dollars.
Firms like Jeppesen have offerings in this space, but Scikit-decide, together with a narrow- and wide-body fuel consumption model built by a professor at the Delft University of Technology and wind data from NOAA, offer an open source solution.
Scikit-decide has been in development for six years. It's a framework for reinforcement learning, automated planning and scheduling. The project can optimise flight paths, re-organise airline workforce schedules and calculate drone swarm paths.
OpenAP is an aircraft performance model and toolkit developed by Dr. Junzi Sun. Dr. Sun has a PhD in air traffic management and, among many other things, teaches a course on the subject as a tenured assistant professor at TU Delft in the Netherlands.
Scikit-decide's optimal flight path solver can be configured to use different fuel consumption models. In this post, I'll compare two flight paths flown using the Airbus A320 and OpenAP's fuel consumption model.
My Workstation
I'm using a 5.7 GHz AMD Ryzen 9 9950X CPU. It has 16 cores and 32 threads and 1.2 MB of L1, 16 MB of L2 and 64 MB of L3 cache. It has a liquid cooler attached and is housed in a spacious, full-sized Cooler Master HAF 700 computer case.
The system has 96 GB of DDR5 RAM clocked at 4,800 MT/s and a 5th-generation, Crucial T700 4 TB NVMe M.2 SSD which can read at speeds up to 12,400 MB/s. There is a heatsink on the SSD to help keep its temperature down. This is my system's C drive.
The system is powered by a 1,200-watt, fully modular Corsair Power Supply and is sat on an ASRock X870E Nova 90 Motherboard.
I'm running Ubuntu 24 LTS via Microsoft's Ubuntu for Windows on Windows 11 Pro. In case you're wondering why I don't run a Linux-based desktop as my primary work environment, I'm still using an Nvidia GTX 1080 GPU which has better driver support on Windows and ArcGIS Pro only supports Windows natively.
Installing Prerequisites
I'll use Python 3.12 along with jq in this post.
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt update
$ sudo apt install \
jq \
python3-pip \
python3.12-venv
I'll set up a Python Virtual Environment and install scikit-decide, along with the OpenAP open aircraft performance model and OpenTop, a flight trajectory toolkit that was also developed by Dr. Sun.
$ python3 -m venv ~/.flight_planning
$ source ~/.flight_planning/bin/activate
$ pip install \
'scikit-decide[all]' \
'openap[all]' \
opentop
The above will need at least 8 GB of storage capacity. These are the packages that were installed.
$ pip install pipdeptree $ pipdeptree -d0
lz4==4.4.5 openevolve==0.3.2 opentop==2.6.0 pip==24.0 pipdeptree==4.2.5 plado==0.1.6 pygeodesy==26.9.9 pygrib==2.1.8 pyRDDLGym-gurobi==0.2 pyRDDLGym-jax==3.1 pyRDDLGym-rl==0.2 pytz==2026.3.post1 ray==2.37.0 rddlrepository==2.2 sb3_contrib==2.3.0 scikit-decide==1.1.1 scikit-image==0.26.0 tensorboardX==2.6.5 torch-geometric==2.8.0.post1 typer==0.27.2 unified-planning==1.2.0 up-enhsp==0.0.27 up_fast_downward==0.5.2 up-pyperplan==1.1.0 z3-solver==5.1.0.0
I'll use DuckDB, along with its H3, JSON, Lindel, Parquet and Spatial extensions in this post.
$ cd ~ $ wget -c https://github.com/duckdb/duckdb/releases/download/v1.5.4/duckdb_cli-linux-amd64.zip $ unzip -j duckdb_cli-linux-amd64.zip $ chmod +x duckdb $ ~/duckdb
INSTALL h3 FROM community; INSTALL lindel FROM community; INSTALL json; INSTALL parquet; INSTALL spatial;
I'll set up DuckDB to load every installed extension each time it launches.
$ vi ~/.duckdbrc
.timer on .width 180 LOAD h3; LOAD lindel; LOAD json; LOAD parquet; LOAD spatial;
The maps in this post were rendered with QGIS version 4.2.1. QGIS is a desktop application that runs on Windows, macOS and Linux. The application has grown in popularity in recent years and has ~22M application launches from users all around the world each month.
The boundaries and place names were sourced from Natural Earth. Maritime Boundaries were sourced from Marine Regions.
OpenAP's Aircraft Types
I'll first clone the OpenAP repository.
$ git clone https://github.com/junzis/openap
Excluding unit tests and utility scripts, there are 3,369 lines of Python in this package.
OpenAP's model relies on a large number of datasets that are packaged with its codebase. These cover a wide variety of aircraft. Below are the aircraft manufacturer counts.
$ grep -ho 'aircraft: .*[a-z] ' \
openap/data/aircraft/*.yml \
| cut -d' ' -f2 \
| sort \
| uniq -c \
| sort -rn
17 Boeing 13 Airbus 5 Embraer 1 Gulfstream 1 Cessna
These are the properties for the Airbus A380-800.
$ cat openap/data/aircraft/a388.yml
aircraft: Airbus A380-800
mtow: 560000
mlw: 386000
oew: 277000
mfc: 320000
vmo: 340
mmo: 0.89
ceiling: 13100
pax:
max: 853
low: 410
high: 620
fuselage:
length: 72.72
height: 8.41
width: 7.14
wing:
area: 845
span: 79.75
mac: null
sweep: 33.5
t/c: 0.08
flaps:
type: single-slotted
area: null
bf/b: null
lambda_f: 0.900
cf/c: 0.150
Sf/S: 0.150
cruise:
height: 12800
mach: 0.85
range: 14800
engine:
type: turbofan
mount: wing
number: 4
default: GP7270
options:
A380-841: Trent 970-84
A380-842: Trent 972-84
A380-861: GP7270
drag:
cd0: 0.016
k: 0.050
e: 0.855
gears: 0.012
These are its drag coefficients.
$ cat openap/data/dragpolar/a388.yml
aircraft: Airbus A380-800 clean: cd0: 0.016 k: 0.050 e: 0.855 gears: 0.012 flaps: lambda_f: 0.900 cf/c: 0.150 Sf/S: 0.150
These are some additional properties.
$ echo "import pandas as pd; print(
pd.read_fwf('openap/data/wrap/a388.txt')
.to_csv(index=False))" \
| python3 \
| ~/duckdb \
-c '.maxwidth 150' \
-c "SELECT * EXCLUDE(parameters),
parameters: SPLIT(parameters, '|')
FROM READ_CSV('/dev/stdin')"
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ variable โ flight phase โ name โ opt โ min โ max โ model โ parameters โ โ varchar โ varchar โ varchar โ double โ double โ double โ varchar โ varchar[] โ โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ to_v_lof โ takeoff โ Liftoff speed โ 89.9 โ 75.4 โ 104.4 โ norm โ [89.93, 10.07] โ โ to_d_tof โ takeoff โ Takeoff distance โ 2.56 โ 1.35 โ 3.78 โ norm โ [2.56, 0.74] โ โ to_acc_tof โ takeoff โ Mean takeoff accelaration โ 1.35 โ 1.04 โ 1.66 โ norm โ [1.35, 0.19] โ โ ic_va_avg โ initial_climb โ Mean airspeed โ 88.0 โ 80.0 โ 96.0 โ norm โ [88.15, 5.64] โ โ ic_vs_avg โ initial_climb โ Mean vertical rate โ 5.65 โ 4.4 โ 8.94 โ gamma โ [4.76, 3.22, 0.65] โ โ cl_d_range โ climb โ Climb range โ 296.0 โ 200.0 โ 446.0 โ beta โ [3.23, 5.18, 179.46, 335.24] โ โ cl_v_cas_const โ climb โ Constant CAS โ 163.0 โ 155.0 โ 170.0 โ norm โ [163.39, 4.51] โ โ cl_v_mach_const โ climb โ Constant Mach โ 0.84 โ 0.8 โ 0.86 โ beta โ [12.23, 5.32, 0.72, 0.17] โ โ cl_h_cas_const โ climb โ Constant CAS crossover altitude โ 3.3 โ 1.3 โ 5.3 โ norm โ [3.29, 1.24] โ โ cl_h_mach_const โ climb โ Constant Mach crossover altitude โ 8.9 โ 8.2 โ 9.7 โ norm โ [8.94, 0.47] โ โ cl_vs_avg_pre_cas โ climb โ Mean climb rate, pre-constant-CAS โ 7.85 โ 5.95 โ 9.75 โ norm โ [7.85, 1.16] โ โ cl_vs_avg_cas_const โ climb โ Mean climb rate, constant-CAS โ 7.51 โ 5.2 โ 9.82 โ norm โ [7.51, 1.40] โ โ cl_vs_avg_mach_const โ climb โ Mean climb rate, constant-Mach โ 5.56 โ 3.23 โ 7.91 โ norm โ [5.57, 1.42] โ โ cr_d_range โ cruise โ Cruise range โ 4348.0 โ 892.0 โ 20565.0 โ gamma โ [2.81, 246.73, 2274.81] โ โ cr_v_cas_mean โ cruise โ Mean cruise CAS โ 136.0 โ 130.0 โ 145.0 โ beta โ [3.32, 5.27, 126.00, 29.75] โ โ cr_v_cas_max โ cruise โ Maximum cruise CAS โ 145.0 โ 134.0 โ 164.0 โ beta โ [2.02, 3.21, 130.38, 46.65] โ โ cr_v_mach_mean โ cruise โ Mean cruise Mach โ 0.84 โ 0.82 โ 0.86 โ norm โ [0.84, 0.01] โ โ cr_v_mach_max โ cruise โ Maximum cruise Mach โ 0.87 โ 0.85 โ 0.9 โ gamma โ [16.14, 0.80, 0.00] โ โ cr_h_init โ cruise โ Initial cruise altitude โ 11.55 โ 9.3 โ 12.23 โ beta โ [3.82, 1.66, 7.49, 5.01] โ โ cr_h_mean โ cruise โ Mean cruise altitude โ 11.73 โ 10.87 โ 12.28 โ beta โ [7.22, 3.92, 9.59, 3.14] โ โ cr_h_max โ cruise โ Maximum cruise altitude โ 12.06 โ 11.52 โ 12.6 โ norm โ [12.06, 0.33] โ โ de_d_range โ descent โ Descent range โ 310.0 โ 238.0 โ 528.0 โ gamma โ [4.73, 213.47, 25.87] โ โ de_v_mach_const โ descent โ Constant Mach โ 0.83 โ 0.8 โ 0.87 โ norm โ [0.83, 0.02] โ โ de_v_cas_const โ descent โ Constant CAS โ 154.0 โ 142.0 โ 167.0 โ norm โ [154.84, 7.74] โ โ de_h_mach_const โ descent โ Constant Mach crossover altitude โ 10.1 โ 8.6 โ 11.5 โ norm โ [10.06, 0.88] โ โ de_h_cas_const โ descent โ Constant CAS crossover altitude โ 6.6 โ 3.9 โ 9.4 โ norm โ [6.64, 1.69] โ โ de_vs_avg_mach_const โ descent โ Mean descent rate, constant-Mach โ -6.06 โ -11.9 โ -2.97 โ beta โ [3.43, 2.08, -15.98, 14.36] โ โ de_vs_avg_cas_const โ descent โ Mean descent rate, constant-CAS โ -8.36 โ -11.74 โ -4.97 โ norm โ [-8.36, 2.06] โ โ de_vs_avg_after_cas โ descent โ Mean descent rate, after-constant-CAS โ -5.48 โ -6.93 โ -4.02 โ norm โ [-5.48, 0.88] โ โ fa_va_avg โ final_approach โ Mean airspeed โ 73.0 โ 68.0 โ 77.0 โ norm โ [73.28, 3.02] โ โ fa_vs_avg โ final_approach โ Mean vertical rate โ -3.71 โ -4.13 โ -2.92 โ gamma โ [9.49, -4.74, 0.12] โ โ fa_agl โ final_approach โ Approach angle โ 2.9 โ 2.42 โ 3.38 โ norm โ [2.90, 0.29] โ โ ld_v_app โ landing โ Touchdown speed โ 70.0 โ 62.1 โ 78.0 โ norm โ [70.00, 5.52] โ โ ld_d_brk โ landing โ Braking distance โ 2.26 โ 0.73 โ 3.8 โ norm โ [2.26, 0.93] โ โ ld_acc_brk โ landing โ Mean braking acceleration โ -1.01 โ -1.51 โ -0.52 โ norm โ [-1.01, 0.30] โ โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
These are the aircraft type synonyms list.
$ ~/duckdb -c "FROM READ_CSV('/dev/stdin')" \
< openap/data/aircraft/_synonym.csv
โโโโโโโโโโโฌโโโโโโโโโโ โ orig โ new โ โ varchar โ varchar โ โโโโโโโโโโโผโโโโโโโโโโค โ a124 โ b744 โ โ a306 โ a332 โ โ a310 โ a318 โ โ at72 โ e145 โ โ at75 โ e145 โ โ at76 โ e145 โ โ b733 โ b734 โ โ b735 โ b734 โ โ b762 โ b763 โ โ b77l โ b77w โ โ c25a โ c550 โ โ c525 โ c550 โ โ c56x โ c550 โ โ crj2 โ e145 โ โ crj9 โ e75l โ โ e290 โ e190 โ โ glf5 โ glf6 โ โ gl5t โ glf6 โ โ lj45 โ glf6 โ โ md11 โ b773 โ โ pc24 โ c550 โ โ su95 โ e170 โ โโโโโโโโโโโดโโโโโโโโโโ
Aircraft Engines
Aircraft often have the option of at least two different engines to choose from. There are 427 engines listed in this package's dataset.
$ wc -l openap/data/engine/engines.csv # 427
These are the details for the Trent 970-84.
$ echo "FROM 'openap/data/engine/engines.csv'
WHERE name = 'Trent 970-84'
LIMIT 1" \
| ~/duckdb -json \
| jq -S .
[
{
"bpr": 8.45,
"cruise_alt": null,
"cruise_mach": null,
"cruise_sfc": null,
"cruise_thrust": null,
"ei_co_app": 1.16,
"ei_co_co": 0.31,
"ei_co_idl": 13.38,
"ei_co_to": 0.32,
"ei_hc_app": 0.08,
"ei_hc_co": 0.12,
"ei_hc_idl": 0.04,
"ei_hc_to": 0.02,
"ei_nox_app": 12.09,
"ei_nox_co": 29.42,
"ei_nox_idl": 5.44,
"ei_nox_to": 38.29,
"ff_app": 0.72,
"ff_co": 2.157,
"ff_idl": 0.255,
"ff_to": 2.605,
"fuel_lto": 965.0,
"manufacturer": "Rolls-Royce plc",
"max_thrust": 338700.0,
"name": "Trent 970-84",
"pr": 38.0,
"type": "TF",
"uid": "18RR081"
}
]
These are the engine manufacturer counts.
$ ~/duckdb
CREATE OR REPLACE TABLE a AS
FROM 'openap/data/engine/engines.csv';
SELECT COUNT(*),
manufacturer
FROM a
GROUP BY 2
ORDER BY 1 DESC;
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ count_star() โ manufacturer โ โ int64 โ varchar โ โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ 108 โ GE Aircraft Engines โ โ 94 โ CFM International โ โ 85 โ Pratt & Whitney โ โ 62 โ Rolls-Royce plc โ โ 13 โ Internation