# 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 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:
```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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "flight-mech",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "airplane, flight, flight mechanics, mechanics, plane",
"author": null,
"author_email": "PaulCreusy <paul.creusy@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fe/d9/a328b81e97c5afadbf322d44a74441084fe90788cac83669004cfc16d12a/flight_mech-1.0.5.tar.gz",
"platform": null,
"description": "# Flight Mechanics Calculator\n\n![PyPI - Version](https://img.shields.io/pypi/v/flight-mech)![Pylint Badge](https://github.com/PaulCreusy/flight-mech/actions/workflows/pylint.yml/badge.svg)\n\n## License\n\nThis software has been developed by Paul Creusy and is shared under the MIT License.\n\n## Getting started\n\n### Installation\n\n#### Pip installation\n\nTo install this module with pip, please use:\n\n```bash\npip install flight-mech\n```\n\n#### Manual installation\n\nFor a manual installation, please clone the repository and install the required Python libraries using the command:\n\n```bash\npip install -r requirements.txt\n```\n\n### Usage\n\nThis software includes a simple atmospheric model and a set of flight mechanics equations allowing to compute plane characteristics.\n\n**Please note that all equations and variables are defined in the international unit system.**\n\nThe plane model allows to compute the following quantities:\n- max glide ratio\n- speed at specific angle of incidence and altitude\n- drag\n- lift\n- thrust\n- stall speed\n- reference speed\n- minimum descent gliding slope\n- gliding speed\n- maximum gliding time\n- maximum gliding range\n- authorized velocity interval at fixed thrust for flight at constant altitude\n- thrust needed at fixed altitude and angle of incidence\n- minimum thrust needed at fixed altitude\n- speed at minimum thrust\n- maximum flight altitude\n- speed for maximum ascension speed\n- ascension slope for a specific angle of incidence and altitude\n- load factor in turn\n- maximum range at fixed altitude\n- maximum range at fixed speed\n- endurance\n- take off distance without friction\n- take off distance with friction\n- landing distance\n- take off speed\n- landing speed\n- alpha and delta coefficient at a flight point\n\nAdditionally, the following graphs can be generated:\n- polar graph\n- thrust-speed graph\n- power-speed graph\n\nSome 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. \n\nHere is an overview of what the software can compute:\n\n```python\n# Load the plane\nplane = Plane(\"cessna_172\", \"./plane_database\")\n\n# Compute the fmax and CL at fmax\nprint(\"C_L_f_max\", plane.C_L_f_max)\nprint(\"fmax\", plane.f_max)\n```\n\n```bash\n>> C_L_f_max 0.7745966692414834\n>> fmax 12.909944487358056\n```\n\n```python\n# Compute the speed interval at 8000 meters\nplane.m_fuel = 136.26 # kg\nplane.update_variables(True)\nprint(\"reference speed at 8000m [m.s-1]\", plane.compute_reference_speed(8000))\nprint(\"speed interval at 8000m [m.s-1]\",\n plane.compute_velocity_interval_for_fixed_thrust(8000))\nprint(\"stall speed at 8000m [m.s-1]\",\n plane.compute_stall_speed(8000, C_L_max=1.5))\n```\n\n```bash\n>> reference speed at 8000m [m.s-1] 56.214394963985406\n>> speed interval at 8000m [m.s-1] (22.544275306567194, 140.17120347383343)\n>> stall speed at 8000m [m.s-1] 41.80281924283373\n```\n\n```python\n# Compute the ascension speed and slope at sea level\nplane.m_fuel = 0 # kg\nplane.update_variables(True)\nprint(\"max ascension speed [m.s-1]\", plane.compute_max_ascension_speed(z=0))\nprint(\"reference speed at 0m [m.s-1]\", plane.compute_reference_speed(z=0))\nprint(\"max slope at 0m [%]\", plane.compute_max_ascension_slope(z=0))\n```\n\n```bash\n>> max ascension speed [m.s-1] 32.89763560421959\n>> reference speed at 0m [m.s-1] 34.523934888646956\n>> max slope at 0m [%] 0.5695896796157822\n```",
"bugtrack_url": null,
"license": null,
"summary": "A package to compute the characteristics of an airplane using simple flight mechanics equations.",
"version": "1.0.5",
"project_urls": {
"Homepage": "https://github.com/PaulCreusy/flight-mech",
"Issues": "https://github.com/PaulCreusy/flight-mech/issues"
},
"split_keywords": [
"airplane",
" flight",
" flight mechanics",
" mechanics",
" plane"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fa64a21c945be48c1bc61214dd41ec4e4d3b2d9e999816c993ba951d5aec59f6",
"md5": "f00964f25d57b8f122b0c7487187accc",
"sha256": "e627517dae3ae4b83cb4c3db4df78145ffbd71d0f4770ad4ad85a3bf52d26dd7"
},
"downloads": -1,
"filename": "flight_mech-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f00964f25d57b8f122b0c7487187accc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9251,
"upload_time": "2025-01-14T18:58:39",
"upload_time_iso_8601": "2025-01-14T18:58:39.448246Z",
"url": "https://files.pythonhosted.org/packages/fa/64/a21c945be48c1bc61214dd41ec4e4d3b2d9e999816c993ba951d5aec59f6/flight_mech-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fed9a328b81e97c5afadbf322d44a74441084fe90788cac83669004cfc16d12a",
"md5": "35c1f8c4c3cef7944b0dd5ef25796734",
"sha256": "19e5b5481df2d84bd5e7c13190e43e7226fe0e9659247f12369ad05599fe6350"
},
"downloads": -1,
"filename": "flight_mech-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "35c1f8c4c3cef7944b0dd5ef25796734",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 8770,
"upload_time": "2025-01-14T18:58:40",
"upload_time_iso_8601": "2025-01-14T18:58:40.728387Z",
"url": "https://files.pythonhosted.org/packages/fe/d9/a328b81e97c5afadbf322d44a74441084fe90788cac83669004cfc16d12a/flight_mech-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-14 18:58:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PaulCreusy",
"github_project": "flight-mech",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
}
],
"lcname": "flight-mech"
}