OpenAP: Open Aircraft Performance Model and Toolkit
This repository contains the OpenAP model data and Python packages for aircraft performance and emission calculations.
🕮 User Guide
The OpenAP handbook is available at openap.dev.
Installation
Install the latest stable release from PyPI:
Install the development branch from GitHub (may not be stable):
Content
Model Data
Data in this repository includes:
Aircraft data: Collected from open literature.
Engine data: Primarily from the ICAO emission data-bank, including fuel flow and emissions.
Drag polar model data: Exclusively derived from open data (reference).
Fuel model data: Polynomial models derived from the acropole model by @JarryGabriel.
Kinematic data: The kinematic model describes speed, altitude, and vertical rate (reference).
Navigation data: Airport and waypoints obtained from X-Plane.
Python Packages
The OpenAP Python library includes the following packages:
prop: Module for accessing aircraft and engine properties.aero: Module for common aeronautical conversions.nav: Module for accessing navigation information.thrust: Module providesThrust()class for computing aircraft thrust.drag: Module providesDrag()class for computing aircraft drag.fuel: Module providesFuelFlow()class for computing fuel consumption.emission: Module providesEmission()class for computing aircraft emissions.kinematic: Module providesWRAP()class for accessing kinematic performance data.phase: Module providesFlightPhase()class for determining flight phases.gen: Module providesFlightGenerator()class for trajectory generation.
Examples:
The input parameters can be scalar, list, or ndarray. Most of the OpenAP methods' parameters are in aeronautical units, such as knots, feet, feet/min. The mass is always in SI units, i.e., kilograms.
Add-ons
The OpenAP library can also be used to interact with BADA performance models if you have access to the BADA data from EUROCONTROL. You can use the following code:
The methods and attributes of openap.addon.bada4.FuelFlow() are the same as those of openap.FuelFlow().
Symbolic Implementation for CasADi
The OpenAP model can also be used with the CasADi library for symbolic computations. The symbolic model is available in the openap.casadi package. For example, you can use the following code to create a symbolic model for fuel flow:
All the methods of openap.casadi.FuelFlow() are the same as those of openap.FuelFlow(), and they are now symbolic functions that can be used to compute fuel flow for given flight conditions in CasADi DM, SX, or MX types.
How did we implement this? When the casadi module is initiated, a metaclass is used to replace the sci function from numpy, which overrides all the numpy functions with casadi functions. For more details, check the openap/casadi/__init__.py code.