Overhaul web UI and improve ADS-B emitter category support#195
Open
m3ftwz wants to merge 7 commits intoantirez:masterfrom
Open
Overhaul web UI and improve ADS-B emitter category support#195m3ftwz wants to merge 7 commits intoantirez:masterfrom
m3ftwz wants to merge 7 commits intoantirez:masterfrom
Conversation
Reorganize the monolithic gmap.html into a modular web/ directory with separate JS modules for aircraft icons, flight trails, info panel, and map state. Aircraft markers now use distinct SVG silhouettes based on emitter category instead of a generic plane icon. Selecting an aircraft draws an altitude-colored flight trail with adaptive sampling. On the backend, decode the full ADS-B emitter category (A0–D7) instead of just the coarse aircraft_type, expose it in /data.json, and add human-readable labels per FAA AC 20-165B. Fix --ifile replay to pace data at the real SDR sample rate using nanosleep(), and return proper HTTP status codes (404/500) from the embedded server.
Contributor
Author
|
Ready and tested with a real RTL-SDR dongle and antenna :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Overhaul of the web interface, replacing the monolithic
gmap.htmlwith a modular, multi-file architecture served fromweb/. This PR also includes backend changes to properly decode and expose ADS-B emitter categories, improved--ifilereplay timing, and a more correct embedded HTTP server.Web UI
Modular architecture
The single
gmap.htmlfile has been reorganized into a structuredweb/directory:web/index.html— minimal shell, external CSS/JSweb/assets/css/style.css— glassmorphism-styled dark themeweb/assets/js/main.js— app entry point and data fetch loopweb/assets/js/aircraft.js— marker icon selection by emitter category, rotation logicweb/assets/js/panel.js— info panel rendering, dragging, copy-to-clipboardweb/assets/js/trail.js— flight trail drawing with altitude-based color gradientweb/assets/js/lib/icons.js— inline SVG aircraft silhouettes (jet, heavy, private jet, prop, helicopter, glider, drone, balloon, ground vehicle, obstacle)web/assets/js/lib/storage.js— localStorage helpers for map view persistenceweb/assets/js/lib/utils.js— clipboard utilitySVG aircraft silhouettes
Aircraft markers now use distinct top-down SVG silhouettes based on ADS-B emitter category instead of a generic Font Awesome plane icon for all aircraft. Icons include: single-engine prop, twin turboprop, jet, heavy jet, private jet, helicopter, glider, balloon, drone, ground vehicle, and obstacle marker.
Non-directional icons (balloon, obstacle, parachute) do not rotate with track heading.
Flight trail visualization
Selecting an aircraft now draws its flight trail on the map with:
Other UI improvements
interact.jsdependency with native Pointer Events for panel draggingBackend (dump1090.c)
ADS-B emitter category support
emitter_category, using a flat 0–31 encoding that combines the category set (A–D) and code (0–7)emitter_category_labelslookup table with human-readable labels per FAA AC 20-165Bemitter_categoryis now stored on theaircraftstruct, decoded from identification messages, and included in the/data.jsonresponseImproved
--ifilereplay timingusleep()delay with a sample-rate-proportionalnanosleep()delay, so file replay matches real-time SDR data rate--netmode (previously only--interactive)HTTP server improvements
application/json(no charset), addedtext/css,application/javascript,text/plainweb/assets with explicit path allowlist (no directory traversal)Misc
#include <time.h>fornanosleep()/struct timespec