Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulcreusy/flight-mech
Python package to compute the characteristics of an airplane based on simple flight mechanics equations.
https://github.com/paulcreusy/flight-mech
airplane flight-mech flight-mechanics python
Last synced: 11 days ago
JSON representation
Python package to compute the characteristics of an airplane based on simple flight mechanics equations.
- Host: GitHub
- URL: https://github.com/paulcreusy/flight-mech
- Owner: PaulCreusy
- License: mit
- Created: 2025-01-13T12:01:09.000Z (13 days ago)
- Default Branch: main
- Last Pushed: 2025-01-14T09:47:18.000Z (12 days ago)
- Last Synced: 2025-01-14T10:57:07.500Z (12 days ago)
- Topics: airplane, flight-mech, flight-mechanics, python
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flight Mechanics Calculator
![PyPI - Version](https://img.shields.io/pypi/v/flight-mech)![Pylint Badge](https://github.com/PaulCreusy/flight-mech/actions/workflows/pylint.yml/badge.svg)
## License
This software has been developed by Paul Creusy and is shared under the MIT License.
## Getting started
### Installation
#### Pip installation
To install this module with pip, please use:
```bash
pip install flight-mech
```#### Manual installation
For a manual installation, please clone the repository and install the required Python libraries using the command:
```bash
pip install -r requirements.txt
```### Usage
This software includes a simple atmospheric model and a set of flight mechanics equations allowing to compute plane characteristics.
**Please note that all equations and variables are defined in the international unit system.**
The plane model allows to compute the following quantities:
- max glide ratio
- speed at specific angle of incidence and altitude
- drag
- lift
- thrust
- stall speed
- reference speed
- minimum descent gliding slope
- gliding speed
- maximum gliding time
- maximum gliding range
- authorized velocity interval at fixed thrust for flight at constant altitude
- thrust needed at fixed altitude and angle of incidence
- minimum thrust needed at fixed altitude
- speed at minimum thrust
- maximum flight altitude
- speed for maximum ascension speed
- ascension slope for a specific angle of incidence and altitude
- load factor in turn
- maximum range at fixed altitude
- maximum range at fixed speed
- endurance
- take off distance without friction
- take off distance with friction
- landing distance
- take off speed
- landing speed
- alpha and delta coefficient at a flight pointAdditionally, the following graphs can be generated:
- polar graph
- thrust-speed graph
- power-speed graphSome examples are provided in the `examples` folder (please note that they do not cover all the use cases) as well with a few plane models in the `plane_database` folder.
Here is an overview of what the software can compute:
```python
# Load the plane
plane = Plane("cessna_172", "./plane_database")# Compute the fmax and CL at fmax
print("C_L_f_max", plane.C_L_f_max)
print("fmax", plane.f_max)
``````bash
>> C_L_f_max 0.7745966692414834
>> fmax 12.909944487358056
``````python
# Compute the speed interval at 8000 meters
plane.m_fuel = 136.26 # kg
plane.update_variables(True)
print("reference speed at 8000m [m.s-1]", plane.compute_reference_speed(8000))
print("speed interval at 8000m [m.s-1]",
plane.compute_velocity_interval_for_fixed_thrust(8000))
print("stall speed at 8000m [m.s-1]",
plane.compute_stall_speed(8000, C_L_max=1.5))
``````bash
>> reference speed at 8000m [m.s-1] 56.214394963985406
>> speed interval at 8000m [m.s-1] (22.544275306567194, 140.17120347383343)
>> stall speed at 8000m [m.s-1] 41.80281924283373
``````python
# Compute the ascension speed and slope at sea level
plane.m_fuel = 0 # kg
plane.update_variables(True)
print("max ascension speed [m.s-1]", plane.compute_max_ascension_speed(z=0))
print("reference speed at 0m [m.s-1]", plane.compute_reference_speed(z=0))
print("max slope at 0m [%]", plane.compute_max_ascension_slope(z=0))
``````bash
>> max ascension speed [m.s-1] 32.89763560421959
>> reference speed at 0m [m.s-1] 34.523934888646956
>> max slope at 0m [%] 0.5695896796157822
```