- Messages
- 1,074
- Country

Hello,
I'm trying to obtain SimConnect's SIM ON GROUND property, but it keeps returning as false (0) even if I am clearly down and stationary on a runway. I think I have everything set up properly:
Event is set up as:
And my DEFINITION_OBJECT_DATA contains a boolean member.
Then, I call:
And trap it:
However, I always get "SIM ON GROUND: FALSE" no matter where the aircraft is. I have other vars in DEFINITION_OBJECT_DATA and they are all sent from the sim correct and accurate.
Has anyone noticed this, and/or been able to obtain the correct value?
thanks,
I'm trying to obtain SimConnect's SIM ON GROUND property, but it keeps returning as false (0) even if I am clearly down and stationary on a runway. I think I have everything set up properly:
Event is set up as:
Code:
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_OBJECT_DATA, "SIM ON GROUND", "Bool");
And my DEFINITION_OBJECT_DATA contains a boolean member.
Then, I call:
Code:
hr = SimConnect_RequestDataOnSimObject(hSimConnect, REQUEST_OBJECT_DATA, DEFINITION_OBJECT_DATA, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_ONCE);
And trap it:
Code:
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
{
SIMCONNECT_RECV_SIMOBJECT_DATA *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*)pData;
switch(pObjData->dwRequestID)
{
case REQUEST_OBJECT_DATA:
{
DWORD ObjectID = pObjData->dwObjectID;
structObjectData *pS = (structObjectData*)&pObjData->dwData;
// testing
printf("SIM ON GROUND: %s\n", pS->SimOnGround? "TRUE":"FALSE");
However, I always get "SIM ON GROUND: FALSE" no matter where the aircraft is. I have other vars in DEFINITION_OBJECT_DATA and they are all sent from the sim correct and accurate.
Has anyone noticed this, and/or been able to obtain the correct value?
thanks,
and after a brief test, it appears to work.