FlightAware Discussions

Coding an app for the FlightAware USB stick pro

My first post. I am totally new to ADS-B; just bought a FlightAware USB stick pro and an antenna and want to play around with them.

I am software developer, so would welcome advice for other coders.

Basically, I wan to read the data from my FlightAware, send it my server and place it into a database whence various software which I code can read it, manipulate it, display it, send alerts - the usual stuff.

I would strongly prefer to develop in Windows, falling back to Linux if that won’t work, and, as last choice, the Raspberry Pi (4 or Zero W).

Is it as simple as just opening a serial port and reading? Would I be advised to run dump1090 and process its output?

I am itching to get coding. Any advice on how best to proceed will be gratefully accepted

Yes.
Reading the aircraft.json is probably be the way to go. (not sure if dump1090-mr has that even)
dump1090-fa which doesn’t run on Windows i think (not sure, try and compile) has some more fields, but not sure which info you need.

Maybe just read the code of dump1090 … that will tell you how it interfaces with the SDR.

1 Like

Thanks for a quick and informative reply. I appreciate that a lot of effort has gone into the development of dump1090, and have no desire to reinvent the wheel.

My initial reaction was to link the dump1090 into my own app, but, on reflection, I may as well run it from the command line and capture its output/redirect its output into my app.

Since I am using Windows for most of my development work, I will try in a Linux VM run from Windows. I don’t really see the need for the Raspberry Pi (yet).

Thanks

Really the most useful interface is probably the aircraft.json, it’s normally written once a second.

I suppose you could parse

./view1090-fa --no-interactive

But that seems complicated.
If you mostly want to use aircraft positions … aircraft.json is the best bet.

You could always modify the dump1090-fa console output to your custom format without too much trouble.

1 Like

If you want to do it for processing the data only, there are already some Python scripts available on GitHub which are capable to get the output of aircraft.json and write it to a database.

There are already some experts who adapted dump1090 onto a Linux/Ubuntu machine. But i don’t know if the VM will get full access to the hardware stick of the host device

1 Like

Thanks, both, for the help

there are already some Python scripts available on GitHub which are capable to get the output of aircraft.json and write it to a database.

Any in particular that you wold recommend? Or should I just try a few until I find one that suits me?

There are already some experts who adapted dump1090 onto a Linux/Ubuntu machine.

Any URLs? In theory, it is trivial. In practice, the post that I find on this forum are out of date and the code won’t build :frowning:

But i don’t know if the VM will get full access to the hardware stick of the host device

It will certainly have access to a USB stick, but whether it can convert that to a virtual serial port & how that gets done, I am unsure

Check for user @abcd567 here in Forum . He did it with the current Piaware build 3.8.1 a few days ago.
You can also find parts of the discussion on the new build release announcement here in Forum.

Depends what level of hardware access is required. Some low-level devices cannot be virtualized. But i have no idea if an RTL stick is part of it.

I have been using this for a while, writing the output to a MySQL db. Worked very good. I stopped it due to the pure amount of data generated.

1 Like

abcd567 just released this thread:

1 Like

Virtual serial port? That’s not how the rtl-sdr USB sticks transfer data …

And compiling dump1090-fa on Ubuntu / Debian really isn’t that hard.

If you aren’t able to just check the github readme for dump1090-fa on how you compile it … and stick with it for a bit …
you can use this script which should compile a dump1090-fa fork which provide pretty much the same aircraft.json: https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-readsb

1 Like

Looks like it is not going to work from a Ubuntu VM under Windows :frowning: Time to fire ip the Pi, I guess

e@VirtualBox-Linux-Development:~/piaware_builder$ dump1090-fa 
Sat Mar 28 10:52:53 2020 GMT  dump1090-fa 3.8.1 starting up.
rtlsdr: no supported devices found.