Something new to play with for those using airspy receivers:
This script generates some stats and plots from graphs1090 data.
This graph plots range against total aircraft, categorised by gain.
Signal to Noise Ratio against total aircraft. There are traces for minimum, 5%, 25%, 50%, 75%, 95% and maximum values, as recorded on the graphs1090 plot.
The same data, but categorised by gain using the same colours as on the graphs1090 plot.
The range of signal to noise ratio for each gain (ie maximum - minimum values).
The preceding graphs are intended to help identify whether the gain setting is appropriate. Too low a gain could compromise maximum range, and too high can reduce SNR. In my example data you can see that there is very little variation in maximum range between the gains selected by the autogain algorithm.
This graph shows the minimum noise values, which approximate to the noise floor of the receiver:
The values here should normally increase in approximately linearly with each gain step. The data shown here is atypical due to the changes in rssi measurement in the recent decoder updates.
This graph shows the average number of DF17 messages received for each ads-b aircraft, plotted against the total number of aircraft (including mode-s only/mlat aircraft).
As traffic increases, more messages are garbled leading to fewer decoded per aircraft.
This graph shows the relationship between the total number of messages and the preamble filter:
It’s plotted with messages on the x-axis since most people are using the CPU target option, which means the preamble filter will react to traffic levels. The three distinct groupings in this example are due to decoder changes.
Finally, a summary of how the reception rate of the various message types react to overall traffic:
How to install and use:
The script is written in python and uses seaborn and pandas, so you need those installed. It also assumes you are using graphs1090.
sudo apt install python3-pip libatlas-base-dev
sudo pip3 install --upgrade pip
then install pandas and seaborn:
pip3 install pandas seaborn
download the script:
wget https://raw.githubusercontent.com/caiusseverus/adsbcompare/master/airspystats.py
Create the output directory:
sudo mkdir /usr/local/share/tar1090/html/stats/
sudo chmod o+rw /usr/local/share/tar1090/html/stats/
The tar1090 web directory is used by default as it’s a convenient place that’s already available via the web server. If you want it elsewhere, just edit the outdir
variable near the top of the script.
To run the script:
python3 airspystats.py
Once finished, you should be able to see the output by going to the url on your pi.
For example:
http://adsbpi/tar1090/stats/
A note on interpreting these graphs:
You need to be a bit careful drawing conclusions from these graphs unless you have considered what it is they are telling you. Most of them are categorised by gain. Since most people are now using the auto gain option, that makes gain a dependent variable. It changes with conditions, so you could for example see something like a lower SNR range for a particular gain setting, as is apparent in the examples above for gain 18. At first glance, it might appear that means that 18 is performing worse than the others, but that’s not necessarily the case.
Looking at when that gain is used shows that it is predominantly where there is minimal traffic. That makes the data much more noisy, and therefore less indicative of performance. To use these graphs more diagnostically would require controlling the gain so that it does not change dependent on traffic.
Anyway, maybe it’s useful to someone. It can at least make it easier to see how things change rather than having to extrapolate from a time series graph.