Just use docker on the Pi4?
Hereās an interesting thing I found in FlightAirMap:
When you click on an aircraft shown on the map, it brings up the flight and aircraft details, but it doesnāt show the aircraft hex code anywhere. However, if you hover over the ātrack it linkā or the flight number under the photo (the one thet takes you to the flight details page), the hex code is contained in URL.
Since updating my FlightAirMap database from my Virtual Radar Server one, FAM has been working better in terms of correctly identifying 'planes and showing ACARS messages but the 'plane icons jump all over the screen, which I assume is due to the way it polls the JSON from VRS.
Anyway, Iāve reverted to collecting data from the dump1090 outputs and it is working well now. Iām resigned to having to keep the database updated manually for the foreseeable future but would like to find a way of correcting duff info and filling in the blanks automatically.
Went to look at FlightAirMap yesterday and every 'plane was showing NA next to it. Messed about with it for a bit and decided the easiest thing was to reboot the Pi. Only problem is, it wonāt reboot because the root filesystem is corrupted and I canāt repair it.
My most recent useable image is from before all the changes I made to get it to where it was but despite all the effort I put into it, Iām not that upset and I donāt think Iām going to bother reinstating it.
I now have a 4GB RPi 4 that is begging for another project.
That sucks.
Iāve had a few sd cards appear corrupt but they just had space issues.
Purged a bunch of junk like logs and cleaned sources and they came back up.
If only.
Couldnāt mount the root partition on anything as it was corrupt/unreadable/dirty. Couldnāt fix it as it reported an error after a minute or so.
edit: ran a read/write scan and found some ābad sectorsā.
I started getting ACARS/VDL2 withdrawal symptoms after ten days so I reinstated FlightAirMap on a new SD card.
Lost a month or soās worth of data and had to re-run the update but everything is working tickety boo again.
Just need to figure out a way of keeping the aircraft data up to date automatically as the method Iām using is too time consuming.
Looking for some advice here, followed the Raspbian directions and Iām up and running with FlightAirMap on a debian VM, using my Piaware aircraft.json as the data source. I see planes, but the altutide and speed are missing from all of the planes. Iām guessing something has changed in FAās version of the aircraft.json file and itās not lining up with FAM.
Running the daemon-spotter.php file in the console, hereās an example of what Iām seeing:
DATA : hex : A8B848 - ident : DAL8933 - ICAO : B752 - Departure Airport : KCLT - Arrival Airport : KPHL - Latitude : 42.267746 - Longitude : -95.115946 - waypoints : - Altitude : - Heading : 203 - Speed : - Departure Airport Time : - Arrival Airport time : - Source Name : piaware
So as you can see, the fields for Altitude and Speed are emptyā¦ any thoughts?
Also Iāve noticed that the counter for AirCraft Visible in the corner is nearly double what Iām seeing in SkyAware. Any thoughts there?
Thanks!
you can view the raw version of your aircraft.json via your Skyaware. Did you do that?
As far as i remember the URL is /data/aircraft.json added to your Skyview URL
Yes, the data is in the aircraft.json file, next step was to review the json keys and see what daemon-spotter.php is expecting and modify as needed, but didnāt have much time yesterday. Wondering if anyone else has seen this and knew what I might have missed, or if FAās Dump1090 had modified their json file so they are using new keys that FlightAirMap doesnāt recognize.
Some of the keys did change, several years ago.
altitude changed to alt_baro
speed changed to gs
vert_rate change to baro_rate
Obviously there is also alt_geom and geom_rate but you donāt require them.
You could make the logic use either i suppose.
Thank you, I believe I found the section within the spotter.php file, but my PHP is a little rusty. Iāve tried changing the speed to gs in numrous spots within this file, and Iām still not seeing speeds show up when I run the PHP file in the console. I believe this is the correct section for the aircraftjson type, correct?
} elseif ($value['format'] === 'aircraftjson' &&
(
(isset($globalSources[$id]['minfetch']) && (time() - $last_exec[$id]['last'] > $globalSources[$id]['minfetch'])) ||
(!isset($globalSources[$id]['minfetch']) && (time() - $last_exec[$id]['last'] > $globalMinFetch))
)
) {
$buffer = $Common->getData($value['host']);
$all_data = json_decode($buffer,true);
if (isset($all_data['aircraft']) && isset($all_data['now']) && $all_data['now'] > time()-1800) {
$reset = 0;
foreach ($all_data['aircraft'] as $key => $line) {
$data = array();
// add support for ground vehicule with ~ in front of hex
if (isset($line['hex'])) $data['hex'] = $line['hex']; // hex
if (isset($line['flight'])) $data['ident'] = trim($line['flight']); // ident
if (isset($line['altitude'])) $data['altitude'] = $line['altitude']; // altitude
if (isset($line['speed'])) $data['speed'] = $line['speed']; // speed
if (isset($line['track'])) $data['heading'] = $line['track']; // heading
if (isset($line['lat'])) $data['latitude'] = $line['lat']; // lat
if (isset($line['lon'])) $data['longitude'] = $line['lon']; // long
if (isset($line['vert_rate'])) $data['vert_rate'] = $line['vert_rate']; // verticale rate
if (isset($line['squawk'])) $data['squawk'] = $line['squawk']; // squawk
//$data['emergency'] = ''; // emergency
//$data['registration'] = $line[2];
//$data['aircraft_icao'] = $line[0];
$data['datetime'] = date('Y-m-d H:i:s');
$data['format_source'] = 'aircraftjson';
$data['id_source'] = $id_source;
if (isset($value['name']) && $value['name'] != '') {
if (isset($line['mlat']) && !empty($line['mlat'])) $data['source_name'] = $value['name'].'_MLAT';
else $data['source_name'] = $value['name'];
} elseif (isset($line['mlat']) && !empty($line['mlat'])) $data['source_name'] = 'MLAT';
if (isset($value['noarchive']) && $value['noarchive'] === TRUE) $data['noarchive'] = true;
$SI->add($data);
unset($data);
}
Well you need to change 2 of the 3 occurences ā¦ otherwise youāll change the internal variables which is something you donāt want to mess with.
Thanks! it took me a fresh set of eyes and another day, but got this fixed. $line[āgsā] and the others as you mentioned, now all is well. thanks!
Iāve set up Flightairmap during the last couple of days on one of my available Raspberries.
It is working with acceptable performance on a Pi4
But the data they are using seem to be pretty much outdated, even if the database updates look current.
- more than 50% of the routes are incorrect
- lots of aircraft data are shown as ānot availableā. Itās not only the case for newer aircraft
As a fan of stats i would not rely on them. Especially the first one is interesting as my local VRS instance are showing most of the routes correct, so these should be there.
The lower one is the correct routeā¦ DB updated tonight
Checking the history of this aircraft shows that it was never on a route between Latvia and Bremen
Had another SD card destroyed by flightairmap yesterday. Same as before - system was running but not updating so I tried rebooting but it wouldnāt mount the volumes so I tried to check the disk in a laptop with LINUX but the card was unreadable.
Yes, the write access is significant, therefore a real HD/SSD is recommended.
Iām not sure it is worth the effort of reconfiguring the system to use an SSD or HDD because of all the issues with the data.