Ysurac / FlightAirMap

Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
https://www.flightairmap.com/
GNU Affero General Public License v3.0
516 stars 157 forks source link

"Coming From" and "Going To" columns are always "not available" #347

Closed daviessm closed 6 years ago

daviessm commented 6 years ago

I can't see any code which inserts or updates data in the departure_airport_name or arrival_airport_name columns in spotter_output which is displayed on various statistics pages. If there's never any data, should the columns be hidden?

Ysurac commented 6 years ago

No. If retrieve schedule... is enabled and/or update_db.php some data should display.

daviessm commented 6 years ago

I've had another look and this only seems to populate if oneworld or skyteam APIs are used, or the routes are found in an SQLite database (which I haven't tracked down yet). I have schedules set to true but the only API I currently have a key for is FlightAware - should it work in that circumstance?

Ysurac commented 6 years ago

No, this doesn't use oneworld or skyteam api or any sqlite db. Schedule doesn't work for all flights. And if you never run update_db.php this will work for even less flights because of flights ident translation.

daviessm commented 6 years ago

I do run update_1db.php every hour and still no schedules. If you can tell me where they're pulled from I can have a dig through and figure out why.

Ysurac commented 6 years ago

they are pulled from my flightairmap.com website. Else it's from several website like flightaware. Not all flights are available.

Ysurac commented 6 years ago

When downloaded, all schedules are in routes table. So this table shouldn't be empty.

daviessm commented 6 years ago

Ok, I can see that. Routes are there and spotter_live table contains departure and arrival airports, but spotter_output still doesn't, which I think is where the statistics pages pull from. What should update that?

Ysurac commented 6 years ago

Fixed in latest commit: data in spotter_output was not updated if ident not available when first seen, so only available schedules was used.

daviessm commented 6 years ago

Excellent! As an aside while I was looking around I noticed that about a fifth of the records in the routes table use IATA airport identifiers rather than ICAO. No idea if that's a problem, however.

daviessm commented 6 years ago

Departure/arrival airport information now confirmed working with the latest change. Good work!