Dear P3D folks,
What is the correct way to obtain the height of terrain via SimConnect? I am currently using
Code:
hr = SimConnect_AddToDataDefinition( simConnectHandle,
DEFINITION_3,
"GROUND ALTITUDE",
"feet",
SIMCONNECT_DATATYPE_FLOAT64 );
combined with a timed approach. This can't be it, as after repositioning, I am running into issues: I get a Sim Stop and a Sim Start event - but the height returned is invalid.
What is the correct method to get back correct height of terrain values after repositioning over large distances?
Regards,
DevSim
Height of terrain returned invalid
- Beau Hollis
- Lockheed Martin
- Posts: 2452
- Joined: Wed Oct 06, 2010 3:25 pm
- Beau Hollis
- Lockheed Martin
- Posts: 2452
- Joined: Wed Oct 06, 2010 3:25 pm
Interesting. I was thinking it would bring up the loading bar and black out the screen. (which is what happens when you use the map to move the aircraft more than a certain threshold away from it's current location). I thought setting the aircraft location via simconnect had the same effect.
You might also try using SimConnect_RequestDataOnSimObject call with PLANE_ALT_AG to get ownship height above terrain. I came across some info from a user in an old ticket when searching to see if this was a known bug. Note that if you have set SIM_DISABLED, the height above terrain will not be valid outside the starting area.
Beau
You might also try using SimConnect_RequestDataOnSimObject call with PLANE_ALT_AG to get ownship height above terrain. I came across some info from a user in an old ticket when searching to see if this was a known bug. Note that if you have set SIM_DISABLED, the height above terrain will not be valid outside the starting area.
Beau
Beau Hollis
Prepar3D Software Architect
Prepar3D Software Architect
Thanks Beau,
I must say I run with the externalsim registered method and in full freeze mode.
I can and will try PLANE_ALT_GT but feel strongly, that the height will be invalid too. A quick workaround is to sit and wait some more time after a reposition - but loading time is non deterministic and it fore sure isn't valid after I receive the new sim start event (which I have tested).
Regards,
DevSim
I must say I run with the externalsim registered method and in full freeze mode.
I can and will try PLANE_ALT_GT but feel strongly, that the height will be invalid too. A quick workaround is to sit and wait some more time after a reposition - but loading time is non deterministic and it fore sure isn't valid after I receive the new sim start event (which I have tested).
Regards,
DevSim