I have written a script that captures data from dump1090-fa and plots a heatmap showing signal strength for each aircraft position. This example is plotted from about 15 hours of data.
The script samples currently visible aircraft from the aircraft.json file and records signal strength and position to a file. Gnuplot is then used to plot the data.
The plot is fairly naive, in that it ignores proper map projections so bearings won’t be quite correct, however it should give a reasonable representation of what is going on. My antenna is in the loft space, so you can clearly see radio shadows caused by the brick walls and roof structure.
The script is available here:
Note that you should set your receiver latitude and longitude at the top of the script in order for its position to be marked on the plot.
Usage is simple - there are two options when running the command. The first sets the duration of data gathering in minutes, and the second sets the sample interval in seconds.
./heatmap.sh 1440 10
This will collect data for 24 hours, every 10 seconds. Obviously the shorter the interval, the more data points you get but the more storage it will use.
The example above was sampled every 3 seconds for 15 hours or so, giving a total of about 2 million data points. Large numbers aren’t a problem for gnuplot, it just takes a little while to crunch through it. The data file was about 50MB.
If you want to run the script for longer periods and not worry about having to stay logged in for it to complete, you can do this:
nohup ./heatmap.sh 1440 10 &
which will start the script running in the background and leave it running if you log out.
The collected data is saved in a file in the current directory called
and the plot is also saved with the current date, but also copied to the dump1090 folder so it can be seen/saved from your browser at:
You need to have gnuplot, and jq (think it is by default on raspbian) installed for this to work.
Scripts related to this are kept in this repository: https://github.com/caiusseverus/adsbcompare
bash heatmap.sh -1
There is now a version that produces plots based on range and bearing, and also produces additional azimuth/elevation and range/altitude plots:
These can be produced with the script:
Usage and options are exactly the same as for heatmap.sh, however you need to have gawk and gnuplot 5.2 installed. Raspbian stretch users will need to do:
sudo apt install gawk sudo apt install liblua5.3 curl -sO http://ftp.debian.org/debian/pool/main/g/gnuplot/gnuplot-data_5.2.6+dfsg1-3_all.deb curl -sO http://ftp.debian.org/debian/pool/main/g/gnuplot/gnuplot-nox_5.2.6+dfsg1-3_armhf.deb sudo dpkg -i ./gnuplot-data_5.2.6+dfsg1-3_all.deb sudo dpkg -i ./gnuplot-nox_5.2.6+dfsg1-3_armhf.deb
Note that this involves doing a lot of calculations and so it takes some time to produce output ~15 minutes or so on a Pi 3 for a full 24 hours of data.