Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ccustine/airjedi-desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

71 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โœˆ๏ธ AirJedi Desktop

Real-time ADS-B Aircraft Tracking with Beautiful Visualization

License Rust Platform

This is currently a personal project to explore the use of AI development tools to develop and build highly performant and efficient message processing from SDR and other wireless or digital sensors. This sub-project is a native desktop application for tracking aircraft in real-time using ADS-B data. Built with Rust ๐Ÿฆ€ and egui for maximum performance and multiplatform deployment.

AirJedi Desktop Screenshot

Features โ€ข Quick Start โ€ข Configuration โ€ข Architecture โ€ข License


โœจ Features

๐Ÿ—บ๏ธ Interactive Map Visualization

  • Live Carto Map Tiles with Web Mercator projection
  • Smooth pan & zoom controls with trackpad gesture support
  • Smart tile caching (7-day local cache for instant loading)
  • Auto-centering on your GPS location at startup

๐Ÿ›ฉ๏ธ Real-time Aircraft Tracking

  • Connects to BaseStation protocol feeds (port 30003)
  • Automatic reconnection and error recovery
  • Tracks ICAO address, callsign, position, altitude, speed, and heading
  • 400-mile radius filtering for relevant aircraft only
  • Intelligent jump detection to filter out GPS errors

๐ŸŽจ Altitude-Based Flight Trails

Beautiful color-coded flight paths showing the last 10 minutes of history:

Altitude Color Typical Aircraft
0-10k ft ๐Ÿ”ต Cyan/Teal General Aviation
10-20k ft ๐ŸŸข Green/Yellow Regional Jets
20-30k ft ๐ŸŸก Yellow/Orange Climbing/Descending
30-40k ft ๐ŸŸ  Orange/Red Cruise Altitude
40k+ ft ๐ŸŸฃ Purple/Magenta High-Altitude Jets

Trails smoothly fade from solid to transparent over time, giving you both altitude and recency information at a glance.

๐Ÿ“Š Aircraft Information Panel

  • Military-style contact list sorted by altitude (highest first)
  • Real-time status indicators (active โ— / recent โ— / stale โ—‹)
  • Click to select aircraft on map or in list
  • Auto-scroll to selected aircraft
  • Flight level (FL), speed, heading, and coordinates
  • Last-seen timestamps

๐ŸŽฏ Smart Selection System

  • Click aircraft on map or in list to highlight
  • Selected aircraft show with red icon and yellow selection ring
  • List automatically scrolls to center selected aircraft
  • Subtle 10% opacity background highlight in list

๐Ÿ›ซ Aviation Data Overlays

  • Airports - Color-coded by size (large/medium/small)
    • Red markers for major international airports
    • Yellow for medium regional airports
    • Gray for small local airports
    • ICAO identifiers shown at higher zoom levels
    • Smart filtering with 3 modes:
      • Public/Frequent (default) - Shows airports with scheduled service and major hubs
      • All Airports - Shows all public airplane airports
      • Major Only - Shows only large international airports
  • Runways - Detailed runway visualization
    • Paved runways shown with thicker lines
    • Automatically displayed for visible airports
    • Only shown at zoom level 8+
  • Navaids - Navigational aids overlay
    • VOR/VORTAC in blue triangles
    • NDB in orange triangles
    • DME in purple triangles
    • Ident labels at zoom 9+
  • Automatic download - Data files downloaded on first startup (no manual setup required)
  • Smart zoom filtering - Overlays automatically adjust visibility based on zoom level
  • Toggle controls - Show/hide each overlay type independently via Map Overlays window
  • Data from OurAirports (free, public domain)

๐Ÿš€ Quick Start

Prerequisites

  • Rust (1.70 or later) - Install Rust
  • ADS-B Data Source feeding BaseStation protocol to localhost:30003
    • Examples: dump1090, readsb, or any Mode S/ADS-B receiver

Installation

# Clone the repository
git clone https://github.com/ccustine/airjedi-desktop.git
cd airjedi-desktop

# Build in release mode (optimized)
cargo build --release

# Run the application
cargo run --release

Note: Aviation data files (airports, runways, navaids) will be automatically downloaded on first startup (~50MB). The app will display overlays once the data is loaded.

The application will:

  1. ๐Ÿ“ Detect your GPS location (macOS: CoreLocation, others: IP geolocation)
  2. ๐Ÿ—บ๏ธ Center the map on your location
  3. ๐Ÿ“ฅ Download aviation data in the background (if not already present)
  4. ๐Ÿ”Œ Connect to localhost:30003 for ADS-B data
  5. โœˆ๏ธ Start tracking aircraft within 400 miles
  6. ๐Ÿ›ซ Display airport/runway/navaid overlays once data loads

โš™๏ธ Configuration

Change ADS-B Data Source

Edit src/tcp_client.rs:

let address = "localhost:30003";  // Change to your BaseStation feed

Adjust Distance Filter

Edit src/basestation.rs in AircraftTracker::new():

max_distance_miles: 400.0,  // Change radius (in miles)

Modify Trail Duration

Edit src/main.rs constants:

const TRAIL_MAX_AGE_SECONDS: f32 = 600.0;     // 10 minutes total
const TRAIL_SOLID_DURATION_SECONDS: f32 = 300.0;  // First 5 min solid
const TRAIL_FADE_DURATION_SECONDS: f32 = 300.0;   // Last 5 min fade

