Can you tell me how to set waypoints in C# SIMCONNECT?
this is my attempt, with no result , plane on the ground (A320)
// “AI WAYPOINT LIST”
simconnect.AddToDataDefinition(DEFINITIONS.WaypointDef, “WAYPOINT LIST”, “number”, SIMCONNECT_DATATYPE.WAYPOINT, 0.0f, SimConnect.SIMCONNECT_UNUSED);
SIMCONNECT_DATA_WAYPOINT waypoints = new SIMCONNECT_DATA_WAYPOINT[2];
waypoints[0].Latitude = 33.8652996221199;
waypoints[0].Longitude = -118.03444644824;
waypoints[0].Altitude = 2000;
waypoints[0].Flags = (uint)SIMCONNECT_WAYPOINT_FLAGS.SPEED_REQUESTED;
waypoints[0].ktsSpeed = 210;
waypoints[1].Latitude = 33.8652996221199;
waypoints[1].Longitude = -118.03444644824;
waypoints[1].Altitude = 2000;
waypoints[1].Flags = (uint)SIMCONNECT_WAYPOINT_FLAGS.SPEED_REQUESTED;
waypoints[1].ktsSpeed = 250;
Object[] objv = new Object[waypoints.Length]; waypoints.CopyTo(objv, 0);
simconnect.SetDataOnSimObject(DEFINITIONS.WaypointDef, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG.DEFAULT, objv);
}
public SIMCONNECT_DATA_WAYPOINT[] waypoints = new SIMCONNECT_DATA_WAYPOINT[2];