local-flight-map 1.2.0__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {local_flight_map-1.2.0/src/local_flight_map.egg-info → local_flight_map-1.2.2}/PKG-INFO +41 -36
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/README.md +31 -26
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/pyproject.toml +14 -11
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/response.py +1 -1
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/jetphotos/client.py +2 -1
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/config.py +32 -3
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/civil_helicopter.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/civil_plane_1.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/civil_plane_2.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/civil_plane_3.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/clouds.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/forbidden.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/mil_plane_1.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/mil_plane_2.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/police_helicopter.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/icons/radar.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/img/placeholder.png +0 -0
- local_flight_map-1.2.2/src/local_flight_map/ui/app/static/img/unavailable.png +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/js/30_draggable_bbox.js +11 -2
- {local_flight_map-1.2.0 → local_flight_map-1.2.2/src/local_flight_map.egg-info}/PKG-INFO +41 -36
- local_flight_map-1.2.2/src/local_flight_map.egg-info/requires.txt +17 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_adsbexchange.py +1 -8
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_adsbexchange_feeder.py +1 -3
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_base.py +1 -4
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_hexdb.py +1 -7
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_jetphotos.py +1 -6
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/tests/test_api_client_opensky.py +1 -8
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/civil_helicopter.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/civil_plane_1.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/civil_plane_2.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/civil_plane_3.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/clouds.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/forbidden.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/mil_plane_1.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/mil_plane_2.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/police_helicopter.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/icons/radar.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/img/placeholder.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map/ui/app/static/img/unavailable.png +0 -3
- local_flight_map-1.2.0/src/local_flight_map.egg-info/requires.txt +0 -17
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/LICENSE +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/setup.cfg +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/__main__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/client.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/feed/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/feed/client.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/feed/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/feed/response.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/adsbexchange/response.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/client.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/geography.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/base/middleware.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/hexdb/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/hexdb/client.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/hexdb/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/hexdb/response.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/jetphotos/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/jetphotos/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/jetphotos/response.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/opensky/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/opensky/client.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/opensky/config.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/opensky/response.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/data.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/interface.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/interface.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/layers.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/middleware.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/css/components.css +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/css/main.css +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/css/map.css +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/css/variables.css +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/js/10_flight_marker_utils.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/js/20_map_init_ready.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/app/static/js/40_disable_control_overlay_entries.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/__init__.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/js/markercluster_icon_create_function.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/js/realtime_get_feature_id.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/js/realtime_point_to_layer.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/js/realtime_source.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/js/realtime_update_feature.js +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/jscode.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/markercluster.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/ui/plugins/realtime.py +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map.egg-info/SOURCES.txt +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map.egg-info/dependency_links.txt +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map.egg-info/entry_points.txt +0 -0
- {local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: local-flight-map
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Open Air Traffic map based on ADS-B Exchange and Open Sky Data.
|
|
5
5
|
Author-email: Dawid Ciepiela <71898979+sarumaj@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -10,38 +10,31 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: aiohttp==3.
|
|
13
|
+
Requires-Dist: aiohttp==3.14.5
|
|
14
14
|
Requires-Dist: asyncio==4.0.0
|
|
15
|
-
Requires-Dist: async-lru==2.
|
|
15
|
+
Requires-Dist: async-lru==2.4.0
|
|
16
16
|
Requires-Dist: cloudscraper==1.2.71
|
|
17
|
-
Requires-Dist: fastapi==0.
|
|
17
|
+
Requires-Dist: fastapi==0.158.2
|
|
18
18
|
Requires-Dist: folium==0.20.0
|
|
19
19
|
Requires-Dist: itsdangerous==2.2.0
|
|
20
|
-
Requires-Dist: lxml==6.
|
|
20
|
+
Requires-Dist: lxml==6.1.3
|
|
21
21
|
Requires-Dist: nest-asyncio==1.6.0
|
|
22
|
-
Requires-Dist: orjson==3.
|
|
23
|
-
Requires-Dist: pydantic==2.
|
|
24
|
-
Requires-Dist: pydantic-settings==2.
|
|
25
|
-
Requires-Dist: uvicorn==0.
|
|
22
|
+
Requires-Dist: orjson==3.13.0
|
|
23
|
+
Requires-Dist: pydantic==2.14.3
|
|
24
|
+
Requires-Dist: pydantic-settings==2.16.2
|
|
25
|
+
Requires-Dist: uvicorn==0.54.0
|
|
26
26
|
Provides-Extra: test
|
|
27
|
-
Requires-Dist: pytest==9.
|
|
28
|
-
Requires-Dist: pytest-asyncio==1.
|
|
27
|
+
Requires-Dist: pytest==9.1.1; extra == "test"
|
|
28
|
+
Requires-Dist: pytest-asyncio==1.4.1.post1; extra == "test"
|
|
29
29
|
Dynamic: license-file
|
|
30
30
|
|
|
31
|
-
[](https://github.com/sarumaj/local-flight-map/actions/workflows/release.yml)
|
|
32
|
-
[](https://github.com/sarumaj/local-flight-map/actions/workflows/deploy.yml)
|
|
33
|
-
[](https://github.com/sarumaj/local-flight-map/releases/latest)
|
|
34
|
-
[](https://github.com/sarumaj/local-flight-map/blob/main/pyproject.toml)
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
31
|
# Local Flight Map
|
|
39
32
|
|
|
40
33
|
A 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.
|
|
41
34
|
|
|
42
|
-
This app is currently hosted at [local-flight-map.
|
|
35
|
+
This app is currently hosted at [local-flight-map.apps.ciepiela.org](https://local-flight-map.apps.ciepiela.org).
|
|
43
36
|
|
|
44
|
-
[](https://local-flight-map.
|
|
37
|
+
[](https://local-flight-map.apps.ciepiela.org)
|
|
45
38
|
|
|
46
39
|
## Features
|
|
47
40
|
|
|
@@ -61,6 +54,7 @@ This app is currently hosted at [local-flight-map.sarumaj.com](https://local-fli
|
|
|
61
54
|
The application integrates data from multiple sources to provide comprehensive flight information:
|
|
62
55
|
|
|
63
56
|
#### OpenSky Network API
|
|
57
|
+
|
|
64
58
|
- **Authentication**: Username and password required for some endpoints
|
|
65
59
|
- **Endpoints**:
|
|
66
60
|
- `/api/states/all`: Get all aircraft states
|
|
@@ -68,6 +62,7 @@ The application integrates data from multiple sources to provide comprehensive f
|
|
|
68
62
|
- `/api/tracks/all`: Get all flight tracks
|
|
69
63
|
|
|
70
64
|
#### ADS-B Exchange API
|
|
65
|
+
|
|
71
66
|
- **Authentication**: API key required
|
|
72
67
|
- **Endpoints**:
|
|
73
68
|
- `/v2/registration/{registration}`: Get aircraft by registration
|
|
@@ -78,7 +73,8 @@ The application integrates data from multiple sources to provide comprehensive f
|
|
|
78
73
|
- `/v2/lat/{lat}/lon/{lon}/dist/{radius}`: Get aircraft in area
|
|
79
74
|
|
|
80
75
|
#### HexDB API
|
|
81
|
-
|
|
76
|
+
|
|
77
|
+
- **Base URL**: <https://hexdb.io/>
|
|
82
78
|
- **Endpoints**:
|
|
83
79
|
- `/api/v1/aircraft/icao/{icao24}`: Get aircraft information
|
|
84
80
|
- `/api/v1/airport/icao/{icao24}`: Get airport information
|
|
@@ -105,22 +101,22 @@ config = ApiConfig(
|
|
|
105
101
|
async with OpenSkyClient(config) as opensky_client:
|
|
106
102
|
# Get all aircraft states
|
|
107
103
|
states = await opensky_client.get_states_from_opensky()
|
|
108
|
-
|
|
104
|
+
|
|
109
105
|
# Get states for specific aircraft
|
|
110
106
|
aircraft_states = await opensky_client.get_states_from_opensky(
|
|
111
107
|
icao24="icao24_code"
|
|
112
108
|
)
|
|
113
|
-
|
|
109
|
+
|
|
114
110
|
# Get states in a specific area
|
|
115
111
|
area_states = await opensky_client.get_states_from_opensky(
|
|
116
112
|
bbox=BBox(min_lat=40.0, max_lat=41.0, min_lon=-74.0, max_lon=-73.0)
|
|
117
113
|
)
|
|
118
|
-
|
|
114
|
+
|
|
119
115
|
# Get states from own feeder
|
|
120
116
|
own_states = await opensky_client.get_my_states_from_opensky(
|
|
121
117
|
serials=[1, 2, 3] # Optional: filter by sensor serial numbers
|
|
122
118
|
)
|
|
123
|
-
|
|
119
|
+
|
|
124
120
|
# Get flight track for specific aircraft
|
|
125
121
|
track = await opensky_client.get_track_by_aircraft_from_opensky(
|
|
126
122
|
icao24="icao24_code",
|
|
@@ -133,25 +129,25 @@ async with AdsbExchangeClient(config) as adsbexchange_client:
|
|
|
133
129
|
aircraft_by_reg = await adsbexchange_client.get_aircraft_from_adsbexchange_by_registration(
|
|
134
130
|
registration="N12345"
|
|
135
131
|
)
|
|
136
|
-
|
|
132
|
+
|
|
137
133
|
# Get aircraft by ICAO24 address
|
|
138
134
|
aircraft_by_icao = await adsbexchange_client.get_aircraft_from_adsbexchange_by_icao24(
|
|
139
135
|
icao24="icao24_code"
|
|
140
136
|
)
|
|
141
|
-
|
|
137
|
+
|
|
142
138
|
# Get aircraft by callsign
|
|
143
139
|
aircraft_by_callsign = await adsbexchange_client.get_aircraft_from_adsbexchange_by_callsign(
|
|
144
140
|
callsign="ABC123"
|
|
145
141
|
)
|
|
146
|
-
|
|
142
|
+
|
|
147
143
|
# Get aircraft by squawk code
|
|
148
144
|
aircraft_by_squawk = await adsbexchange_client.get_aircraft_from_adsbexchange_by_squawk(
|
|
149
145
|
squawk="7500"
|
|
150
146
|
)
|
|
151
|
-
|
|
147
|
+
|
|
152
148
|
# Get military aircraft
|
|
153
149
|
military_aircraft = await adsbexchange_client.get_military_aircrafts_from_adsbexchange()
|
|
154
|
-
|
|
150
|
+
|
|
155
151
|
# Get aircraft within range
|
|
156
152
|
aircraft_in_range = await adsbexchange_client.get_aircraft_from_adsbexchange_within_range(
|
|
157
153
|
center=Location(latitude=40.7128, longitude=-74.0060), # New York City
|
|
@@ -164,12 +160,12 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
164
160
|
aircraft_info = await hexdb_client.get_aircraft_information_from_hexdb(
|
|
165
161
|
icao24="icao24_code"
|
|
166
162
|
)
|
|
167
|
-
|
|
163
|
+
|
|
168
164
|
# Get airport information
|
|
169
165
|
airport_info = await hexdb_client.get_airport_information_from_hexdb(
|
|
170
166
|
icao24="KJFK" # ICAO airport code
|
|
171
167
|
)
|
|
172
|
-
|
|
168
|
+
|
|
173
169
|
# Get route information
|
|
174
170
|
route_info = await hexdb_client.get_route_information_from_hexdb(
|
|
175
171
|
callsign="ABC123"
|
|
@@ -179,6 +175,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
179
175
|
### Response Objects
|
|
180
176
|
|
|
181
177
|
#### OpenSky Network API
|
|
178
|
+
|
|
182
179
|
- `StateVector`: Contains aircraft position, speed, altitude, and other flight data
|
|
183
180
|
- Basic info: ICAO24, callsign, origin country
|
|
184
181
|
- Position: latitude, longitude, altitude (barometric and geometric)
|
|
@@ -198,6 +195,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
198
195
|
- Status: on ground flag
|
|
199
196
|
|
|
200
197
|
#### ADS-B Exchange API
|
|
198
|
+
|
|
201
199
|
- `AircraftProperties`: Detailed aircraft information including:
|
|
202
200
|
- Basic info: ICAO24, registration, type, callsign
|
|
203
201
|
- Position: latitude, longitude, altitude (barometric and geometric)
|
|
@@ -215,6 +213,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
215
213
|
- Processing information
|
|
216
214
|
|
|
217
215
|
#### HexDB API
|
|
216
|
+
|
|
218
217
|
- `AircraftInformation`: Aircraft registration and type details
|
|
219
218
|
- Basic info: ICAO type code, manufacturer, Mode S code
|
|
220
219
|
- Registration: operator flag code, registered owners, registration number
|
|
@@ -239,18 +238,21 @@ All response objects support conversion to GeoJSON format for easy integration w
|
|
|
239
238
|
## Installation
|
|
240
239
|
|
|
241
240
|
1. Clone the repository:
|
|
241
|
+
|
|
242
242
|
```bash
|
|
243
243
|
git clone https://github.com/sarumaj/local-flight-map.git
|
|
244
244
|
cd local-flight-map
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
1. Create and activate a virtual environment:
|
|
248
|
+
|
|
248
249
|
```bash
|
|
249
250
|
python -m venv .venv
|
|
250
251
|
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
251
252
|
```
|
|
252
253
|
|
|
253
|
-
|
|
254
|
+
1. Install the package:
|
|
255
|
+
|
|
254
256
|
```bash
|
|
255
257
|
pip install -e .
|
|
256
258
|
```
|
|
@@ -258,6 +260,7 @@ pip install -e .
|
|
|
258
260
|
## Configuration
|
|
259
261
|
|
|
260
262
|
Create a `.env` file in the project root with your API credentials:
|
|
263
|
+
|
|
261
264
|
```
|
|
262
265
|
ADS_B_EXCHANGE_API_KEY=your_api_key_here
|
|
263
266
|
OPENSKY_USERNAME=your_username_here
|
|
@@ -267,13 +270,14 @@ OPENSKY_PASSWORD=your_password_here
|
|
|
267
270
|
## Usage
|
|
268
271
|
|
|
269
272
|
1. Start the application:
|
|
273
|
+
|
|
270
274
|
```bash
|
|
271
275
|
local-flight-map
|
|
272
276
|
```
|
|
273
277
|
|
|
274
|
-
|
|
278
|
+
1. Open your web browser and navigate to `http://localhost:5006`
|
|
275
279
|
|
|
276
|
-
|
|
280
|
+
2. The interactive map will display:
|
|
277
281
|
- Current aircraft positions and path tracking
|
|
278
282
|
- Aircraft information on hover
|
|
279
283
|
- Real-time updates
|
|
@@ -281,6 +285,7 @@ local-flight-map
|
|
|
281
285
|
## Development
|
|
282
286
|
|
|
283
287
|
To run tests:
|
|
288
|
+
|
|
284
289
|
```bash
|
|
285
290
|
pip install -e ".[test]"
|
|
286
291
|
pytest
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
[](https://github.com/sarumaj/local-flight-map/actions/workflows/release.yml)
|
|
2
|
-
[](https://github.com/sarumaj/local-flight-map/actions/workflows/deploy.yml)
|
|
3
|
-
[](https://github.com/sarumaj/local-flight-map/releases/latest)
|
|
4
|
-
[](https://github.com/sarumaj/local-flight-map/blob/main/pyproject.toml)
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
1
|
# Local Flight Map
|
|
9
2
|
|
|
10
3
|
A 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.
|
|
11
4
|
|
|
12
|
-
This app is currently hosted at [local-flight-map.
|
|
5
|
+
This app is currently hosted at [local-flight-map.apps.ciepiela.org](https://local-flight-map.apps.ciepiela.org).
|
|
13
6
|
|
|
14
|
-
[](https://local-flight-map.
|
|
7
|
+
[](https://local-flight-map.apps.ciepiela.org)
|
|
15
8
|
|
|
16
9
|
## Features
|
|
17
10
|
|
|
@@ -31,6 +24,7 @@ This app is currently hosted at [local-flight-map.sarumaj.com](https://local-fli
|
|
|
31
24
|
The application integrates data from multiple sources to provide comprehensive flight information:
|
|
32
25
|
|
|
33
26
|
#### OpenSky Network API
|
|
27
|
+
|
|
34
28
|
- **Authentication**: Username and password required for some endpoints
|
|
35
29
|
- **Endpoints**:
|
|
36
30
|
- `/api/states/all`: Get all aircraft states
|
|
@@ -38,6 +32,7 @@ The application integrates data from multiple sources to provide comprehensive f
|
|
|
38
32
|
- `/api/tracks/all`: Get all flight tracks
|
|
39
33
|
|
|
40
34
|
#### ADS-B Exchange API
|
|
35
|
+
|
|
41
36
|
- **Authentication**: API key required
|
|
42
37
|
- **Endpoints**:
|
|
43
38
|
- `/v2/registration/{registration}`: Get aircraft by registration
|
|
@@ -48,7 +43,8 @@ The application integrates data from multiple sources to provide comprehensive f
|
|
|
48
43
|
- `/v2/lat/{lat}/lon/{lon}/dist/{radius}`: Get aircraft in area
|
|
49
44
|
|
|
50
45
|
#### HexDB API
|
|
51
|
-
|
|
46
|
+
|
|
47
|
+
- **Base URL**: <https://hexdb.io/>
|
|
52
48
|
- **Endpoints**:
|
|
53
49
|
- `/api/v1/aircraft/icao/{icao24}`: Get aircraft information
|
|
54
50
|
- `/api/v1/airport/icao/{icao24}`: Get airport information
|
|
@@ -75,22 +71,22 @@ config = ApiConfig(
|
|
|
75
71
|
async with OpenSkyClient(config) as opensky_client:
|
|
76
72
|
# Get all aircraft states
|
|
77
73
|
states = await opensky_client.get_states_from_opensky()
|
|
78
|
-
|
|
74
|
+
|
|
79
75
|
# Get states for specific aircraft
|
|
80
76
|
aircraft_states = await opensky_client.get_states_from_opensky(
|
|
81
77
|
icao24="icao24_code"
|
|
82
78
|
)
|
|
83
|
-
|
|
79
|
+
|
|
84
80
|
# Get states in a specific area
|
|
85
81
|
area_states = await opensky_client.get_states_from_opensky(
|
|
86
82
|
bbox=BBox(min_lat=40.0, max_lat=41.0, min_lon=-74.0, max_lon=-73.0)
|
|
87
83
|
)
|
|
88
|
-
|
|
84
|
+
|
|
89
85
|
# Get states from own feeder
|
|
90
86
|
own_states = await opensky_client.get_my_states_from_opensky(
|
|
91
87
|
serials=[1, 2, 3] # Optional: filter by sensor serial numbers
|
|
92
88
|
)
|
|
93
|
-
|
|
89
|
+
|
|
94
90
|
# Get flight track for specific aircraft
|
|
95
91
|
track = await opensky_client.get_track_by_aircraft_from_opensky(
|
|
96
92
|
icao24="icao24_code",
|
|
@@ -103,25 +99,25 @@ async with AdsbExchangeClient(config) as adsbexchange_client:
|
|
|
103
99
|
aircraft_by_reg = await adsbexchange_client.get_aircraft_from_adsbexchange_by_registration(
|
|
104
100
|
registration="N12345"
|
|
105
101
|
)
|
|
106
|
-
|
|
102
|
+
|
|
107
103
|
# Get aircraft by ICAO24 address
|
|
108
104
|
aircraft_by_icao = await adsbexchange_client.get_aircraft_from_adsbexchange_by_icao24(
|
|
109
105
|
icao24="icao24_code"
|
|
110
106
|
)
|
|
111
|
-
|
|
107
|
+
|
|
112
108
|
# Get aircraft by callsign
|
|
113
109
|
aircraft_by_callsign = await adsbexchange_client.get_aircraft_from_adsbexchange_by_callsign(
|
|
114
110
|
callsign="ABC123"
|
|
115
111
|
)
|
|
116
|
-
|
|
112
|
+
|
|
117
113
|
# Get aircraft by squawk code
|
|
118
114
|
aircraft_by_squawk = await adsbexchange_client.get_aircraft_from_adsbexchange_by_squawk(
|
|
119
115
|
squawk="7500"
|
|
120
116
|
)
|
|
121
|
-
|
|
117
|
+
|
|
122
118
|
# Get military aircraft
|
|
123
119
|
military_aircraft = await adsbexchange_client.get_military_aircrafts_from_adsbexchange()
|
|
124
|
-
|
|
120
|
+
|
|
125
121
|
# Get aircraft within range
|
|
126
122
|
aircraft_in_range = await adsbexchange_client.get_aircraft_from_adsbexchange_within_range(
|
|
127
123
|
center=Location(latitude=40.7128, longitude=-74.0060), # New York City
|
|
@@ -134,12 +130,12 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
134
130
|
aircraft_info = await hexdb_client.get_aircraft_information_from_hexdb(
|
|
135
131
|
icao24="icao24_code"
|
|
136
132
|
)
|
|
137
|
-
|
|
133
|
+
|
|
138
134
|
# Get airport information
|
|
139
135
|
airport_info = await hexdb_client.get_airport_information_from_hexdb(
|
|
140
136
|
icao24="KJFK" # ICAO airport code
|
|
141
137
|
)
|
|
142
|
-
|
|
138
|
+
|
|
143
139
|
# Get route information
|
|
144
140
|
route_info = await hexdb_client.get_route_information_from_hexdb(
|
|
145
141
|
callsign="ABC123"
|
|
@@ -149,6 +145,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
149
145
|
### Response Objects
|
|
150
146
|
|
|
151
147
|
#### OpenSky Network API
|
|
148
|
+
|
|
152
149
|
- `StateVector`: Contains aircraft position, speed, altitude, and other flight data
|
|
153
150
|
- Basic info: ICAO24, callsign, origin country
|
|
154
151
|
- Position: latitude, longitude, altitude (barometric and geometric)
|
|
@@ -168,6 +165,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
168
165
|
- Status: on ground flag
|
|
169
166
|
|
|
170
167
|
#### ADS-B Exchange API
|
|
168
|
+
|
|
171
169
|
- `AircraftProperties`: Detailed aircraft information including:
|
|
172
170
|
- Basic info: ICAO24, registration, type, callsign
|
|
173
171
|
- Position: latitude, longitude, altitude (barometric and geometric)
|
|
@@ -185,6 +183,7 @@ async with HexDbClient(config) as hexdb_client:
|
|
|
185
183
|
- Processing information
|
|
186
184
|
|
|
187
185
|
#### HexDB API
|
|
186
|
+
|
|
188
187
|
- `AircraftInformation`: Aircraft registration and type details
|
|
189
188
|
- Basic info: ICAO type code, manufacturer, Mode S code
|
|
190
189
|
- Registration: operator flag code, registered owners, registration number
|
|
@@ -209,18 +208,21 @@ All response objects support conversion to GeoJSON format for easy integration w
|
|
|
209
208
|
## Installation
|
|
210
209
|
|
|
211
210
|
1. Clone the repository:
|
|
211
|
+
|
|
212
212
|
```bash
|
|
213
213
|
git clone https://github.com/sarumaj/local-flight-map.git
|
|
214
214
|
cd local-flight-map
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
1. Create and activate a virtual environment:
|
|
218
|
+
|
|
218
219
|
```bash
|
|
219
220
|
python -m venv .venv
|
|
220
221
|
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
221
222
|
```
|
|
222
223
|
|
|
223
|
-
|
|
224
|
+
1. Install the package:
|
|
225
|
+
|
|
224
226
|
```bash
|
|
225
227
|
pip install -e .
|
|
226
228
|
```
|
|
@@ -228,6 +230,7 @@ pip install -e .
|
|
|
228
230
|
## Configuration
|
|
229
231
|
|
|
230
232
|
Create a `.env` file in the project root with your API credentials:
|
|
233
|
+
|
|
231
234
|
```
|
|
232
235
|
ADS_B_EXCHANGE_API_KEY=your_api_key_here
|
|
233
236
|
OPENSKY_USERNAME=your_username_here
|
|
@@ -237,13 +240,14 @@ OPENSKY_PASSWORD=your_password_here
|
|
|
237
240
|
## Usage
|
|
238
241
|
|
|
239
242
|
1. Start the application:
|
|
243
|
+
|
|
240
244
|
```bash
|
|
241
245
|
local-flight-map
|
|
242
246
|
```
|
|
243
247
|
|
|
244
|
-
|
|
248
|
+
1. Open your web browser and navigate to `http://localhost:5006`
|
|
245
249
|
|
|
246
|
-
|
|
250
|
+
2. The interactive map will display:
|
|
247
251
|
- Current aircraft positions and path tracking
|
|
248
252
|
- Aircraft information on hover
|
|
249
253
|
- Real-time updates
|
|
@@ -251,6 +255,7 @@ local-flight-map
|
|
|
251
255
|
## Development
|
|
252
256
|
|
|
253
257
|
To run tests:
|
|
258
|
+
|
|
254
259
|
```bash
|
|
255
260
|
pip install -e ".[test]"
|
|
256
261
|
pytest
|
|
@@ -262,4 +267,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
|
262
267
|
|
|
263
268
|
## Contributing
|
|
264
269
|
|
|
265
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
270
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "local-flight-map"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
description = "Open Air Traffic map based on ADS-B Exchange and Open Sky Data."
|
|
9
9
|
requires-python = ">=3.12"
|
|
10
10
|
authors = [
|
|
@@ -18,19 +18,19 @@ classifiers = [
|
|
|
18
18
|
"Operating System :: OS Independent"
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
"aiohttp==3.
|
|
21
|
+
"aiohttp==3.14.5",
|
|
22
22
|
"asyncio==4.0.0",
|
|
23
|
-
"async-lru==2.
|
|
23
|
+
"async-lru==2.4.0",
|
|
24
24
|
"cloudscraper==1.2.71",
|
|
25
|
-
"fastapi==0.
|
|
25
|
+
"fastapi==0.158.2",
|
|
26
26
|
"folium==0.20.0",
|
|
27
27
|
"itsdangerous==2.2.0",
|
|
28
|
-
"lxml==6.
|
|
28
|
+
"lxml==6.1.3",
|
|
29
29
|
"nest-asyncio==1.6.0",
|
|
30
|
-
"orjson==3.
|
|
31
|
-
"pydantic==2.
|
|
32
|
-
"pydantic-settings==2.
|
|
33
|
-
"uvicorn==0.
|
|
30
|
+
"orjson==3.13.0",
|
|
31
|
+
"pydantic==2.14.3",
|
|
32
|
+
"pydantic-settings==2.16.2",
|
|
33
|
+
"uvicorn==0.54.0"
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
[project.scripts]
|
|
@@ -38,8 +38,8 @@ local-flight-map = "local_flight_map.__main__:main"
|
|
|
38
38
|
|
|
39
39
|
[project.optional-dependencies]
|
|
40
40
|
test = [
|
|
41
|
-
"pytest==9.
|
|
42
|
-
"pytest-asyncio==1.
|
|
41
|
+
"pytest==9.1.1",
|
|
42
|
+
"pytest-asyncio==1.4.1.post1"
|
|
43
43
|
]
|
|
44
44
|
|
|
45
45
|
[tool.setuptools.packages.find]
|
|
@@ -63,3 +63,6 @@ addopts = [
|
|
|
63
63
|
"-v",
|
|
64
64
|
"--asyncio-mode=auto"
|
|
65
65
|
]
|
|
66
|
+
filterwarnings=[
|
|
67
|
+
"ignore::async_lru.AlruCacheLoopResetWarning"
|
|
68
|
+
]
|
|
@@ -48,7 +48,7 @@ class ResponseObject:
|
|
|
48
48
|
defaults[field_name] = None
|
|
49
49
|
elif field_type.__origin__ is Union:
|
|
50
50
|
defaults[field_name] = None
|
|
51
|
-
defaults.update(data)
|
|
51
|
+
defaults.update({k: v for k, v in data.items() if k in cls.__annotations__})
|
|
52
52
|
return cls(**defaults)
|
|
53
53
|
|
|
54
54
|
def to_json(self) -> str:
|
{local_flight_map-1.2.0 → local_flight_map-1.2.2}/src/local_flight_map/api/jetphotos/client.py
RENAMED
|
@@ -55,6 +55,7 @@ class JetPhotosClient:
|
|
|
55
55
|
exc_tb: The traceback of the exception, if any
|
|
56
56
|
"""
|
|
57
57
|
_ = (exc_type, exc_val, exc_tb)
|
|
58
|
+
await self.get_aircraft_photo.cache_close()
|
|
58
59
|
self._scrapper.close()
|
|
59
60
|
|
|
60
61
|
def _find_elem_by_xpath(self, body: str, xpath: str) -> Optional[str]:
|
|
@@ -81,7 +82,7 @@ class JetPhotosClient:
|
|
|
81
82
|
),
|
|
82
83
|
)
|
|
83
84
|
|
|
84
|
-
@alru_cache(maxsize=
|
|
85
|
+
@alru_cache(maxsize=100)
|
|
85
86
|
async def get_aircraft_photo(self, registration: str) -> Optional[JetPhotosResponse]:
|
|
86
87
|
"""
|
|
87
88
|
Fetch the photo URL for a given aircraft registration.
|
|
@@ -5,9 +5,9 @@ Provides configuration classes and settings for the map interface.
|
|
|
5
5
|
|
|
6
6
|
import logging
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import Literal, TypeAlias
|
|
8
|
+
from typing import Any, Literal, TypeAlias
|
|
9
9
|
|
|
10
|
-
from pydantic import Field
|
|
10
|
+
from pydantic import Field, field_validator
|
|
11
11
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
12
12
|
|
|
13
13
|
from ...api.base import BBox, Location
|
|
@@ -46,7 +46,7 @@ class MapConfig(BaseSettings):
|
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
map_center: Location = Field(
|
|
49
|
-
default_factory=lambda: Location(latitude=
|
|
49
|
+
default_factory=lambda: Location(latitude=49.8817048, longitude=8.6135195), description="The center of the map"
|
|
50
50
|
)
|
|
51
51
|
map_radius: float = Field(default=50, description="The radius of the map")
|
|
52
52
|
map_zoom_start: int = Field(default=12, description="The zoom level of the map")
|
|
@@ -77,6 +77,35 @@ class MapConfig(BaseSettings):
|
|
|
77
77
|
cli_kebab_case=True,
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
+
@field_validator("map_center", mode="before")
|
|
81
|
+
def parse_map_center(cls, value: Any) -> Any:
|
|
82
|
+
"""
|
|
83
|
+
Parse the map center from a string.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
value: The input value for the map center.
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
The parsed Location object for the map center.
|
|
90
|
+
|
|
91
|
+
Raises:
|
|
92
|
+
ValueError: If the input value cannot be parsed into a Location.
|
|
93
|
+
|
|
94
|
+
Example:
|
|
95
|
+
If the input value is "49.8817048, 8.6135195", it will be parsed into Location(latitude=49.8817048, longitude=8.6135195).
|
|
96
|
+
"""
|
|
97
|
+
if isinstance(value, Location):
|
|
98
|
+
return value
|
|
99
|
+
|
|
100
|
+
if isinstance(value, str):
|
|
101
|
+
try:
|
|
102
|
+
lat_str, lon_str = value.split(",")
|
|
103
|
+
return Location(latitude=float(lat_str.strip()), longitude=float(lon_str.strip()))
|
|
104
|
+
except Exception as e:
|
|
105
|
+
raise ValueError(f"Invalid map_center format: {value}") from e
|
|
106
|
+
|
|
107
|
+
raise ValueError(f"Unsupported type for map_center: {type(value)}")
|
|
108
|
+
|
|
80
109
|
@property
|
|
81
110
|
def map_bbox(self) -> BBox:
|
|
82
111
|
"""
|
|
Binary file
|
|
Binary file
|
|
@@ -771,9 +771,18 @@ window.addEventListener("mapReady", async (e) => {
|
|
|
771
771
|
throw new Error("No bounds in configuration");
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
if (
|
|
775
|
+
!config.bounds.north ||
|
|
776
|
+
!config.bounds.south ||
|
|
777
|
+
!config.bounds.east ||
|
|
778
|
+
!config.bounds.west
|
|
779
|
+
) {
|
|
780
|
+
throw new Error("Incomplete bounds in configuration");
|
|
781
|
+
}
|
|
782
|
+
|
|
774
783
|
const initialBounds = L.latLngBounds(
|
|
775
|
-
L.latLng(
|
|
776
|
-
L.latLng(
|
|
784
|
+
L.latLng(config.bounds.south, config.bounds.west),
|
|
785
|
+
L.latLng(config.bounds.north, config.bounds.east),
|
|
777
786
|
);
|
|
778
787
|
|
|
779
788
|
window.draggableBBox = new DraggableBBox(map, initialBounds);
|