So I’m building an application in C# that communicates with the simConnectSDK.
So far I’m able to get some variables like airspeed through something like:
my_simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "AIRSPEED INDICATED", "knots", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);
Now i’m trying to retrieve the nearest airport that according to the
documentation, uses the name NearestAirportCurrentApproachName and I’m trying
to retrieve it like this:
my_simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "NearestAirportCurrentApproachName", null, SIMCONNECT_DATATYPE.STRING32, 0.0f, SimConnect.SIMCONNECT_UNUSED);
but I always get code 7 SIMCONNECT_EXCEPTION_NAME_UNRECOGNIZED My question
is… How can I get GPS variables? What am I doing wrong?