Skip to main content

A package to compute the characteristics of an airplane using simple flight mechanics equations.

Project description

Flight Mechanics Calculator

PyPI - VersionPyPI - DownloadsPylint BadgePytest Badge

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

flight_mech-1.0.6.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flight_mech-1.0.6-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

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

Hashes for flight_mech-1.0.6.tar.gz
Algorithm Hash digest
SHA256 3d84eecc13bd1f6ec37e22af06f8aacea2638a72090c07f1a408b8547fcfee59
MD5 6d044cbba79cc7f560254beeef1d7c83
BLAKE2b-256 dcbd5bf8ec3e3980ec312c027901a7a48bc7e582600fd9192fb6155ccd49b575

See more details on using hashes here.

Provenance

The following attestation bundles were made for flight_mech-1.0.6.tar.gz:

Publisher: python-publish.yml on PaulCreusy/flight-mech

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for flight_mech-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0d4574bc7a5868040f7ecc4131af76634288b9305af802f15ba1de96c05d4eb3
MD5 ce85b2e0117703942a6ad53ab8aa9e28
BLAKE2b-256 31cbd88b3232e4458d7549dddc02b5c4c7b0b1ec05d0382687789f20972c9f38

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page