Jump to content
Sign in to follow this  
Marniftarr

How to use SIMCONNECT_DATA_XYZ structure ?

Recommended Posts

Hi folk ! I can not find any example about this SIMCONNECT_DATA_XYZ struct.I want to read or transmit any data to/from sim use this structure , please tell me HOW ? It is a work ? Who are use it ?I read in C+ or Delphi or VB. Thanx.

Share this post


Link to post
Share on other sites
Hi folk ! I can not find any example about this SIMCONNECT_DATA_XYZ struct.I want to read or transmit any data to/from sim use this structure , please tell me HOW ?
The structure is clearly defined in the SimConnect header:// SIMCONNECT_DATA_XYZstruct SIMCONNECT_DATA_XYZ{ double x; double y; double z;};So, just define a structure of three doubles (64-bit floats), and pass its address where you'd normally pass the address of your single double or integer or whatever.RegardsPete

Win10: 22H2 19045.2728
CPU: 9900KS at 5.5GHz
Memory: 32Gb at 3800 MHz.
GPU:  RTX 24Gb Titan
2 x 2160p projectors at 25Hz onto 200 FOV curved screen

Share this post


Link to post
Share on other sites

Well, to start with, the structure types can only be used with specific SimVar names (for the XYZ, there are around 10 that use that format, LATLONALT has about 5). Second, you would create a variable in your data structure using the full SimConnect data type name (ie "SIMCONNECT_DATA_XYZ myXYZVar;") and do one AddToDataDef call for that field using SIMCONNECT_DATATYPE_XYZ as the data type.Also note, some of the SimVar structure types (Waypoints, InitPosition) are only valid when used with SetDataOnXxx, they aren't associated with any readable variables and can't be used with RequestDataOnXxx.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...