Stefan Koch
Stefan Koch
Live Flight Data Step by Step - Part 7 - Routes, and why almost a quarter are wrong

Live Flight Data Step by Step - Part 7 - Routes, and why almost a quarter are wrong

Stefan Koch Stefan Koch
· · 8 min read

Part 6 ended with a heuristic that guesses which airport an aircraft is approaching – and with the admission that what it’s really missing is where the flight is going. A transponder doesn’t send that. ADS-B carries position, altitude, speed and a callsign like SWR5GT, but no origin and no destination.

The callsign is the key. Airlines file their flights under it, and route databases map a callsign to a scheduled route. This post looks up every airline callsign from the day in parts 4 to 6 – and then does what I’d do with any external source: checks it against data I trust.

A route database: adsbdb

adsbdb is a free API for aircraft and callsigns. GET https://api.adsbdb.com/v0/callsign/SWR5GT returns the airline, the origin and the destination airport with coordinates. No API key, and a rate limit of 512 requests per minute per IP address.

The route data comes with a condition. The adsbdb README credits it to two people and says it “may not be copied, published, or incorporated into other databases without the explicit permission of David J Taylor, Edinburgh”. So this post shows how I used it and what came out, with a few examples – but no tables of routes, and my lookups stay on my laptop.

My day has 4,316 airline callsigns – callsigns that start with three letters and a digit, the rule from part 5. At four requests per second, that’s more than 18 minutes of patient querying. The result:

  • 3,937 callsigns (91 %) have a route
  • 374 are unknown to adsbdb
  • 5 were rejected outright – they contain a space in the middle, like AIC1 2. That’s in OpenSky’s raw data, and my silver rule happily called it an airline code. Five out of 4,316, but a reminder that “three letters and a digit” isn’t validation.

Trust, but check

A scheduled route is a claim, not an observation. Callsigns can be reused – the same callsign can mean a different leg on a different day – and a database maintained by volunteers can’t always be current. So every route gets compared with what my own positions saw. Three possible outcomes:

  • confirmed – I saw the take-off at the airport adsbdb names (first position climbing below 5,000 ft within 25 km of it), or the landing (last position descending there, then gone for three minutes)
  • contradicted – I saw a take-off or landing at a different airport, or the aircraft isn’t on the way from origin to destination at all: it flies away from the destination, or the route it would need is more than 30 % plus 150 km longer than the great circle
  • unverified – neither take-off nor landing seen. Typical for overflights: an aircraft that crosses Switzerland at 37,000 feet can’t be checked from here.

3,664 flights had a route and at least 20 km of track. Of those:

StatusFlights
confirmed837
contradicted830
unverified1,997

830 contradicted – 23 % of all, and almost as many as confirmed: among the 1,667 routes my positions could either confirm or contradict, half are wrong. 568 of the contradictions because the aircraft simply wasn’t on the way from the stated origin to the stated destination, 134 because it took off somewhere else, 128 because it landed somewhere else.

The share is very different between airlines:

Horizontal bars: the share of each airline's flights whose adsbdb route is contradicted by the positions – from 0 % for ITA Airways and 2 % for Edelweiss to 56 % for Turkish Airlines and 58 % for Jet2.com; Swiss at 9 %

From 0 % for ITA Airways (ITY) and 2 % for Edelweiss (EDW) to 44 % for Lufthansa (DLH), 56 % for Turkish Airlines (THY) and 58 % for Jet2.com (EXS). Swiss (SWR) is at 9 %, Ryanair (RYR) at 38 %. I can’t tell from my data why – whether some airlines reuse callsigns more, or their schedules are less current in the database. What I can tell: for some airlines, the route is closer to a coin toss than to a fact.

The air base from part 6 – again

The first time I ran this, eight of the contradictions read “landed at LSMD, adsbdb says LSZH”. LSMD is Dübendorf Air Base. The route check had the same flaw as the first version of the approaches view in part 6: it took the nearest airport within 25 km. The same fix – a large airport first – removes all eight, and 837 instead of 830 routes are confirmed.

