A terminal-based application for tracking aircraft near your location in real-time. The application displays a radar-like view of nearby aircraft and can alert you when new aircraft enter your specified radius.
- Track aircraft within a specified radius of your location
- Interactive radar display with aircraft positions
- Sound alerts when new aircraft enter the tracking radius
- Highlight specific aircraft by callsign
- Support for multiple aircraft tracking APIs:
- Free APIs: OpenSky Network, AirLabs, AviationStack
- Premium APIs: FlightAware, FlightRadar24, ADSBexchange
- Mock API for testing
- Both interactive (radar display) and non-interactive (console output) modes
- Extensive logging options for debugging and monitoring:
- Multiple log levels (DEBUG, INFO, WARNING, ERROR)
- Console and file logging
- Detailed API response logging
- Real-time monitoring with
tail -f
- Easily extensible to support additional aircraft tracking APIs
- Python 3.8 or higher
- Poetry (for dependency management)
# Clone the repository
git clone https://github.com/thomaschristory/open-aircraft-tracker.git
cd open-aircraft-tracker
# Install with Poetry
poetry install
# Activate the virtual environment
poetry shellpip install open-aircraft-tracker# Using the command-line entry point
aircraft-tracker --latitude 47.3769 --longitude 8.5417 --radius 10
# Or directly using the module
python -m open_aircraft_tracker.main --latitude 47.3769 --longitude 8.5417 --radius 10Usage: aircraft-tracker [OPTIONS]
Track aircraft near your location with a terminal-based radar display.
The application displays a radar-like view of nearby aircraft and can alert you when new aircraft enter your specified radius.
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --latitude -lat FLOAT Center latitude in decimal degrees [default: None] [required] │
│ * --longitude -lon FLOAT Center longitude in decimal degrees [default: None] [required] │
│ --radius -r FLOAT Radius in kilometers [default: 5.0] │
│ --update-interval -u FLOAT Update interval in seconds [default: 5.0] │
│ --api -a TEXT API to use (opensky, airlabs, aviationstack, flightaware, flightradar24, adsbexchange, mock) [default: opensky] │
│ --username TEXT API username (if required) [default: None] │
│ --password TEXT API password (if required) [default: None] │
│ --callsign -c TEXT Callsign to highlight (can be specified multiple times) [default: None] │
│ --sound-file -s TEXT Path to a WAV file to use for alerts [default: None] │
│ --mock-aircraft-count -m INTEGER Number of simulated aircraft for mock API [default: 20] │
│ --non-interactive -n Run in non-interactive mode (no radar display) │
│ --log-level -l TEXT Log level (DEBUG, INFO, WARNING, ERROR) [default: INFO] │
│ --log-file -f TEXT Path to log file (if not specified, log to console only) [default: None] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell to copy it or customize the installation. │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Note: The CLI is now powered by Typer, which provides a more modern and user-friendly interface with features like:
- Rich formatting for help text
- Automatic shell completion
- Better error messages and validation
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --radius 5aircraft-tracker --latitude 47.4582 --longitude 8.5555 --callsign SWR123 --callsign LX38aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api mockaircraft-tracker --latitude 47.4582 --longitude 8.5555 --non-interactiveaircraft-tracker --latitude 47.4582 --longitude 8.5555 --log-level DEBUG --log-file /path/to/aircraft.logYou can then monitor the log file in real-time using:
tail -f /path/to/aircraft.logThis is especially useful for debugging when nothing appears to be happening, as it shows all API responses and aircraft tracking details.
When running in interactive mode (the default), the following keyboard controls are available:
q: Quit the applicationi: Toggle the information panelh: Toggle help text
The application supports multiple aircraft tracking APIs:
The OpenSky Network provides a free API for tracking aircraft. By default, the application uses the public API, which has rate limits. For higher rate limits, you can create an account at OpenSky Network and provide your username and password.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api opensky --username your_username --password your_passwordNote: OpenSky Network is currently closed for registration. If you don't have an account, you can use the AirLabs API instead.
AirLabs provides a comprehensive flight tracking API with real-time data. You need to sign up for an API key at AirLabs to use this API. The free tier allows up to 1,000 requests per month.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api airlabs --username your_api_keyNote: For AirLabs, the API key should be provided using the --username parameter. AirLabs is currently closed for new registrations.
AviationStack provides real-time global aviation data including flights, airlines, and airports. You need to sign up for an API key at AviationStack to use this API. The free tier allows up to 500 requests per month.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api aviationstack --username your_api_keyNote: For AviationStack, the API key should be provided using the --username parameter. AviationStack still accepts new registrations (as of March 2025).
The application also includes a mock API for testing purposes. This API generates random aircraft positions around the specified location.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api mock --mock-aircraft-count 30The application now supports the following premium aircraft tracking APIs:
- FlightAware (FlightXML) - One of the most comprehensive flight tracking services with extensive global coverage and detailed flight information.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api flightaware --username your_username --password your_api_key- FlightRadar24 - Very popular flight tracking service with real-time tracking of thousands of aircraft around the world.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api flightradar24 --username your_api_key- ADSBexchange - Provides unfiltered flight data with no censorship, including military and sensitive flights that might be filtered on other platforms.
aircraft-tracker --latitude 47.4582 --longitude 8.5555 --api adsbexchange --username your_api_keyThese premium APIs require paid subscriptions but offer higher quality data, better reliability, and more features than the free alternatives. For pricing information, visit the respective websites:
- FlightAware: https://flightaware.com/commercial/flightxml/
- FlightRadar24: https://www.flightradar24.com/premium/
- ADSBexchange: https://www.adsbexchange.com/data/
The application is designed to be easily extensible with additional aircraft tracking APIs. To add support for a new API:
- Create a new class that inherits from
AircraftTrackerAPIinopen_aircraft_tracker/api/base.py - Implement the required methods:
get_aircraft_in_radiusandget_aircraft_by_callsign - Add the new API to the available options in
open_aircraft_tracker/main.py
# Clone the repository
git clone https://github.com/thomaschristory/open-aircraft-tracker.git
cd open-aircraft-tracker
# Install development dependencies
poetry install --with dev
# Activate the virtual environment
poetry shellpytest# Format code with Black
black open_aircraft_tracker
# Sort imports with isort
isort open_aircraft_trackermypy open_aircraft_trackerContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenSky Network for providing the free aircraft tracking API
- AirLabs for providing the flight tracking API
- AviationStack for providing the aviation data API
- FlightAware for providing the FlightXML API
- FlightRadar24 for providing flight tracking data
- ADSBexchange for providing unfiltered flight data
- blessed for the terminal interface
- geopy for distance calculations