Traffic Global – Aircraft Substitution System

When Traffic Global reads a schedule file (BGL) and tries to find the correct aircraft model to fly a particular route, there are several rules in place about how it does this. Obviously the first thing it tries is an exact match with the aircraft name that is used in the BGL, and this name is assumed to be the base name of the .cfg and .obj files that make up the model. After that, though, things get more complicated. To explain why, we need to think about what information is available.

The Schedule File

In a standard BGL, the only information that exists for an aircraft type is a name, for example JFAI_A320_BritishAirways or JFAI_767_300_Ethiopian. I pick both of these for a reason which I’ll get back to in a moment.

The Aircraft Config File

Coming from the other direction, we have the aircraft. For each aircraft, there are two files for which the base name must match, the .cfg and .obj files. The .obj is the model data itself and isn’t of any more interest here. The .cfg file, however, contains two vital pieces of information for matching and substitution: “Airline” and “Aircraft”, both in the “Info” section. These define the three-letter ICAO code for the airline, and the three-letter IATA code for the aircraft type.

Why use different standards for the two types of codes? Because ICAO codes are more specific for airlines than IATA codes, and IATA codes are more specific for aircraft types than ICAO codes. Annoying, but necessary.

[Info]
Airline=ETH
Aircraft=763

Matching Names to Aircraft

When a BGL is loaded, each named aircraft type in the BGL looked up. The first and simplest thing that is tried is that an exact match for the name given in the BGL is looked for. This name is the base name of the .cfg/.obj files. For example, the config file called “JFAI_767_300_Ethiopian.cfg” registers an aircraft called “JFAI_767_300_Ethiopian”. So far, so simple.

If that exact match exists, we go no further, that is the aircraft to use. If it doesn’t exist though, a set of guesses is applied and this set of guesses makes up the substitution system.

Recall that all we have to work with, having read a BGL file, is the full name. Traffic Global splits this down into several sections, separated by underscores. The general format is:

[Prefix]_[Aircraft]_[Airline]_[Variant]

For all the supplied aircraft, the prefix is “JFAI”. It’s entirely ignored by the matching system. If you’re adding your own types, you might want to use your own prefix.

The second part, the aircraft code, should be the three-letter IATA aircraft type – 32N, 73H, 388 etc.

The third part, the airline name, should be the full airline name as Traffic Global understands it, with no spaces or other punctuation. Note that there’s no current method of adding or altering airlines; this may change in future. If no exact match for the airline name is found in the internal list, variations are tried with “Air”, “Airlines”, “Airways”, “Aviation” and “Aereas” appended. So, for example, “Qantas” (in the aircraft name) should match either “Qantas” and “Qantas Airlines” (in the internal list).

The optional (and currently ignored) fourth part, the variant, is currently ignored but is planned to allow more than one version of an aircraft to be used for a single airline, selected randomly at load time. Some airlines, notably Alaskan, use aircraft with different paint such as individuals’ faces or other personalisation touches.

So, from the simple name in the BGL, we now have a code for the aircraft type and an airline name. From the airline name, we can look up the matching airline code from an internal list, and now we come back to the model config file; specifically, the “Airline” and “Aircraft” entries mentioned above.

Most aircraft models that are provided with Traffic Global come with a special, plain white variant referred to as a “paintkit”; that is, a blank colour scheme that should be easily modified to have the correct markings for any airline. These are used as a last resort, if nothing even remotely more appropriate can be found. Some people object to having these unpainted aircraft show up in the simulator and would prefer to have no aircraft visible at all, so the ability to fall back to the unpainted model is left as a user-selectable option.

Exact Matching Order

There is a specific sequence in which these codes and names are used.

  1. An exact match. i.e. the BGL gives the name “JFAI_763_EthiopianAirlines” and files exist on disk called “JFAI_763_EthiopianAirlines.cfg” and “JFAI_763_EthiopianAirlines.obj”.
  2. Any aircraft which has the values “763” and “ETH” for the “Aircraft” and “Airline” entries in the config file, regardless of the filename. ETH comes from the internal lookup of “Ethiopian Airlines”.
  3. Any aircraft which has the value “763” for the “Aircraft” entry in the config file, and “EthiopianAirlines” as the third part of it’s filename.
  4. Any aircraft which is of an equivalent type to the 763, which has “ETH” in the “Airline” entry in the config file, regardless of the filename. The current equivalence tables are listed below.
  5. Any aircraft which is of an equivalent type to the 763 and has “EthiopianAirlines” as the third part of it’s filename.
  6. Any aircraft which has the values “763” and “” (no value) for the “Aircraft” and “Airline” entries in the config file, regardless of the filename. As standard the only aircraft which have no Airline set are paintkit variants.
  7. Any aircraft which is of an equivalent type to the 763 and has “” (no value) for the “Airline” entry in the config file, regardless of the filename.

Examples

Let’s follow this through with some examples.

The provided BGL contains many aircraft names, some of which are not provided as part of the package. This is done deliberately to allow third parties to easily add paints for the missing ones and have them appear immediately; while it would be ideal to provide all required model and paint combinations, the amount of work required here would be enormous for aircraft which, for many people, would never be seen.

For those that are provided, they will be matched by name (rule 1), simply because the name list generated by Traffic Global from the files on disk was used to compile the included BGL.

For any third-party paints that are added, they would be matched either by name (rule 1) – which should be of the format [Prefix]_[AircraftCode]_[AirlineName], as mentioned above – or, failing that, by the “Aircraft” and “Airline” code fields in the new aircraft’s config file (rule 2).

Any that haven’t matched so far will go through rules three through seven in order, where rule 7 is effectively the “paintkit” rule.

Any additional BGL files will follow precisely the same rules. You can refer to provided aircraft types if you wish. It is highly recommended that you use the correct name – that is, [Prefix]_[AircraftCode]_[AirlineName] – even if the existing aircraft does not use that name. The reason that the two example aircraft were chosen as they were was that they do not correctly follow this pattern. All of the aircraft provided come directly from the Prepar3D Traffic Global package and sadly don’t follow any naming convention at all. To make sure that using the latest models is as easy as possible when preparing a new release of Traffic Global for X-Plane, only the names that were causing matching problems have been changed.

As it stands there is no support for more than one livery per aircraft/airline combination. When the “variant” support is added, it is likely that all aircraft will be matched using substitution where a schedule will contain e.g. “JFAI_763_EthiopianAirlines” but this, even if an exact name match exists, would also be randomly matched against any other aircraft with “763” and “ETH” for Aircraft/Airline codes. Remember, the filename is almost entirely irrelevant for matching except in the case where it matches the name in the BGL exactly.

So, let’s assume that the BGL schedule requests an aircraft called “JFAI_AT7_LOTPolishAirlines”:

First, try to identify the correct airline:

  1. Try an exact match against all airline names, case insensitive, with spaces removed.
  2. Repeat this, for “lotpolishairlinesair”, “lotpolishairlinesairlines”, “lotpolishairlinesairways”, “lotpolishairlinesaviation” and “lotpolishairlinesaereas”.
  3. Try a direct lookup of “LOTPOLISHAIRLINES” on the assumption that is might be a three-letter ICAO airline code (only since V1.0.8660).

Next, use the airline code if one was found, in the rules above:

  1. Exact Match: Filename is JFAI_AT7_LOTPolishAirlines.cfg
  2. Match [Info]/AircraftCode with “AT7”, [Info]/AirlineCode with the first airline that matched the internal list by name, modified name or code, if any:
    [Info]/AircraftCode=AT7, [Info]/AirlineCode=LOT

  3. Match [Info]/AircraftCode with “AT7” and the third part of the filename with “LOTPolishAirlines”:
    [Info]/AircraftCode=AT7 in any file ending in “_LOTPolishAirlines.cfg”.

  4. Match [Info]/AircraftCode with equivalent aircraft types to “AT7”, [Info]/AirlineCode with the airline code found above, if any:
    [Info]/AircraftCode=ATR, [Info]/AirlineCode=LOT
    [Info]/AircraftCode=AT4, [Info]/AirlineCode=LOT

  5. Match [Info]/AircraftCode with equivalent aircraft types to “AT7”, and the third part of the filename with “LOTPolishAirlines”:
    [Info]/AircraftCode=ATR in any file ending in “_LOTPolishAirlines.cfg”
    [Info]/AircraftCode=AT4 in any file ending in “_LOTPolishAirlines.cfg”
  6. Match [Info]/AircraftCode with “AT7”, [Info]/AirlineCode empty (i.e. an unpainted “paintkit” aircraft):
    [Info]/AircraftCode=AT7, [Info]/AirlineCode=

  7. Match [Info]/AircraftCode with equivalents to “AT7”, [Info]/AirlineCode empty (i.e. paintkit):
    [Info]/AircraftCode=ATR, [Info]/AirlineCode=
    [Info]/AircraftCode=AT4, [Info]/AirlineCode=

Aircraft Type Equivalents

Aircraft types are grouped together according to the function, and then (more importantly) into roughly equivalent types. For example, all 737s, all A320s, all A340s etc. This allows a single model to go a long way to filling airports with broadly appropriate types; I think that most people would prefer an A318 to be replaced with an A319 of the same airline, than for it to be unpainted or, more likely, totally missing.

The lists below are correct at the time of writing but are inevitably going to change over time.

Cargo Types

IATA Equipment Type Name
14F, 14X, 14Y, 14ZBAe 146
31F, 31X, 31Y, 32F, 32X, 32YA310/A320s
33F, 33X, 33YA330s
38FA380
70FB707
72F, 72X, 72YB727s
73F, 73P, 73X, 73YB737s
74F, 74U, 74V, 74X, 74Y, 74NB747s
75F, 75VB757
76F, 76V, 76X, 76YB767s
77F, 77XB777
ABBAirbus Beluga
ABF, ABX, ABY, AB4Airbus A300s
ATF, ATZATR72
CRFCRJ
CVF, CVV, CVX, CVYConvair
D1F, D1X, D1YDC-10
D3FDC-3s
D6FDC-6s
D8F, D8T, D8X, D8YDC-8s
D9C, D9F, D9XDC-9s
I9F, I9X, I9YIlyushin 96
I7FIlyushin 76
L1FTristar
LOFLockheed Electra(!)
LOHLockheed Hercules
M1FMD11
A4FAntonov 124

Passenger Types

IATA Equipment TypeName
221, 223Airbus A220s
310, 313, 318, 319, 320, 32A, 32B, 321,
32S, 32N, 32Q
A310, A320s
330, 332, 333, 339Airbus A330s
340, 343, 345, 346Airbus A340s
350, 359, 351Airbus A350s
380, 388Airbus A380s
BE1, BES, BEH Beechcraft
727, 722, 717Boeing 717,727s
731, 732, 733, 734, 735, 736, 737, 738, 7S8, 739,
73C, 73E, 73G, 73H, 73J, 73M, 73N, 73L, 73Q,
73R, 73S, 73W, 7M8
Boeing 737s
744, 747, 74E, 74H, 74LBoeing 747s
752, 753, 757, 75T, 75WBoeing 757s
767, 762, 763, 76W, 764Boeing 767s
777, 772, 77W, 77L, 773Boeing 777s
787, 788, 789, 781Boeing 787s
146, 141, 142, 143, AR1, AR8BAe 14x series
J31, J32, J41Jetstreams
BNT, BNIBritten-Normal Islanders
CRK, CRA, CRJ, CR1, CR2, CR7, CR9Bombardier CRJs
DH8, DH4, DH1, DH2, DH3, DHTDeHavilland Dash-8s
M88, M80, M82, M83, M87, M90McDonnell-Douglas M8x
E7W, E75, ER4, ER3, ERJ, ERD, EMBEmbraer ERJs
EP1, EP3Embraer Phenoms
E95, E90, 290Embraer 19x
F50, F70, 100Fokker series
ATR, AT4, AT7Aerospatiale ATRs
SH3, SH6Shorts SD.3×0
A26, AN6, AN4Antonovs
SWMFairchild
CVRConvair
IL7, IL9Ilyushin Heavies
SF3, SFBSaabs

Airlines

More so than the aircraft types, this list will change over time. It is currently kept up to date as of September 2019, since that is the time that matches the current schedule database (at time of writing).

About the Author: jimkeir

23 Comments

  1. Reply Hairstyles VIP

    Very nice post. I simply stumbled upon your weblog and wanted to say that I have truly enjoyed browsing your weblog posts. After all I抣l be subscribing in your feed and I am hoping you write again soon!

  2. Reply Hairstyles

    you are in point of fact a excellent webmaster. The web site loading velocity is amazing. It sort of feels that you’re doing any unique trick. In addition, The contents are masterwork. you’ve done a wonderful process on this matter!

Leave A Reply

Your email address will not be published. Required fields are marked *