strix-technica / ADSB-tools

Tools for ADS-B analysis, especially on the Raspberry Pi
GNU General Public License v2.0
9 stars 4 forks source link

dump1090_ac error with dump1090-fa #4

Closed phipac closed 4 years ago

phipac commented 5 years ago

Good day, and thank you for your great code! This plugin worked fine with the dump1090-mutability program, but there seems to be one part that is not working with dump1090-fa. I get all of the data graphs except for the ac related graphs. Graphs in question can be viewed here:

https://munin.phipac.com/phipac.com/sedona/rf-pi.sedona/index.html#dump1090

When I execute munin-run dump1090_ac, I get the following output:

pi@rf-pi:/etc/default $ sudo munin-run dump1090_ac Traceback (most recent call last): File "/etc/munin/plugins/dump1090_ac", line 264, in do_fetch( which ) File "/etc/munin/plugins/dump1090_ac", line 201, in do_fetch max_dist = max( dist ) ValueError: max() arg is an empty sequence

I have searched the code to find out where it is getting, or, not getting, then information and I am coming up blank. Thank you very much for your assistance!

Phil

strix-technica commented 5 years ago

Have you set your location in dump1090's configuration? That's where this plugin gets the locus from and thereby the distance calculated.

The plugin probably doesn't handle error conditions terribly gracefully or with helpful error messages, sorry.

bondskin commented 4 years ago

Hi, I have the same issue. coordinates are defined in the /etc/default/dump1090-fa config file. RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005 --lat 53.5570 --lon 10.0092"

Epaphus commented 4 years ago

Pushed a fixed version. There was a change to json output from dump1090-fa a while back which changed altitude to nav_altitude, which would have been the original issue @phipac saw.

Seems they changed it again on the last release - https://github.com/flightaware/dump1090/commit/64236c55d805a596223e0031dc5f73fb686256d6#diff-454836148e5cd6c12005f4beecbd82cd

bondskin commented 4 years ago

Pushed a fixed version. There was a change to json output from dump1090-fa a while back which changed altitude to nav_altitude, which would have been the original issue @phipac saw.

Seems they changed it again on the last release - flightaware/dump1090@64236c5#diff-454836148e5cd6c12005f4beecbd82cd

Looks good now, thank you so much! On a side note, i am till getting the following error on munin-update, which seems to be cosmetic only, as the all the graphs are now created correctly

2019/11/02 08:20:03 Missing required attribute 'label' for data source 'n_lvl' in service dump1090_ac_n_pct on raspberrywatch.ip/192.168.2.33:4949 2019/11/02 08:20:03 Missing required attribute 'label' for data source 'n_pos' in service dump1090_ac_n_pct on raspberrywatch.ip/192.168.2.33:4949 2019/11/02 08:20:03 Missing required attribute 'label' for data source 'n_des' in service dump1090_ac_n_pct on raspberrywatch.ip/192.168.2.33:4949 2019/11/02 08:20:03 Missing required attribute 'label' for data source 'n_asc' in service dump1090_ac_n_pct on raspberrywatch.ip/192.168.2.33:4949

Epaphus commented 4 years ago

I get the same, I suspect it is due to the way multigraph is being used for altitude change graph. If I get time I might look in the Munin documents to see if could be improved. For now it won't cause any issues other than a few extra lines in the munin-update log.