May 30, 200719 yr I am attempting to modify the Set Data example to use SIMCONNECT_DATA_LATLONALT instead of SIMCONNECT_DATA_INITPOSITION.The program compiles and runs but the user aircraft doesn't move. case EVENT_6: {/* SIMCONNECT_DATA_INITPOSITION Init; Init.Altitude = 5000.0; Init.Latitude = 54.9315248414087; Init.Longitude = -2.95371576251096; Init.Pitch = 0.0; Init.Bank = -1.0; Init.Heading = 180.0; Init.OnGround = 0; Init.Airspeed = 60; hr = SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_6, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(Init), &Init );*/ SIMCONNECT_DATA_LATLONALT pos; pos.Latitude = 54.9315248414087; pos.Longitude = -2.9537157625109; pos.Altitude = 5000.0; hr = SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_7, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(pos), &pos ); printf("nEVENT_6 received and data sent");I have added DEFINITION_7 to the DATA_DEFINE_ID and added: hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_7, "Position",NULL,SIMCONNECT_DATATYPE_LATLONALT);to set up the definition.I would be grateful for your comments.George
May 31, 200719 yr Author It's ok, I've figured it out. I can't use a SIMCONNECT_DATA_LATLONALT struct, I need to use a custom struct.
Create an account or sign in to comment