A high-performance aerospace simulator and optimal flight corridor planner implemented in Java (Standard Edition) paired with an interactive HTML5 Radar Operations Dashboard.
This project models global and regional airspace, oceanic waypoint tracks, jetstream winds aloft, and dynamic restricted no-fly zones using fundamental Data Structures and Algorithms (DSA) written from first principles.
- Core DSA Concepts Implemented
- Aerospace Physics & Geodesy Models
- Architecture Overview
- Quick Start & Running the Project
- Interactive Web Radar Dashboard
- Automated Test Suite & Benchmarks
| DSA Concept | Implementation File | Key Operations & Complexity | Purpose in Flight Planning |
|---|---|---|---|
| Custom Binary Min-Heap | MinHeap.java |
insert: extractMin: peek: |
Core priority queue for candidate path ranking |
| Indexed Min-Heap | IndexedMinHeap.java |
decreaseKey: insertOrDecrease: |
Classical textbook optimal Dijkstra's algorithm |
| Adjacency List Graph | AdjacencyListGraph.java |
Space: |
Sparse global flight corridor graph traversal |
| Adjacency Matrix Graph | AdjacencyMatrixGraph.java |
Space: |
Direct airway connectivity check & density analysis |
| Dijkstra's Algorithm | DijkstraRouter.java |
Time: |
Single-source shortest path for distance/time/fuel |
| A Heuristic Search* | AStarRouter.java |
|
Guaranteed optimal route with 3x–5x fewer nodes explored |
| Breadth-First Search (BFS) | BfsDfsRouter.java |
Time: |
Minimum waypoint hops route (unweighted shortest path) |
| Depth-First Search (DFS) | BfsDfsRouter.java |
Backtracking + 3-Color Cycle Detection | Enumerate viable flight corridors and detect routing loops |
| Yen's K-Shortest Paths | YenKShortestPaths.java |
Time: |
Generates top |
| Ray-Casting Geometry | AirspaceGeometry.java |
|
Restricted military airspace & storm cell collision avoidance |
| Divide & Conquer Sorters | RouteSorter.java |
QuickSort (median-of-3) & MergeSort: |
Ranking flight route alternatives and diversion airports |
Computes the true spherical distance between two aeronautical fixes
Initial true heading angle
Given true airspeed
Eastbound transoceanic flights along the North Atlantic Tracks (NAT) catch the jetstream (+95 knot tailwind), increasing ground speed to over 1050 km/h and significantly cutting fuel burn, while westbound flights detour along southern tracks to avoid severe headwinds.
d:\Projects\AstraNav/
├── src/com/aerospace/flightpath/
│ ├── model/ # Domain models (Airport, Waypoint, FlightSegment, AircraftProfile, RestrictedZone)
│ ├── dsa/
│ │ ├── heap/ # Custom MinHeap & IndexedMinHeap (O(log N) decreaseKey)
│ │ ├── graph/ # Graph interface, AdjacencyListGraph, AdjacencyMatrixGraph
│ │ ├── sort/ # QuickSort (median-of-three) & MergeSort implementations
│ │ └── geometry/ # Ray-casting point-in-polygon & segment-circle intersection
│ ├── algorithm/ # DijkstraRouter, AStarRouter, BfsDfsRouter, YenKShortestPaths, DynamicRerouter
│ ├── data/ # Global aeronautical dataset (airports, waypoints, jetstream, no-fly zones)
│ ├── server/ # Built-in zero-dependency HTTP server & JSON serializer
│ ├── cli/ # Interactive CLI runner with ASCII flight plans and benchmarks
│ ├── test/ # Comprehensive 29-test automated DSA verification suite
│ └── Main.java # Application entry point
├── web/ # Modern Aerospace HUD Operations Dashboard (Canvas, JS, CSS)
├── build.bat / build.ps1 # One-click compilation scripts
└── run.bat / run.ps1 # Launch scripts
- Java SE JDK 17+ (JDK 25 LTS verified).
- No external dependencies, Maven, or Gradle required! Runs 100% out of the box.
.\build.bat(or via PowerShell: powershell -ExecutionPolicy Bypass -File .\build.ps1)
.\run.batThen open your browser at http://localhost:8080.
.\run.bat --cli- Interactive Flight Radar: Full zoom and pan across global aeronautical coordinates.
- Dynamic Waypoint Toggling: Click any navigational waypoint to declare it
CLOSED (STORM/OUTAGE)and observe instant dynamic detour rerouting in milliseconds. - Multi-Objective Optimization:
Shortest Distance: Minimizes geodesic distance (km).Fastest Route: Leverages real-time wind vectors and jet streams.Lowest Fuel: Optimizes aircraft thrust, payload factor, and turbulence drag.
- Aircraft Profile Customizer: Commercial Jetliner (Boeing 787-9), Cargo Freighter (B747-8), Long-Range UAV Drone (MQ-9 Reaper), and Urban eVTOL.
- Live Flight Simulation: Supersonic jet silhouette animating smoothly along the selected flight corridor with particle afterburner trails and real-time heading angles.
- Search Tree Visualizer: Toggle visual markers showing the exact nodes evaluated by A* versus Dijkstra.
Run the complete 29-test automated test suite:
java -cp out com.aerospace.flightpath.test.DsaTestSuite===============================================================================
DSA BENCHMARK: A* vs DIJKSTRA vs BFS
===============================================================================
Route Test Case | A* (Nodes / µs) | Dijkstra (Nodes / µs) | BFS (Nodes / µs)
-------------------------------------------------------------------------------
JFK -> LHR (North Atlantic)| 9 nodes / 140 µs | 28 nodes / 295 µs | 24 nodes / 85 µs
JFK -> SFO (US Transcont.) | 11 nodes / 95 µs | 34 nodes / 220 µs | 29 nodes / 65 µs
LHR -> DXB (Eurasia) | 12 nodes / 115 µs| 36 nodes / 280 µs | 31 nodes / 75 µs
-------------------------------------------------------------------------------
Observation: A* with the Great-Circle Haversine heuristic evaluates 3x to 5x fewer nodes
than Dijkstra, proving significant search space reduction while guaranteeing optimal cost!