Platform-Specific: macOS GPS

On macOS, the app uses CoreLocation for accurate GPS positioning. On first run, you'll be prompted to grant location permissions. On other platforms, IP-based geolocation is used automatically.


๐Ÿ—๏ธ Architecture

Project Structure

airjedi-desktop/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.rs           # UI & rendering (egui framework)
โ”‚   โ”œโ”€โ”€ aviation_data.rs  # Airport/runway/navaid data loader & renderer
โ”‚   โ”œโ”€โ”€ basestation.rs    # ADS-B protocol parser & aircraft tracking
โ”‚   โ”œโ”€โ”€ tcp_client.rs     # Async TCP client with auto-reconnect
โ”‚   โ””โ”€โ”€ tiles.rs          # Map tile manager with Web Mercator projection
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ README.md         # Data download instructions
โ”‚   โ”œโ”€โ”€ airports.csv      # (download separately)
โ”‚   โ”œโ”€โ”€ runways.csv       # (download separately)
โ”‚   โ””โ”€โ”€ navaids.csv       # (download separately)
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ airjedi1.png      # Application screenshot
โ”œโ”€โ”€ Cargo.toml            # Dependencies & build config
โ”œโ”€โ”€ LICENSE               # Apache 2.0 license
โ””โ”€โ”€ README.md             # This file

Key Technologies

  • ๐Ÿฆ€ Rust - Memory-safe, zero-cost abstractions
  • ๐ŸŽจ egui - Immediate mode GUI framework (60 FPS rendering)
  • ๐ŸŒ eframe - Native windowing and graphics backend
  • โšก Tokio - Async runtime for TCP connections
  • ๐Ÿ—บ๏ธ Web Mercator - Standard map projection (EPSG:3857)
  • ๐Ÿ“ฆ Carto - Beautiful basemap tiles

Data Flow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ADS-B Receiver โ”‚  (dump1090, readsb)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ BaseStation Protocol (TCP :30003)
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   TCP Client    โ”‚  (async, auto-reconnect)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ Parse MSG packets
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Aircraft Trackerโ”‚  (position filtering, trail storage)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ Shared state (Arc<Mutex>)
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   UI Renderer   โ”‚  (egui @ 500ms updates)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ”œโ”€โ–บ Map tiles (cached from Carto CDN)
         โ”œโ”€โ–บ Aircraft icons & trails
         โ””โ”€โ–บ Information panel

๐ŸŽฎ Controls

Action Control
Pan map Click & drag
Zoom Two-finger pinch (trackpad) or scroll wheel
Select aircraft Click icon on map or entry in list
Deselect Click empty map area
Toggle overlays Open "Map Overlays" window (top-left)
Filter airports Use radio buttons in Map Overlays window
Collapse panels Click window title bars

๐Ÿ”ง Technical Details

Position Filtering

  • Haversine formula for accurate great-circle distance
  • Center radius check: 400-mile default range
  • Jump detection: Rejects >10 mile position jumps
  • Resolution: ~100 meter minimum change to record

Performance Optimizations

  • Trail history: 10 minutes stored in memory
  • Update rate: 500ms (2 Hz) UI refresh
  • Cleanup interval: Every 100 received messages
  • Aircraft timeout: 3 minutes of inactivity
  • Tile cache: SHA256-based filesystem cache with subdomain load balancing

BaseStation Protocol Support

Decodes the following MSG types:

Type Description
MSG,1 Aircraft identification (callsign)
MSG,3 Airborne position (lat/lon/altitude)
MSG,4 Airborne velocity (speed/heading)
MSG,5 Surveillance altitude
MSG,6 Surveillance position
MSG,7 Air-to-air message
MSG,8 All call reply

๐Ÿ›ฃ๏ธ Roadmap

Future enhancements being considered:

  • ๐Ÿ“ˆ Aircraft detail popup with full flight information
  • ๐Ÿ” Configurable filters (altitude range, speed, callsign)
  • ๐Ÿ’พ Export data to KML/GeoJSON formats
  • ๐Ÿ“ก Multiple simultaneous data source support
  • ๐ŸŒฆ๏ธ Weather radar overlay integration
  • ๐Ÿ›ซ Airport, runway, & navaid overlays โœ…
  • ๐ŸŽจ Custom color schemes and themes
  • ๐Ÿ“Š Historical playback and recording
  • ๐Ÿ”” Aircraft alerts and notifications
  • ๐ŸŒ Web-based companion app
  • ๐Ÿ—บ๏ธ Airspace boundaries overlay (Class B, C, D)
  • ๐Ÿ›ฌ Airport frequencies and ATIS information

๐Ÿค Contributing

Contributions are welcome! This is an early-stage project with lots of room for improvement.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

Copyright 2025 Chris Custine

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


๐Ÿ™ Acknowledgments

  • OpenStreetMap Contributors - Map data
  • CARTO - Beautiful basemap tiles
  • OurAirports - Aviation data (airports, runways, navaids)
  • egui Community - Excellent immediate mode GUI framework
  • ADS-B Community - Open aircraft tracking protocols

Built with โค๏ธ and Rust ๐Ÿฆ€

If you find this project useful, please consider giving it a โญ!

About

Native desktop application for tracking ADS-B and other position information

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages