Bug description:
SimConnect_AddToDataDefinition / RequestDataOnSimObjectType for ‘ATC MODEL’ returns icao_model instead of atc_model from aircraft.cfg if atc_model variable has a space character.
example: cessna 172 aircraft.cfg:
atc_model = “TT:ATCCOM.AC_MODEL C172.0.text”
icao_model = “172 Skyhawk”
return value of RequestDataOnSimObjectType for “ATC MODEL” is “Skyhawk”
changing atc_model variable to “TT:ATCCOM.AC_MODEL _ C172.0.text”
return value of RequestDataOnSimObjectType is “AC_MODEL_C172.0.text”
Does this issue only happen with a space ? Normally It shouldn’t, as “TT:ATCCOM.AC_MODEL_C172.0.text” is a variable name. It points to a variable in a .locpak file.
So, when you call “TT:ATCCOM.AC_MODEL C172.0.text”, it does not return the icao_model value ( which as you said is “172 Skyhawk” and not just “Skyhawk” ) but the value of “TT:ATCCOM.AC_MODEL C172.0.text” in Packages/fs-base/en-US.locpak ( if your sim is in english of course ) which is indeed “Skyhawk”.
As “TT:ATCCOM.AC_MODEL _ C172.0.text” variable does not exist int this .locPak file, it is expected that it returns the hard value you’ve put in your CFG.
For further information on the localization system, i recommand you to check out the localization documentation.
Please tell me if I missed something, or if I can close this Bug report.
I was indeed not understanding how this actually works. I started working on this with addon aircrafts that didn’t translate the atc_model variable, hence my confusion. I thought the normal behaviour was to have the literal string as is written in the aircraft.cfg. It makes sense now.
However, there is still no easy way to get the correct icao code for an aircraft, what asobo calls “icao_type_designator” in the aircraft.cfg.
Unfortunately it is not accessible through simconnect at the moment.