ATC MODEL - JS/SimConnect mismatch

I have found a case when variable ATC MODEL does not match between SimConnect and JS request results. We are using it for preset save feature in our new product, will be great to find solution or at least workaround.

Way to reproduce:

  1. start flight with Extra 330LT selected
  2. Open Simvar Watcher, add ATC MODEL variable
  3. Press CONNECT, value “300” will appear in the table
  4. Run JS script SimVar.GetSimVarValue(“ATC MODEL”, “string”), it will return “E300

It is an only case I have found so far, but I believe there may be more.

I have encountered the same problem when using this variable.
The bug happens when the atc_model variable in the aircraft.cfg contains a space character. If there is a space, simconnect ATC MODEL fallsback to the icao_model variable. If there is also a space or non alphanumerical character in that string too, only the last part is returned.

I made a bug report about it:

AddToDataDefinition / RequestDataOnSimObjectType for ATC_MODEL returns icao_model instead of atc_model if atc_model string contains a space character

ohh that explains. thanks for the mentioning!