This example uses an external program and 2 non-core nodes.
dump1090 - the awesome ADS-B program from @antirez - https://github.com/antirez/dump1090
worldmap node - http://flows.nodered.org/node/node-red-contrib-web-worldmap
daemon node - http://flows.nodered.org/node/node-red-node-daemon
The Daemon node runs dump1090 --net
in the background. If you don't want to install this node then you can just run it in a separate window.
dump1090 --net
One of dump1090's hidden features is the ability to provide a json
object of the planes it can see via http://localhost:8080/data.json
. So we can poll this url to get a pre-decoded array of planes, then split this into individual planes, add the necessary parameters for the map, and finally forward to the map page's websocket.
Thanks! I have a slight mutation of this flow
https://gist.github.com/vielmetti/6329ea5a49dadd2f106980a20727d16e
which adapts it to work with http://github.com/mutability/dump1090 which is a fork of the original
dump1090
that adds some features and that moves the data it supplies around fromdata.json
todata/aircraft.json
and also slightly changes the format of the JSON object returned.Thanks again for the sample flow, this got me running quickly.