A comprehensive Python toolkit for analyzing aircraft flight paths, computing deviations from ideal trajectories, and quantifying flight smoothness metrics for training, safety, and research applications. Initially developed for Human-AI perception and teaming for a flight task with application potential including Autonomous driving and First Person Shooter Video Games.
- Decision Point Calculation β Compute waypoints along greatβcircle routes for flight planning.
- Ideal Path Generation β Generate smooth, continuous 3D trajectories between defined waypoints.
- Flight Path Deviation Analysis β Measure 3D deviations between actual and ideal flight paths.
- Smoothness Metrics β Quantify flight quality using rateβofβchange metrics.
- JASAT Waypoint Analysis β Detect closest approach and compare before/after behavior.
- Visualization Suite β Plots for paths, deviations, and statistical comparisons.
# Clone the repository
git clone https://github.com/mdmirah/flight-path-analysis.git
cd flight-path-analysis
# Install required packages
pip install numpy pandas matplotlib scipy geopy pyprojfrom flight_path_analysis import *
# Define waypoints (lat, lon, alt in feet)
waypoints = {
"FEBAT": (37.485213, -118.413328, 11000),
"JASAT": (37.6356, -118.5043, 11000),
"RW27": (37.628611, -118.839167, 7140)
}
# 1. Compute a decision point 10 NM from FEBAT toward RW27
dp = compute_decision_point(waypoints["FEBAT"], waypoints["RW27"], distance_nm=10)
# 2. Generate ideal trajectory
ideal_path = plot_ideal_path(waypoints, total_path_points=1000)
# 3. Load aircraft data
# time, aircraft_lat, aircraft_lon, aircraft_alt = load_your_data()
# 4. Compute deviations
# deviation_df, jasat_info = flight_path_deviation_in_feet(
# time, aircraft_lat, aircraft_lon, aircraft_alt,
# ideal_path['Latitude'], ideal_path['Longitude'], ideal_path['Altitude']
# )
# 5. Analyze smoothness
# smoothness_df, stats = flight_smoothness(
# time, deviation_df['total_deviation'], jasat_info['closest_time']
# )Function: compute_decision_point(before_dp, after_dp, distance_nm, plot=True)
Computes a waypoint a fixed distance along a greatβcircle route.
Returns: (lat, lon)
Function:
plot_ideal_path(waypoints, total_path_points=1000, plot=True)
Returns a dictionary with:
LatitudeLongitudeAltitude
Function:
ideal_vs_actual_path(...)
Produces a map overlay of ideal and real aircraft trajectory.
Function:
lat_lon_alt_to_cartesian(lat, lon, alt)
Converts geographic coordinates into Earthβcentered Cartesian coordinates.
Function:
flight_path_deviation_in_feet(...)
Computes:
- Total deviation
- NβS deviation
- EβW deviation
- Altitude deviation
Produces plots and JASAT segment analysis.
Function:
flight_smoothness(...)
Outputs smoothed deviation rate plots and statistical metrics.
Function:
plot_flight_path_with_ideal_match_inputs(...)
Creates three aligned position plots (X, Y, Z).
Shows greatβcircle path and computed decision point.
Altitudeβcolored 3D trajectory.
Componentβwise deviation plots and before/after JASAT comparison.
Rateβofβchange plots and segment statistics.
Aircraft data must include:
Time(seconds, ideally 60 Hz)Latitude(deg)Longitude(deg)Altitude(ft)
cmap = "plasma"smoothing_times = {
'x': 5.0,
'y': 5.0,
'z': 0.5
}JASAT = (37.6356, -118.5043, 11000)
FEBAT = (37.485213, -118.413328, 11000)
RW27 = (37.628611, -118.839167, 7140)- Flight training evaluation
- Approach procedure development
- Safety event analysis
- Ride smoothness assessment
- Autonomy and trajectory research
- NumPy
- Pandas
- Matplotlib
- SciPy
- GeoPy
- PyProj
flight-path-analysis/
β
βββ flight_path_analysis.py
βββ README.md
βββ LICENSE
βββ examples/
β βββ basic_usage.py
β βββ complete_analysis.ipynb
βββ data/
βββ sample_flight_data.csv
Pull Requests welcome!
Guidelines:
- PEP8 formatting
- Docstrings required
- Type hints recommended
- Add unit tests for new features
MIT License β see LICENSE file.
@inproceedings{rahman2026multimodal,
title={A Multimodal Framework for Assessing Fitness to Fly in Flight Training},
author={Rahman, Md Mijanur and Fala, Nicoletta},
booktitle={AIAA Scitech 2026 Forum},
pages={2734},
year={2026},
doi={10.2514/6.2026-2734}
}
@software{flight_path_analysis,
author = {Md Mijanur Rahman},
title = {Flight Path Analysis Tool},
year = {2024},
url = {https://github.com/mdmirah/Human-performance-analysis-of-a-trajectory-tracking-task}
}Author: Md Mijanur Rahman
Email: mzr0182@auburn.edu
GitHub: @mdmirah