web/webserver.py) that:
- Subscribes to decoded plane PDUs over ZeroMQ (default address
tcp://127.0.0.1:5001) - Pushes aircraft updates to a connected browser over Socket.IO
- Renders live aircraft positions on Google Maps at
http://localhost:5000
Prerequisites
Install the required Python packages before running the webserver for the first time:Starting the webserver and flowgraph
Start the webserver
Run the webserver using either of the following commands:The server starts listening on
127.0.0.1:5000 for HTTP connections and subscribes to ZeroMQ messages on 127.0.0.1:5001.Open the GRC flowgraph and enable ZeroMQ
In GNU Radio Companion, open
gr-adsb/examples/adsb_rx.grc. Ensure the ZeroMQ Pub Sink block is enabled and configured to publish to:Address configuration
The webserver source defines its addresses as module-level constants:web/webserver.py.
How it works
The webserver runs a background thread (zmq_thread) that loops indefinitely, receiving serialised PMT PDUs from the ZeroMQ socket. Each PDU contains a dictionary of decoded aircraft fields (ICAO address, callsign, altitude, speed, heading, latitude, longitude, etc.). The thread deserialises each PDU and emits an updatePlane Socket.IO event to all connected browser clients:
updatePlane events to create or update aircraft markers on the Google Maps view.