• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v5 [SOLVED] SimConnect returning false while on ground

Messages
31
Country
ca-britishcolumbia
I'm getting the boolean value of SIM ON GROUND and when the aircraft is on the ground, for fixed wing aircraft the sim return true as expected however when I switch to a rotor wing (helicopter) it returns false even if if the aircraft is standing on the ground with 0 velocity in any direction. What might be the reason for this?
 
My bet is that you are using a 64-bit version of SIMCONNECT_DATATYPE (either float or int). It returns the wrong value; use a 32-bit version instead e.g. (vb.Net) SIMCONNECT_DATATYPE.INT32. Anytime you get a numeric value that does not make sense, try switching to a 32-bit version. Unfortunately there are a lot of buggy 64-bit returns. This is taken from a tool I wrote for myself:
Code:
    p3d_simconnect.AddToDataDefinition(P3Data.DEFINE_AIRCRAFT_DATA, "Sim On Ground", "bool", SIMCONNECT_DATATYPE.INT32, 0, 15)
and here is the result:
acft_on_gnd.jpg


-Dai
 
My bet is that you are using a 64-bit version of SIMCONNECT_DATATYPE (either float or int). It returns the wrong value; use a 32-bit version instead e.g. (vb.Net) SIMCONNECT_DATATYPE.INT32. Anytime you get a numeric value that does not make sense, try switching to a 32-bit version. Unfortunately there are a lot of buggy 64-bit returns. This is taken from a tool I wrote for myself:
Code:
    p3d_simconnect.AddToDataDefinition(P3Data.DEFINE_AIRCRAFT_DATA, "Sim On Ground", "bool", SIMCONNECT_DATATYPE.INT32, 0, 15)

-Dai
Hello Dai, I was actually using the 32-bit version (INT32) for this since the beginning. I wil try with the 64bit. One thing I noticed while making more tests was that it seems the reason why it is not returning true is because the helicopter is actually above the ground (according to the sim) as it does not consider skids as landing gear maybe? Will have to dig deeper it seems like.
 
My bet is that you are using a 64-bit version of SIMCONNECT_DATATYPE (either float or int). It returns the wrong value; use a 32-bit version instead e.g. (vb.Net) SIMCONNECT_DATATYPE.INT32. Anytime you get a numeric value that does not make sense, try switching to a 32-bit version. Unfortunately there are a lot of buggy 64-bit returns. This is taken from a tool I wrote for myself:
Code:
    p3d_simconnect.AddToDataDefinition(P3Data.DEFINE_AIRCRAFT_DATA, "Sim On Ground", "bool", SIMCONNECT_DATATYPE.INT32, 0, 15)
-Dai
Unfortunately this solution did not work, I tested with both
SIMCONNECT_DATATYPE.INT32
and that line parameter removed and it returned FALSE both times while I was on the ground. I'm thinking it might be due to skids and how the simulator handles them since it does not have a landing gear?
 
It's not a skids problem as I just loaded the R-22 and checked it. Also I have to correct myself; payload station numbers do run from zero (0) to ninety-nine (99). I temporarily got confused with [smokesystem] which has no entry zero. Try changing "bool" to "number" and see what that gets you? Which programming language are you using?
 
It's not a skids problem as I just loaded the R-22 and checked it. Also I have to correct myself; payload station numbers do run from zero (0) to ninety-nine (99). I temporarily got confused with [smokesystem] which has no entry zero. Try changing "bool" to "number" and see what that gets you? Which programming language are you using?
I will try what you are suggesting and I'm using C++.
 
Back
Top