Conventions
Coding standards
Follow PEP 8.
In particular, follow Python naming conventions for different entity types, except in cases where there is a well-established domain convention (e.g., maybe
air_pressureandair_temperaturestyle for “normal” pressures and temperatures, butP3andT3style for engine station pressures and temperatures).For common quantity types, follow the naming conventions in the data dictionary below.
Install pre-commit and ensure that your editor/IDE makes problems detected by Ruff visible. (Ideally you would also use a static type checker like PyRight.)
Units
All quantities internal to AEIC code are in SI units.
All quantities input in non-SI conventional units are converted to SI units immediately.
All quantities output in non-SI conventional units are converted from SI units only at the point of output.
All parameters to public functions are annotated with units information in the format “
parameter description [units]”, e.g., “Rate of climb/descent [m/s]”.
Data dictionary
For common physical quantities, we use a consistent naming convention for variables to make it immediately clear what quantities are being considered. Variables using these conventional names are guaranteed to be in exactly the units in the table below. “Other units” are used only for input and output when required.
Quantity |
Units |
Variable name |
Other units |
|---|---|---|---|
Distance |
m |
(various) |
Nautical miles |
Time |
s |
(various) |
Minutes, hours |
Mass |
kg |
(various) |
|
Velocity |
m/s |
(various) |
Knots |
Ground distance |
m |
|
Nautical miles |
Ground speed |
m/s |
|
Nautical miles |
Airspeed |
m/s |
|
|
Altitude |
m |
|
Feet |
Flight level |
FL (1) |
|
|
Aircraft mass |
kg |
|
|
Thrust |
N |
|
kN |
Fuel mass |
kg |
|
|
Fuel flow |
kg/s |
|
|
Rate of climb |
m/s |
|
ft/min? |
Latitude |
degrees (WGS-84) |
|
|
Longitude |
degrees (WGS-84) |
|
|
Heading/azimuth |
degrees (CW from true N) |
|
|
Fuel heating value |
J/kg |
|
More to be added here…
Notes:
Pressure altitude in feet, relative to 1013 hPa, divided by 100.