Python library for calculating aircraft cross- and tailwind components on a runway
Project description
windcomponents
Python library for calculating aircraft cross- and tailwind components on a runway.
Example Case Study - Input Data:
Before using the lib, prepare your input data:
- Consider that the runway orientation (99% of the cases) is reference to magnetic north, while wind data (e.g. from airport METAR) is reference to true north.
- Hence, apply magnetic variation (inclination) to convert the runway heading to true north reference:
True runway heading = magnetic runway heading - variation west --> Pilot rule of thumb "variation west, magnetic best" (so magnetic is the larger number).
True runway heading = magnetic runway heading + variation east --> Pilot rule of thumb "variation east, magnetic least" (so magnetic is the smaller number).
- For consistency with METAR data, round the runway heading (now relative to true north) to the nearest 10 degrees, as METAR wind data is also rounded to the nearest 10 degrees.
- Now that you have the runway heading/orientation relative to true north, you can apply it in the windcomponents lib
Code Example:
import pandas
from windcomponents import RunwayWindComponents
runway_direction_true_north_rounded = 10
# compass direction (and ref. to true north), NOT RWY designator! So eg RWY 01 should be inserted as 10, RWY10 as 100, RWY 09 as 90, RWY27 as 270, etc!
cross_tail_wind_directions = RunwayWindComponents(runway_direction_true_north_rounded)
# call outside of for-loop, since rwy cross/tail/headwind sectors only need to be calculated once - RWY heading is fixed obviously
for wind_direction, wind_speed in zip(df['wind_direction_true_north'], df['windspeed_kts']):
# assumes you have a pandas df with METAR observations, where for each observation row with a wind direction and speed, you want to calculate the pertaining cross-, tail- and headwind components on the runway
wind_direction = int(wind_direction)
wind_speed = int(wind_speed)
crosswind_angle, crosswind_speed, tailwind_speed, headwind_speed = RunwayWindComponents.calculate_cross_tail_head_wind(cross_tail_wind_directions, wind_direction, wind_speed)
Status of the Lib:
Initial tests passed, but still conceptual, refer to license. Crosscheck outcomes for your dataset with tools like: https://aerotoolbox.com/crosswind/ (Not affiliated in any sense).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
windcomponents-0.6.tar.gz
(16.8 kB
view hashes)
Built Distribution
Close
Hashes for windcomponents-0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f9fc22765110786b9c0961f7da88363092f5c1ed37ab665c4c5191d8c73fe54 |
|
MD5 | f5a9389c229a7a20cabf4a61a744c911 |
|
BLAKE2b-256 | 13a41263b8894e46d3018072b8b70450c189dc0485ab93d28c77ec9ee41adf64 |