A package to compute the characteristics of an airplane using simple flight mechanics equations.
Project description
Flight Mechanics Calculator
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:
pip install flight-mech
Manual installation
For a manual installation, please clone the repository and install the required Python libraries using the command:
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 point
Additionally, the following graphs can be generated:
- polar graph
- thrust-speed graph
- power-speed graph
Some 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:
# 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)
>> C_L_f_max 0.7745966692414834
>> fmax 12.909944487358056
# 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))
>> 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
# 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))
>> max ascension speed [m.s-1] 32.89763560421959
>> reference speed at 0m [m.s-1] 34.523934888646956
>> max slope at 0m [%] 0.5695896796157822
Documentation
The documentation is available online here.
Otherwise, if you decided to clone the repository, you can generate the documentation using the following commands:
cd docs
make html
And open the file docs/_build/html/index.html in your browser.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flight_mech-1.0.6.tar.gz.
File metadata
- Download URL: flight_mech-1.0.6.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d84eecc13bd1f6ec37e22af06f8aacea2638a72090c07f1a408b8547fcfee59
|
|
| MD5 |
6d044cbba79cc7f560254beeef1d7c83
|
|
| BLAKE2b-256 |
dcbd5bf8ec3e3980ec312c027901a7a48bc7e582600fd9192fb6155ccd49b575
|
Provenance
The following attestation bundles were made for flight_mech-1.0.6.tar.gz:
Publisher:
python-publish.yml on PaulCreusy/flight-mech
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flight_mech-1.0.6.tar.gz -
Subject digest:
3d84eecc13bd1f6ec37e22af06f8aacea2638a72090c07f1a408b8547fcfee59 - Sigstore transparency entry: 164511093
- Sigstore integration time:
-
Permalink:
PaulCreusy/flight-mech@3c3453d4417f258690db4f96e909f817a8fb4cf7 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/PaulCreusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3c3453d4417f258690db4f96e909f817a8fb4cf7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file flight_mech-1.0.6-py3-none-any.whl.
File metadata
- Download URL: flight_mech-1.0.6-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4574bc7a5868040f7ecc4131af76634288b9305af802f15ba1de96c05d4eb3
|
|
| MD5 |
ce85b2e0117703942a6ad53ab8aa9e28
|
|
| BLAKE2b-256 |
31cbd88b3232e4458d7549dddc02b5c4c7b0b1ec05d0382687789f20972c9f38
|
Provenance
The following attestation bundles were made for flight_mech-1.0.6-py3-none-any.whl:
Publisher:
python-publish.yml on PaulCreusy/flight-mech
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flight_mech-1.0.6-py3-none-any.whl -
Subject digest:
0d4574bc7a5868040f7ecc4131af76634288b9305af802f15ba1de96c05d4eb3 - Sigstore transparency entry: 164511094
- Sigstore integration time:
-
Permalink:
PaulCreusy/flight-mech@3c3453d4417f258690db4f96e909f817a8fb4cf7 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/PaulCreusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3c3453d4417f258690db4f96e909f817a8fb4cf7 -
Trigger Event:
release
-
Statement type: