FSXA How to Read AI Aircraft List of Waypoints?

#1
Hello again everyone,
I want to read the list of waypoints that an AI aircraft is currently following. The "AI WAYPOINT LIST" seems to be what I want but I don't understand how to extract information from it using managed C#.
I have a definition with a bunch of other variable that work, only this is giving me trouble. Some of the code im using to request the data:

simConnect.AddToDataDefinition(DEFINITIONS.DATA_DEFINITION, "AI WAYPOINT LIST", "", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);

simConnect.RegisterDataDefineStruct<Data_Definition>(DEFINITIONS.DATA_DEFINITION);

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct Data_Definition
{
<other data variables>
public SIMCONNECT_DATA_WAYPOINT waypoint;
};

Thank you in advance,
Daniel
 
Top