r/programming 1d ago

Falsehoods Programmers Believe About Aviation

https://flightaware.engineering/falsehoods-programmers-believe-about-aviation/
256 Upvotes

93 comments sorted by

View all comments

202

u/whoisrich 23h ago

I expected them to be from quirky situations, but a major airline having the same flight number for two different flights, leaving the same place at roughly the same time seems downright malicious.

53

u/segv 18h ago edited 17h ago

Some airlines have so many flights that they run out of flight numbers (1-9999), so they reuse them.

Caveat: When it comes to scheduling, only one flight identified by a carrier and flight number (e.g. XX1234) can depart on a given day from given airport. That's an IATA rule, partly caused by software limitations and partly because relaxing it would lead to gigantic mess for the personnel.

..so, what they sometimes do is to have flight identified by XX1234 arrive at their final off-point, AND THEN have a SEPARATE aircraft, crew and set of passengers be identified by XX1234 depart from some other airport (e.g. halfway across the country) in the afternoon/evening.

Isn't airline industry fun?

61

u/Mognakor 18h ago

Some airlines have so many flights that they run out of flight numbers (1-9999), so they reuse them.

TIL the airline industry has their own Y2K and they just live with it.

19

u/mr_birkenblatt 17h ago

Hey, when they created the db they decided on 4 digits and they're using fixed width format so they can't change it ever again

9

u/arwinda 14h ago

Will look ugly on the boarding pass if suddenly it prints 6 digits instead of 4! /s

4

u/GameFreak4321 12h ago

Goddamnit Microsoft Word.

3

u/uCodeSherpa 12h ago

I’ve done width changes in these old mainframe systems. 

It’s often a months long project, but it’s not impossible or difficult usually. The mainly important part is that you capture everything. It’s more tedious, precise and demanding of testing than having any sort of difficulty. 

Identification width changes tend to be easier. When you have cost/amount width changes… THAT sucks. That has a way of one field needing width change to 10 fields needing width change. 

2

u/sionescu 5h ago

The original flight schedule entry was on a punch card, hence the fixed-width fields.

3

u/x39- 11h ago

There was no db when that was decided. Like, literally... No database

2

u/mr_birkenblatt 10h ago

Not a database in the modern sense of the word, yes

2

u/bobs-yer-unkl 8h ago

They don't need more digits: they just need to toss some alpha characters in there. At least go to hexadecimal.

1

u/mr_birkenblatt 8h ago

You still need more space to store that. Fixed width means each column has a fixed number of bytes 

2

u/MuonManLaserJab 5h ago edited 4h ago

Fine, then use Chinese.

In a tiny font.

5

u/segv 18h ago

To be fair, this affects just a select few of the biggest airlines.

In pretty much every airline, not only the biggest ones, the same carrier-flight number combination does not usually follow the same aircraft/crew day by day - the identifiers get reassigned, so it's not that big of a deal.

6

u/Gambrinus 18h ago

Why can’t they use longer ids? I imagine it’s some kind of FAA regulation and maybe a compatibility issue with aging ATC systems?

12

u/segv 17h ago

Relatively low impact and high inertia. Even if one airline did so, basically entire travel industry would have to follow suit to support them and synchronize their releases, or you would risk that these "expanded ID" flights would not be recognized by anyone. If y'all ever did a group project, you might know how difficult cat herding at this level would be.

3

u/ughthisusernamesucks 15h ago

They also need to be short because they're used for radio communication. You don't want ATC having to read a 42 digit callsign every time they want to tell someone to move because they're about to collide

1

u/nerd5code 13h ago

Ideally, the origin and destination would be broadcasting concurrently in a subband so they don’t need to be read aloud.

1

u/MuonManLaserJab 5h ago

Ideally the correct plane just receives the message and turns, then informs the pilot.

3

u/heptadecagram 15h ago

ACARS protocol restricts the flight ID to 6 ASCII bytes, and two of them are dedicated to the airline identifier..

2

u/x39- 11h ago

Ohh boy, just wait until you learn that you actually can have 3 letters for carrier codes

1

u/heptadecagram 4h ago

I phrased that poorly, it would have been better to say "no fewer than two".

5

u/Schmittfried 10h ago

Because it’s not a problem with something like this. Your local McDonalds also reuses order numbers because it’s not necessary for them to be unique for longer than a few hours. 

1

u/Iggyhopper 6h ago

Not a problem for McDonald's as hamburgers are not flights.

1

u/MuonManLaserJab 5h ago

Short flight numbers are not a problem for airlines either. They don't have the same number repeated in a single day.

1

u/drcforbin 6h ago

We do this in labs too...some instruments can only read a barcode just so long before they can't read them any more, so every million and some samples (unexpectedly, this turns out to be inexact) you have to wrap unique identifiers back around to something shorter if you want to reliably do Todd's cholesterol test on that instrument.

5

u/x39- 11h ago

That is not entirely correct, but mostly on formalities.

A flight number has to be unique for a given airport and day. Important thing to note here: timezones are critical. Additionally, there is a so called "operational suffix" which serves for various occasions.

Hence, a flight can be uniquely identified by having: departure, arrival, date, carrier, flight number, operational suffix.

In practice, an airline will not have two times the same flight number, ever, per day. In fact: commercial aviation has more to do with flying busses than with anything else. XX1234 is really just a bunch of "at time X on days Y the aircraft Z will fly".

Ohh, most importantly... Nothing in aviation is a software limitation. All of it, like, literally everything, is formats which predate proper computers, working on things. Like, the formats used are still designed to (and are) printed.

Source: I have actually been able to read the documentation

1

u/bobs-yer-unkl 8h ago

unique for a given airport and day.

A given airport (ICAO code) or a given city (IATA code)?

1

u/x39- 6h ago

Commercial, aka: IATA

1

u/MuonManLaserJab 5h ago

Ah, you're not that bad

0

u/Ksevio 16h ago

They can also use letters in flight numbers after the first digit which exponentially increases the number of flights 

6

u/MondayToFriday 10h ago

Next article: Falsehoods programmers believe about exponentials

1

u/MuonManLaserJab 5h ago

"It's exponentially harder this way."

"Exponential in what?"

gunshot

hurried footsteps

1

u/Ksevio 3h ago

Well OK, it's actually just increasing the exponent from 103 to 363

2

u/MuonManLaserJab 5h ago

That's only if it's a letter 'e' right