Skip to content

mdmirah/User-performance-analysis-of-a-trajectory-tracking-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

User performance analysis of a trajectory tracking task (Aerospace Implementation)

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.


download image download image

🌟 Features

  • 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.

πŸ“¦ Installation

# 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 pyproj

⚑ Quick Start

from 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']
# )

🧠 Core Functions

1. Decision Point Calculation

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)


2. Ideal Path Generation

Function:
plot_ideal_path(waypoints, total_path_points=1000, plot=True)

Returns a dictionary with:

  • Latitude
  • Longitude
  • Altitude

3. Ideal vs Actual Path Overlay

Function:
ideal_vs_actual_path(...)

Produces a map overlay of ideal and real aircraft trajectory.


4. Coordinate Conversion

Function:
lat_lon_alt_to_cartesian(lat, lon, alt)

Converts geographic coordinates into Earth‑centered Cartesian coordinates.


5. Flight Path Deviation Analysis

Function:
flight_path_deviation_in_feet(...)

Computes:

  • Total deviation
  • N‑S deviation
  • E‑W deviation
  • Altitude deviation

Produces plots and JASAT segment analysis.


6. Flight Smoothness Analysis

Function:
flight_smoothness(...)

Outputs smoothed deviation rate plots and statistical metrics.


7. Position Comparison Plot

Function:
plot_flight_path_with_ideal_match_inputs(...)

Creates three aligned position plots (X, Y, Z).


πŸ“Š Output Examples

βœ” Decision Point Plot

Shows great‑circle path and computed decision point.

βœ” Ideal Path

Altitude‑colored 3D trajectory.

βœ” Deviation Analysis

Component‑wise deviation plots and before/after JASAT comparison.

βœ” Smoothness

Rate‑of‑change plots and segment statistics.


πŸ“ Data Requirements

Aircraft data must include:

  • Time (seconds, ideally 60 Hz)
  • Latitude (deg)
  • Longitude (deg)
  • Altitude (ft)

βš™οΈ Customization Options

Colormap

cmap = "plasma"

Smoothing Parameters

smoothing_times = {
    'x': 5.0,
    'y': 5.0,
    'z': 0.5
}

Waypoint Format

JASAT = (37.6356, -118.5043, 11000)
FEBAT = (37.485213, -118.413328, 11000)
RW27 = (37.628611, -118.839167, 7140)

🎯 Use Cases

  • Flight training evaluation
  • Approach procedure development
  • Safety event analysis
  • Ride smoothness assessment
  • Autonomy and trajectory research

🧩 Dependencies

  • NumPy
  • Pandas
  • Matplotlib
  • SciPy
  • GeoPy
  • PyProj

πŸ“‚ Project Structure

flight-path-analysis/
β”‚
β”œβ”€β”€ flight_path_analysis.py
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ basic_usage.py
β”‚   └── complete_analysis.ipynb
└── data/
    └── sample_flight_data.csv

🀝 Contributing

Pull Requests welcome!

Guidelines:

  • PEP8 formatting
  • Docstrings required
  • Type hints recommended
  • Add unit tests for new features

πŸ“œ License

MIT License – see LICENSE file.


πŸ“š Citation

@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}
}

πŸ“¬ Contact

Author: Md Mijanur Rahman Email: mzr0182@auburn.edu
GitHub: @mdmirah


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages