I am monitoring airport traffic at the airport I am based at. I use the ADS-B Exchange raspberry Pi and fetch data using tar1090 to continuously poll for traffic. However, tar1090 is not reliable. It drops data and sometimes hangs. Is there another way I can get all of the traffic locally? I am using a PC running Ubuntu and code written in c++ to read the rPi and write to my cloud storage.
How are you getting the data from tar1090? http://adsbexchange.local/tar1090/data/aircraft.json should be reliable.
I open a socket, perform a send(), followed by recv [until I don’t get any bytes back] then close the socket. I wait 0.9 seconds and try again. As expected I get the same packet back after 10 unique ones. However, every 25 seconds or so the next packet back has a timestamp which is 2 seconds later, not 1.
I have two rPi units - one at home and one in my hangar, they are identical. The hangar unit has started skipping minutes of data. I’ve instrumented the code to help compare the two units. I probably never noticed the loss of 1 second. Once I kept a log file which included status which allowed me to know if I’m not getting a unique packet every second I noticed that loss. I haven’t been to the hangar yet to update the code there.
I’ve been running the logging system at the hangar for over a year now. Until recently it has been working well enough. However, I found out early that I must reboot the rPi unit every few days or it will hang and never return anything from the tar1090 request. So, every night after midnight I power cycle the unit. That fixed the hanging issue.
I don’t know much about tar 1090, I use dump1090 on every pi I have, and no trouble to report so far.
Maybe you can have a try with it ?