johanohly / AirTrail

A modern, open-source personal flight tracking system
http://airtrail.johan.ohly.dk/
GNU General Public License v3.0
269 stars 10 forks source link

Importing past flights with Airportcode TXL doesn't work #14

Closed Maxklos closed 1 month ago

Maxklos commented 1 month ago

The bug

When I import past flight from Flightradar24 it works without error. But flights from and to the (now closed) Airport Berlin-Tegel TXL are "forgotten" and not displayed. Flight to the (also now closed) Airport Berlin Schönefeld SXF are converted to BER. I can't manually add flight to/from TXL&SXF either, just BER. That's ok, but old data get lost this way.

Both versions could work:

Export file for testing (both TXL & SXF flights) flightdiary_2024_09_12_08_59.csv

Operating System that is running AirTrail

Ubuntu WSL

AirTrail Version

latest

Your docker-compose.yml content

No response

Your .env content

No response

Reproduction steps

1.import file with airport code TXL 2.flights won't appear

Relevant log output

No response

Additional information

No response

johanohly commented 1 month ago

Good find, I'll add a list of closed airports. I am not sure how SXF is converted to BER though. Is SXF mentioned in the CSV and does AirTrail show it as BER in the end?

Maxklos commented 1 month ago

Yes, in the CSV this flight is SXF -> ARN but in Airtrail it's BER -> ARN.

image image

All my SXF flights got converted to BER

johanohly commented 1 month ago

The airports are matched by their ICAO code, rather than their IATA code, to support airports without a IATA code. In AirTrails' database, Berlin Brandenburg Airports ICAO code is EDDB which, in your CSV, matches Berlin Schoenefeld. I think the ICAO code got transferred when Schoenefeld shut down.

johanohly commented 1 month ago

Handled in v0.1.0, you would have to re-import the flights though

Maxklos commented 1 month ago

reimported my flight, everything works as expected. Thank you very much!