• 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.

How to get GForce, VSI and touch down VSI etc from SimConnect via VB.Net

Messages
26
How to get GForce and touchdown info etc from SimConnect via VB.Net

Hi All,

(Ignore VSI on the above)

I'm writing a small utility to monitor an FSX flight, and using the VB.Net Managed Request sample in the SDK I've got the basics organised - but questions are:

- Is there a list of datatypes for each simconnect Variable anywhere, I've got the units one from the SDK, but the datatype I have to take a guess at or find by trial and error. Or have I missed something in the docs?

- G Force - what datatype should I use for this? I get odd numbers. I understand the data should come back in ft/min^2 and 32.17 is equivalent to +1G - but I don't seem to be able to get a number I can convert to x.xG.

- Touchdown - I'd like to monitor the landing - as far as I'm aware, the only way to check if I landed where i was supposed to is to compare the lat/lon of the aircraft against where it should be (i.e. within a 1/2nm radius) and that it touched down on the correct surface. Also, is there any way to get touchdown VSI/IAS etc or do I have to wait for the SIM ON GROUND flag to be set and grab the values then?

And last question - how do I call FSX and get it to load a flight plan automatically with the plane cold and dark at an appropriate (or default) stand/start point? (from a command line or from an external application with a call) If I put the flight plan on the command line, I end up in the flight planner or in a menu rather than on the apron. Is there a command line option or something I need to set in the pln file to do that?

Many thanks!,
Slopey
 
Last edited:
In the simulation variables document under "Aircraft Position and Speed Data" there is a bool variable "Sim On Ground." Use this to detect touchdown.

As for the G-force, I'm not totally sure right now. I'll try to look into this. Maybe someone else can answer this?
 
Hi there,

Yes - I'm getting good results with the Sim On Ground flag.

Just need to get my head round the GForce values - it does'nt seem to make sense regardless of which type I use - I'm guessing it's a FLOAT64??

Also - any ideas on how to load a flightplan and start at a stand cold and dark - I think it's the pln file I need to configure appropriately for that - can I pass it to FSX.exe on the command line or can I push it over with SimConnect?

Cheers,
S.
 
Hey Slopey,

did you solve your problem?

What exactly are you looking for, when you talk about calculating the GForces at touchdown?

Do you mean the normal acceleration, like a g meter would indicate, or are you talking also about the longitudinal and lateral accelerations as well.

What exactly do you mean by GForce, since there are accelerations like in g, m/s^2, ft/m^2 etc. or forces in N or lbf, which are basically the product of mass and acceleration.

If you specify in more detail what you are actually looking for, I might be able to help you.
 
Hey Guys,

Both the Units type and the DataType are your choice, although only some choices make sense in some situations.

The Units type listed in the SDK docs is generally the one used internally in the sim for that var, but you can ask for any other unit type that makes sense (so only length types for a length value, velocity types for a speed value, etc).

The DataType value is used to match the type of variable you have defined in your data structure, so if you used a double, then this should be FLOAT64, if you used a float, this should be FLOAT32, if you used an int, this should be INT32, etc - and for the few SimVars that return strings, this obviously has to be a string type. As to which data type you should use, that depends on the Units type you selected and on the resolution you require - if you ask for a velocity value in MPH and you only need the integer value, you can ask for this as an INT32, but if you need the fractional portion, then you would want to use FLOAT32 or FLOAT64 (and, of course, the type you use to define the actual variable in the structure must match this choice).

In your particular G Force SimVar example, the internal Units type is listed as GForce, so if you use that same units value and a FLOAT32 or FLOAT64 datatype, then you should get a value that is scaled into the G range already (so it should already be in the x.xG format you were looking for). If you asked for this value in "feet per second squared", then you should get back a value that is in ft/sec^2.
 
Last edited:
Back
Top