Traffic info improvements
MRs
Description
1. Smaller planes don't get useful naming
See the original discussion for context: #375 (comment 2880829517)
Example message that backend sends - these are raw messages from Stratux with only "type": "traffic.update" added:
{
"type": "traffic.update",
"Icao_addr": 5055096,
"Reg": "",
"Tail": "CAI97SJ",
"Alt": 41000,
"Speed": 448,
"Lat": [REDACTED],
"Lng": [REDACTED],
"Track": 136
},
{
"type": "traffic.update",
"Icao_addr": 4967849,
"Reg": "",
"Tail": "SXS3L",
"Alt": 39000,
"Speed": 458,
"Lat": [REDACTED],
"Lng": [REDACTED],
"Track": 136
},
{
"type": "traffic.update",
"Icao_addr": 4763011,
"Reg": "",
"Tail": "LOT3VY",
"Alt": 37000,
"Speed": 432,
"Lat": [REDACTED],
"Lng": [REDACTED],
"Track": 168
},
{
"type": "traffic.update",
"Icao_addr": 4960917,
"Reg": "",
"Tail": "",
"Alt": 0,
"Speed": 459,
"Lat": 0,
"Lng": 0,
"Track": 103
}
Currently, when available, we are first using the Reg, then Tail as a first fallback, and only then Icao_addr when nothing else is available.
Both registration and tail number are useful to display if they are available, but the reported "tail" seems to be the name of the flight: https://www.flightradar24.com/data/flights/xc127 - we would need to research how to resolve that ICAO identifier, because resolving this (generally into something like "Corendon 127" or "Air France 201") would be very helpful, since that's generally the identifier used with controllers over the radio - so that would allow the pilot to match both sources of position information.
For the rest of the information, such as (actual) tail identifier or aircraft type, we will need to use a database like https://opensky-network.org/data/scientific#d5 to retrieve details, and only fallback to display the info from the ADS-B packet if there is nothing there.
For example, here is the entry corresponding to the ICAO code of the first traffic message above, from https://s3.opensky-network.org/data-samples/metadata/aircraft-database-complete-2025-08.csv :
'icao24','timestamp','acars','adsb','built','categoryDescription','country','engines','firstFlightDate','firstSeen','icaoAircraftClass','lineNumber','manufacturerIcao','manufacturerName','model','modes','nextReg','notes','operator','operatorCallsign','operatorIata','operatorIcao','owner','prevReg','regUntil','registered','registration','selCal','serialNumber','status','typecode','vdl'
'4d2278','1970-01-01 01:00:00',0,0,,'',Malta,'',,,L2J,'',BOEING,'','',0,'','','','','','','','',,,'9H-TJD','','','',B738,0
It tells us a (looking more correct) tail number 9H-TJD, and an aircraft ICAO type B738 which through https://github.com/atoff/OpenAircraftType/blob/master/src/B/BOEING/B738/B738.txt can be resolved to a "Boeing 737-800". We could thus display:
- 9H-TJD (Boeing 737-800)
- 41000' @ 448 knots
Or for the last one, which has almost no information in its message:
'4bb295','2024-06-25 12:35:50',0,0,,,Turkey,,,,,,,,Airbus A321-271NX,0,,,AJet,,VF,TKJ,,,,,TC-LTU,,,,A21N,0
would give (along with https://github.com/atoff/OpenAircraftType/blob/master/src/A/AIRBUS/A21N/A21N.txt )
- TC-LTU (Airbus A321neo)
- 459 knots
Though there wouldn't be anywhere to display it, since the position is unknown.
Scope
- Improve the traffic information tooltip information as described above
- Ensure licenses are properly attributed in the codebase
