{"id":28423738,"url":"https://github.com/sarumaj/local-flight-map","last_synced_at":"2026-04-08T01:03:16.864Z","repository":{"id":294657432,"uuid":"987487099","full_name":"sarumaj/local-flight-map","owner":"sarumaj","description":"Open Air Traffic map based on ADS-B Exchange and Open Sky Data.","archived":false,"fork":false,"pushed_at":"2025-06-19T19:42:17.000Z","size":8427,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T18:31:38.733Z","etag":null,"topics":["adsbexchange","aviation","flights-api","opensky-api","python","radar"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/local-flight-map/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sarumaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-21T06:34:23.000Z","updated_at":"2025-06-21T20:06:27.000Z","dependencies_parsed_at":"2025-05-26T16:34:49.342Z","dependency_job_id":null,"html_url":"https://github.com/sarumaj/local-flight-map","commit_stats":null,"previous_names":["sarumaj/local-flight-map"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sarumaj/local-flight-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarumaj%2Flocal-flight-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarumaj%2Flocal-flight-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarumaj%2Flocal-flight-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarumaj%2Flocal-flight-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sarumaj","download_url":"https://codeload.github.com/sarumaj/local-flight-map/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sarumaj%2Flocal-flight-map/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266761410,"owners_count":23980296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adsbexchange","aviation","flights-api","opensky-api","python","radar"],"created_at":"2025-06-05T09:09:21.048Z","updated_at":"2025-10-30T20:19:01.919Z","avatar_url":"https://github.com/sarumaj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![release](https://github.com/sarumaj/local-flight-map/actions/workflows/release.yml/badge.svg)](https://github.com/sarumaj/local-flight-map/actions/workflows/release.yml)\n[![deploy](https://github.com/sarumaj/local-flight-map/actions/workflows/deploy.yml/badge.svg)](https://github.com/sarumaj/local-flight-map/actions/workflows/deploy.yml)\n[![GitHub Release](https://img.shields.io/github/v/release/sarumaj/local-flight-map?logo=github)](https://github.com/sarumaj/local-flight-map/releases/latest)\n[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/sarumaj/local-flight-map)](https://github.com/sarumaj/local-flight-map/blob/main/pyproject.toml)\n\n---\n\n# Local Flight Map\n\nA real-time air traffic visualization tool that combines data from ADS-B Exchange and OpenSky Network to provide a comprehensive view of aircraft movements in your local area.\n\nThis app is currently hosted at [local-flight-map.sarumaj.com](https://local-flight-map.sarumaj.com).\n\n[![screenshot.png](doc/screenshot.png)](https://local-flight-map.sarumaj.com)\n\n## Features\n\n- Real-time aircraft tracking and visualization\n- Interactive map interface using Folium\n- Data integration from multiple sources:\n  - ADS-B Exchange API\n  - OpenSky Network API\n  - HexDB.io\n- Fast and responsive web interface built with FastAPI\n- Asynchronous data fetching for optimal performance\n\n## API Documentation\n\n### Data Sources\n\nThe application integrates data from multiple sources to provide comprehensive flight information:\n\n#### OpenSky Network API\n- **Authentication**: Username and password required for some endpoints\n- **Endpoints**:\n  - `/api/states/all`: Get all aircraft states\n  - `/api/states/own`: Get aircraft states from own feeder\n  - `/api/tracks/all`: Get all flight tracks\n\n#### ADS-B Exchange API\n- **Authentication**: API key required\n- **Endpoints**:\n  - `/v2/registration/{registration}`: Get aircraft by registration\n  - `/v2/icao/{icao24}`: Get aircraft by ICAO24 address\n  - `/v2/callsign/{callsign}`: Get aircraft by callsign\n  - `/v2/sqk/{squawk}`: Get aircraft by squawk code\n  - `/v2/mil`: Get military aircraft\n  - `/v2/lat/{lat}/lon/{lon}/dist/{radius}`: Get aircraft in area\n\n#### HexDB API\n- **Base URL**: https://hexdb.io/\n- **Endpoints**:\n  - `/api/v1/aircraft/icao/{icao24}`: Get aircraft information\n  - `/api/v1/airport/icao/{icao24}`: Get airport information\n  - `/api/v1/route/icao/{callsign}`: Get route information\n\n### API Client Usage\n\n```python\nfrom local_flight_map.api import (\n    ApiConfig,\n    AdsbExchangeClient, HexDbClient, OpenSkyClient,\n    Location, BBox\n)\nfrom datetime import datetime\n\n# Initialize the API configuration\nconfig = ApiConfig(\n    ads_b_exchange_api_key=\"your_api_key\",\n    opensky_client_id=\"your_client_id\",\n    opensky_client_secret=\"your_client_secret\"\n)\n\n# OpenSky Network API Examples\nasync with OpenSkyClient(config) as opensky_client:\n    # Get all aircraft states\n    states = await opensky_client.get_states_from_opensky()\n    \n    # Get states for specific aircraft\n    aircraft_states = await opensky_client.get_states_from_opensky(\n        icao24=\"icao24_code\"\n    )\n    \n    # Get states in a specific area\n    area_states = await opensky_client.get_states_from_opensky(\n        bbox=BBox(min_lat=40.0, max_lat=41.0, min_lon=-74.0, max_lon=-73.0)\n    )\n    \n    # Get states from own feeder\n    own_states = await opensky_client.get_my_states_from_opensky(\n        serials=[1, 2, 3]  # Optional: filter by sensor serial numbers\n    )\n    \n    # Get flight track for specific aircraft\n    track = await opensky_client.get_track_by_aircraft_from_opensky(\n        icao24=\"icao24_code\",\n        time_secs=datetime.now()\n    )\n\n# ADS-B Exchange API Examples\nasync with AdsbExchangeClient(config) as adsbexchange_client:\n    # Get aircraft by registration\n    aircraft_by_reg = await adsbexchange_client.get_aircraft_from_adsbexchange_by_registration(\n        registration=\"N12345\"\n    )\n    \n    # Get aircraft by ICAO24 address\n    aircraft_by_icao = await adsbexchange_client.get_aircraft_from_adsbexchange_by_icao24(\n        icao24=\"icao24_code\"\n    )\n    \n    # Get aircraft by callsign\n    aircraft_by_callsign = await adsbexchange_client.get_aircraft_from_adsbexchange_by_callsign(\n        callsign=\"ABC123\"\n    )\n    \n    # Get aircraft by squawk code\n    aircraft_by_squawk = await adsbexchange_client.get_aircraft_from_adsbexchange_by_squawk(\n        squawk=\"7500\"\n    )\n    \n    # Get military aircraft\n    military_aircraft = await adsbexchange_client.get_military_aircrafts_from_adsbexchange()\n    \n    # Get aircraft within range\n    aircraft_in_range = await adsbexchange_client.get_aircraft_from_adsbexchange_within_range(\n        center=Location(latitude=40.7128, longitude=-74.0060),  # New York City\n        radius=50  # radius in nautical miles (92.6 km)\n    )\n\n# HexDB API Examples\nasync with HexDbClient(config) as hexdb_client:\n    # Get aircraft information\n    aircraft_info = await hexdb_client.get_aircraft_information_from_hexdb(\n        icao24=\"icao24_code\"\n    )\n    \n    # Get airport information\n    airport_info = await hexdb_client.get_airport_information_from_hexdb(\n        icao24=\"KJFK\"  # ICAO airport code\n    )\n    \n    # Get route information\n    route_info = await hexdb_client.get_route_information_from_hexdb(\n        callsign=\"ABC123\"\n    )\n```\n\n### Response Objects\n\n#### OpenSky Network API\n- `StateVector`: Contains aircraft position, speed, altitude, and other flight data\n  - Basic info: ICAO24, callsign, origin country\n  - Position: latitude, longitude, altitude (barometric and geometric)\n  - Performance: velocity, true track, vertical rate\n  - Status: on ground, squawk, special position indicator\n  - Source: position source (ADS-B, ASTERIX, MLAT, FLARM)\n  - Category: aircraft category (Light, Small, Large, Heavy, etc.)\n- `States`: Collection of StateVector objects with timestamp\n- `FlightTrack`: Contains flight path data with waypoints\n  - Basic info: ICAO24, callsign, start/end time\n  - Path: list of waypoints with position and altitude data\n- `Waypoint`: Individual position point in a flight track\n  - Time: Unix timestamp\n  - Position: latitude, longitude\n  - Altitude: barometric altitude\n  - Track: true track angle\n  - Status: on ground flag\n\n#### ADS-B Exchange API\n- `AircraftProperties`: Detailed aircraft information including:\n  - Basic info: ICAO24, registration, type, callsign\n  - Position: latitude, longitude, altitude (barometric and geometric)\n  - Performance: ground speed, airspeed (indicated/true), Mach number\n  - Weather: wind direction/speed, outside air temperature\n  - Navigation: track angle, heading, rate of climb/descent\n  - System status: squawk, emergency status, category\n  - Technical: signal strength, GPS status, message count\n  - Navigation modes: QNH, MCP/FMS altitude, heading\n  - Integrity: navigation accuracy, surveillance level\n- `AdsbExchangeResponse`: Container for aircraft data with:\n  - List of aircraft\n  - API message\n  - Timestamps\n  - Processing information\n\n#### HexDB API\n- `AircraftInformation`: Aircraft registration and type details\n  - Basic info: ICAO type code, manufacturer, Mode S code\n  - Registration: operator flag code, registered owners, registration number\n  - Type: aircraft type description\n- `AirportInformation`: Airport location and identification\n  - Codes: IATA, ICAO, country code\n  - Location: latitude, longitude\n  - Details: airport name, region name\n- `RouteInformation`: Flight route details\n  - Flight: flight number\n  - Route: route description\n  - Update time: timestamp of last update\n\nAll response objects support conversion to GeoJSON format for easy integration with mapping libraries.\n\n## Requirements\n\n- Python 3.12 or higher\n- Internet connection for API access\n- Web browser for viewing the map interface\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/sarumaj/local-flight-map.git\ncd local-flight-map\n```\n\n2. Create and activate a virtual environment:\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n```\n\n3. Install the package:\n```bash\npip install -e .\n```\n\n## Configuration\n\nCreate a `.env` file in the project root with your API credentials:\n```\nADS_B_EXCHANGE_API_KEY=your_api_key_here\nOPENSKY_USERNAME=your_username_here\nOPENSKY_PASSWORD=your_password_here\n```\n\n## Usage\n\n1. Start the application:\n```bash\nlocal-flight-map\n```\n\n2. Open your web browser and navigate to `http://localhost:5006`\n\n3. The interactive map will display:\n   - Current aircraft positions and path tracking\n   - Aircraft information on hover\n   - Real-time updates\n\n## Development\n\nTo run tests:\n```bash\npip install -e \".[test]\"\npytest\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarumaj%2Flocal-flight-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarumaj%2Flocal-flight-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarumaj%2Flocal-flight-map/lists"}