-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaircraft_engine.qmd
More file actions
41 lines (26 loc) · 904 Bytes
/
aircraft_engine.qmd
File metadata and controls
41 lines (26 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 🪬 Aircraft and engines
The `prop` package in `openap` allows users to obtain aircraft and engine-related data quickly. We will demonstrate usage through the following example.
## Supported aircraft type codes
First, we need to import the `prop` package from the OpenAP library.
```{python}
from openap import prop
from pprint import pprint
```
We can get a list of available aircraft `openap.prop.available_aircraft()` function:
```{python}
avaiable_aircraft = prop.available_aircraft()
print(f"Supports {len(avaiable_aircraft)} aircraft types")
print(avaiable_aircraft)
```
## Aircraft data
We can get the parameters for one aircraft using `openap.prop.aircraft()` function:
```{python}
aircraft = prop.aircraft("A320")
pprint(aircraft)
```
## Engine data
The engine data can be obtained with `openap.prop.engine()` function:
```{python}
engine = prop.engine("CFM56-5B4")
engine
```