• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Data error when setting LIGHT TAXI

Messages
6
Country
germany
Hey there,

I have an application which does inject controlled AI aircrafts into FSX. I use the method SimConnect_AICreateNonATCAircraft in order to introduce them. Among other things I'm trying to set the lights for this AI aircraft. But "LIGHT TAXI" seems to have a problem. No matter what value I send, SimConnect always raises a SIMCONNECT_EXCEPTION_DATA_ERROR. Every other light state is fine.
I was wondering if it is a known issue with SimConnect?

Some additional details:
I have the latest FSX SP2 with all required SimConnect patches.

Code snippets:
Code:
hr += SimConnect_AddToDataDefinition(hSimConnect, CSimConnectDefinitions::DataRemoteAircraft, "LIGHT TAXI", "Bool");
...
ddRemoteAircraft.lightTaxi = 0.0;
lightTaxi is a double. I have also tried to set it to 1.0 or anything between 0 and 1. But no luck.
 
According to the SDK, none of those lights are settable. Then again, you certain the aircraft cfg of the AI aircraft is even set up to have a taxi light?
 
Thanks for your answer. The SDK documentation is not reliable and totally consufing. It works perfectly for any other light variables, e.g. LIGHT LANDING. Other projects are using the same variables since years without any problem. I have never understood what settable 'No' means in this case.
Hm the aircraft.cfg might be a good hint. But if this is the case, isn't that a flaw in SimConnect really? As a SimConnect client application how would I know which cfg supports which settable variables? If it doesn't it should be FSX responsibility to ignore the SimConnect variable. o_O
 
My understanding is that the Simulation Variable LIGHT TAXI is a boolean which returns the on/off state of the light but doesn't change it. That it what Settable means. In order the change the event you need the Event ID KEY_TOGGLE_TAXI_LIGHTS changes the lights to on/off.

I don't know why LIGHT TAXI gives an error.
 
Correct me if im wrong but....Isnt it possible to trigger key events on AI aircraft with SimConnect as well?
 
My understanding is that the Simulation Variable LIGHT TAXI is a boolean which returns the on/off state of the light but doesn't change it. That it what Settable means. In order the change the event you need the Event ID KEY_TOGGLE_TAXI_LIGHTS changes the lights to on/off.

I don't know why LIGHT TAXI gives an error.

Sounds reasonable, but I learned in the past to not trust FS SDK documentation too much but rather try myself. To me 'Settable' means only the user aircraft and not AI. There is another column next to 'Settable' called 'Multiplayer' in the documentation. It is noted there that all LIGHT booleans can be set for all aircrafts in multiplayer mode. SimConnect is obviously not multiplayer, but it gives the intention that it is somehow controllable. LIGHT STROBE, LIGHT LANDING, LIGHT BEACON, LIGHT NAV, etc. they all work even though they have the exact same documentation. It might be that the reason why it works is a bug in SimConnect. So it could be one of the following situations:

1. Documentation is correct. LIGHT booleans for AI aircrafts are read-only via SimConnect. SimConnect has a bug in all LIGHT booleans which allows to write to them. LIGHT TAXI is the only correctly implemented one.

or

2. SimConnect does allow to write LIGHT booleans. Documentation is ambiguous and LIGHT TAXI is buggy.

Honestly I belief it is the second one. I have learned from the FS 2004 multiplayer nightmare to never trust Microsoft FS documentation :cool:
 
AIt is noted there that all LIGHT booleans can be set for all aircrafts in multiplayer mode. SimConnect is obviously not multiplayer...

What the FSX SDK actually says is;
When Flight Simulator X is running in multiplayer mode, only a small number of variables are communicated between aircraft. This is noted in the Multiplayer column (All aircraft or Shared Cockpit).

In other words, LIGHT TAXI is simply not settable, but the variable can be shared by All aircraft.

On the other hand, GROUND VELOCITY is settable but the variable can't be shared with any aircraft (All aircraft or Shared Cockpit)
 
Back
Top