Page 5 of 5

Re: Log aircraft tracked for replay

Posted: Mon Nov 02, 2020 11:52 pm
by gonzalu
ProHill wrote:
Sat Sep 05, 2015 12:01 am
A quick note on this to let anyone who is interested know that there are ways to get the full track pretty easily today. I got impatient, and worked out a way to dump the tracks to MySQL along with all the other data I was already capturing.

It leverages the AircraftList.json file with the trFmt=f parameter. This is documented here: http://www.virtualradarserver.co.uk/Doc ... tList.aspx

Basically, I grab this file every couple of minutes and parse the JSON with PHP. For my purposes, I grab the ModeS code, Callsign, the MLAT flag, and the flight track (the key is named "Cot"). All this gets stored into a temporary lookup table.

Separately, I have another process that imports flights from Basestation.sqb after they have disappeared from VRS for ~30 minutes. As part of the MySQL import process, I cross-reference the ModeS code in the lookup table above looking for entries last updated within the past hour or so, and grab the MLAT flag and the track data. This then gets saved with the other flight information from the Basestation db. There is no unique identifier to tie basestation data to the data in the AircraftList.json file, so I use the ModeS code and time box it to be fairly certain I'm matching up the right flight.

This is still experimental - we'll see how it works over time. If anyone wants to take a look: http://flights.hillhome.org/flights. Click on any flight and you should get the details page with the route and track maps.

Andy
Andy this is great. I was about to start playing but since my entire setup runs on a single Raspberry Pi, I wanted to ask you here if there is a modified instructions set that covers the install on an Rpi using VRS under Mono and what not.

My current setup:

Raspberry Pi 4
Flightaware PiAware 4.0
FlightAware Stick w 1/4 wave antenna
VRS3 Beta under Mono running Database Writer and Database Editor Plugins



Thank you!

Re: Log aircraft tracked for replay

Posted: Tue Nov 03, 2020 2:18 am
by gonzalu
So I was able to manually follow the steps in the SQLITE3 dbquerycommands file and output a flights.csv ... I then manually copied this over to the flights WEB directory and .. .well, I see data in the database. But when I open the flights.php file in the web browser, I get a blank page...

Not sure where I may have gone wrong but will try and parse it out. Then to automate the process in Linux vs Windows :)

Re: Log aircraft tracked for replay

Posted: Tue Nov 03, 2020 2:59 am
by gonzalu
OK, all working manually now...

next steps automation on Raspberry Pi

How do we correct the Google Map API errors??

Thanks for your help in advance

Re: Log aircraft tracked for replay

Posted: Tue Nov 03, 2020 4:11 am
by gonzalu
Automated via bash script and crontab on Linux
Also installed API key on the map.php file.

Thank you.

Image

Image