It also answers part 6’s question from the other side. Of the 129 aircraft that “nearest airport” assigned to Dübendorf, adsbdb gives Zurich as the destination for 121 of their 152 callsigns; 23 are unknown, a handful go elsewhere.

Confirmed isn’t the same as correct

One confirmed route had a detour of 352 km on a 693-km flight – SWR5GT, Rome to Zurich according to adsbdb, landing in Zurich seen. Here is its track:

Map of Switzerland: SWR5GT comes in from the south and is last seen at Geneva at 15:27 local time; an hour and a quarter later the same callsign takes off in Geneva and flies to Zurich, on the ground at 17:15

Two flights under one callsign: in from the south to Geneva, then, an hour and a quarter later, Geneva to Zurich. The check looks at the first and the last position, saw a landing in Zurich, and called the route confirmed. The “detour” is the stop in Geneva. Grouping positions by aircraft and callsign assumes one callsign is one flight – and that assumption is wrong here.

How far do flights really deviate?

Now the question the course notebook is built around. CO₂ calculators start from the great-circle distance between two airports and add a flat allowance for everything else: myclimate adds “an extra mileage/distance correction (DC) of 95 km” to every flight; the ICAO calculator adds 50 km below 550 km, 100 km up to 5,500 km and 125 km above.

I only see the part of each flight over Switzerland. So the estimate is:

estimated route = great circle (origin → first position)
                + the track I recorded
                + great circle (last position → destination)
detour          = estimated route − great circle (origin → destination)

That’s a lower bound: outside my window, I assume the aircraft flew perfectly straight. The real detour is at least this big.

For the 837 confirmed flights:

Great-circle distanceFlightsMedian detour
below 550 km13833 km
550–1,500 km48535 km
1,500–5,500 km16436 km
above 5,500 km5042.5 km

Overall, the median is 35 km and 90 % of the flights stay below 86 km. 49 flights – 6 % – deviate more inside Switzerland alone than myclimate’s 95 km allows for the whole flight; 74 exceed the ICAO allowance. For most flights, the flat allowances cover what I can see. Whether they cover the whole flight, my window can’t say – and the SWR5GT example is a reason not to trust the biggest values without looking at them.

The unverified routes show why I’m only quoting the confirmed ones. The largest “detour” among them is 1,665 km, for a callsign that adsbdb routes from Teterboro near New York to London Luton – over Switzerland. The plausibility rule allows 30 % plus 150 km, which for a 5,500-km flight is more than 1,800 km of slack. On long-haul routes, a wrong route passes easily.

What I take from this

An external source that answers 91 % of my questions sounds excellent. Checked against my own data, almost a quarter of the routes are contradicted – half of those I could judge either way – and the error rate depends on the airline. Without the check, I’d have built CO₂ numbers, “arriving at” labels and detour statistics on routes that often describe a different flight.

The check itself has gaps too: it only works where I see a take-off or a landing, and it assumes one callsign is one flight. Better than nothing; not a guarantee.

What’s next

With routes and their caveats in place, the next part turns detours into fuel and CO₂ – per aircraft type, with an open model, and with the question whether the calculators’ flat allowances are fair.

Data source

Flight data: The OpenSky Network – Matthias Schäfer, Martin Strohmeier, Vincent Lenders, Ivan Martinovic and Matthias Wilhelm. “Bringing Up OpenSky: A Large-scale ADS-B Sensor Network for Research”. In Proceedings of the 13th IEEE/ACM International Symposium on Information Processing in Sensor Networks (IPSN), pages 83–94, April 2014. doi:10.1109/IPSN.2014.6846743

Routes: adsbdb.com (flight route data © David Taylor & Jim Mason). Airports: OurAirports, public domain. Borders: Natural Earth, public domain.

Routes

  • adsbdb – aircraft and callsign API
  • adsbdb on GitHub – API documentation, rate limit and the terms of the route data

CO₂ calculators

Related posts

Related Articles

Comments

Comments are powered by giscus. You need a GitHub account to comment.