Files
2025-12-18 20:52:04 +01:00

5.0 KiB
Raw Permalink Blame History

Aircraft Trajectory Prediction with Recurrent Neural Networks

Overview

This repository contains the code and analysis accompanying a research project on data-driven aircraft trajectory prediction using recurrent neural networks (RNNs) trained on large-scale ADS-B surveillance data. The goal is short- to medium-term trajectory forecasting that is physically meaningful, robust, and applicable to real-world air traffic management scenarios.

Traditional kinematic and rule-based predictors struggle with the history-dependent and nonlinear nature of real flight operations. Here, trajectory prediction is treated explicitly as a sequential learning problem, allowing recurrent models to infer latent motion patterns directly from data.

Abstract

Accurate prediction of aircraft trajectories is a key component of modern air traffic management, with direct implications for safety, efficiency, and airspace capacity. Traditional trajectory prediction methods are largely based on kinematic models and rule-based assumptions, which struggle to capture the complex, history-dependent dynamics observed in real flight operations. In this work, we investigate a data-driven approach to aircraft trajectory prediction using recurrent neural networks (RNNs) trained on large-scale Automatic Dependent SurveillanceBroadcast (ADS-B) data.

We formulate trajectory forecasting as a sequential learning problem and evaluate multiple recurrent architectures, including standard RNNs, Long Short-Term Memory (LSTM) networks, and Gated Recurrent Units (GRUs), in an offset many-to-many configuration. To ensure physically meaningful optimization, we introduce a geometrically motivated loss function based on the Haversine distance, augmented by a separately weighted altitude error term. Aircraft type and registration information are incorporated through a compact latent encoding learned via an autoencoder and combined with kinematic and temporal features.

Using a curated dataset of nearly 29,000 commercial flight trajectories over major Scandinavian routes, we perform an extensive hyperparameter study to assess the impact of architectural choices, temporal window sizes, and loss weighting. The results show that gated recurrent models significantly outperform vanilla RNNs, with LSTMs providing the most stable performance across configurations. Optimal predictions are obtained for initialization horizons of approximately 900 s and short prediction horizons of up to 150 s, achieving a minimum validation loss of 5.32 km. Prediction accuracy degrades gradually for longer horizons, indicating robust learned representations of aircraft motion.

These findings demonstrate that recurrent neural networks, when combined with physically informed loss functions and appropriate preprocessing, offer a powerful and flexible framework for aircraft trajectory prediction using publicly available surveillance data.

Repository Structure

Code/
├── cpp/
│   ├── filter-csv.cpp        # High-performance flight filtering
│   └── extract-adsb.cpp      # ADS-B extraction and preprocessing
├── python/
│   ├── main.py               # Data fetching and preprocessing entry point
│   ├── notebooks/
│   │   ├── hyperparameter_scan.py
│   │   ├── 01_*.ipynb
│   │   ├── 02_*.ipynb
│   │   └── ...
│   └── ...
report/                       # Paper (PDF, LaTeX sources)
data/                         # Downloaded and preprocessed datasets

Installation

Dependencies

  • uv (from Astral) for Python environment and dependency management
  • g++ with C++17 support for compiling preprocessing utilities
  • Python 3.10+ recommended

Setup

Clone the repository and set up the Python environment:


uv sync

Compile the C++ utilities:


g++ -O3 -std=c++17 Code/cpp/filter-csv.cpp Code/cpp/extract-adsb.cpp -o extract-adsb

g++ -O3 -std=c++17 Code/cpp/filter-csv.cpp -o filter-csv

Usage

Data Fetching and Preprocessing

Run the main Python entry point to fetch and preprocess ADS-B data:

python Code/python/main.py --help

Use the --help flag to inspect available options and configuration parameters.

Flight Filtering

Raw flight data can be filtered efficiently using the C++ utility:

./adsb-utils input.csv output.csv

This step is recommended before model training to ensure clean and consistent trajectories.

Analysis and Training

  • Hyperparameter scans are performed using:
python Code/python/notebooks/hyperparameter_scan.py
  • Model evaluation, diagnostics, and visualization are provided in the Jupyter notebooks located in:
Code/python/notebooks/

Notebooks are ordered (01_..., 02_..., etc.) to reflect the intended analysis workflow.

Key Features

  • Offset many-to-many RNN, LSTM, and GRU architectures
  • Physically motivated Haversine-based loss with altitude weighting
  • Learned latent encodings for aircraft type and registration
  • Large-scale empirical evaluation on real ADS-B data