I am trying to set airspeed and ground speed values through Aircraft Position and Speed Variables. ExternalSim sample application in Prepar3D SDK is being used as the application. When using AIRSPEED TRUE and AIRSPEED INDICATED variables to set airspeed, SIMCONNECT_EXCEPTION_DATA_ERROR is triggered by SimConnect API, so I decided to use the following Aircraft Position and Speed Variables as in ExternalSim application.
Airspeed:
VELOCITY BODY Z True longitudinal speed, relative to aircraft axis
Ground Speed:
VELOCITY WORLD Z: Speed relative to earth, in North/South direction
VELOCITY WORLD X: Speed relative to earth, in East/West direction
VELOCITY WORLD Y: Speed relative to earth, in vertical direction
Ground speed looks OK with setting VELOCITY WORLD vector, but airspeed true and airspeed indicated variables show same value even if altitude is enough high (30000 ft) to make their value different. I checked that AMBIENT DENSITY simulation variable was decreased properly when high altitude is set and increased at low altitude.
What else parameters need to be checked to set airspeed indicated and airspeed true separately.
Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
In your realism settings, is Display Indicated Airspeed selected or Display True Airspeed?
Jonathan Bleeker
Milviz systems dev
Formerly known as Naruto-kun
Milviz systems dev
Formerly known as Naruto-kun
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
We are using Flight1Tech G1000 device as instrument and both true and indicated airspeed values are shown.
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
The question isn't about what avionics. It's a setting in the core sim's options.
Ed Wilson
Senior Developer
Mindstar Aviation
Senior Developer
Mindstar Aviation
-
- Posts: 152
- Joined: Mon Jun 12, 2017 6:14 pm
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
There are problems with BODY VELOCITY Z.
I have tried to use the variable and found all manner of problems with it, including it continuing to integrate the last value even when paused, and the input units type being ignored (it is always ft sec^-2 regardless of what the input units are set to).
In short, it's a mess.
Note also that these parameters you're experimenting with seem to be wholly disconnected and are merely outputs and not actually related to each other internally.
i.e. you can write whatever you want, and it will not reflect correctly in the other parameters. The real output (actual aircraft speed) is based on body velocity Z input and heading. The rest is junk output unless set by the sim.
I use sim TAS, and compute everything else myself (including the atmospheric model).
I have tried to use the variable and found all manner of problems with it, including it continuing to integrate the last value even when paused, and the input units type being ignored (it is always ft sec^-2 regardless of what the input units are set to).
In short, it's a mess.
Note also that these parameters you're experimenting with seem to be wholly disconnected and are merely outputs and not actually related to each other internally.
i.e. you can write whatever you want, and it will not reflect correctly in the other parameters. The real output (actual aircraft speed) is based on body velocity Z input and heading. The rest is junk output unless set by the sim.
I use sim TAS, and compute everything else myself (including the atmospheric model).
All comments and opinions are my own.
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
I have no problems integrating body velocity Z, but I work in a dll, not a exe. I set my SimConnect data request to return every sim frame (and the flag that sets it to return on change is not added), and I call my integration functions from that particular request case. That way it doesn't get called when the sim is paused. I use the following for timing:
https://www.fsdeveloper.com/wiki/index. ... %2B_timers
Be sure to monitor your delta_t and not call your integration function when it is 0, as data requests sometimes return more than once in the same sim frame.
https://www.fsdeveloper.com/wiki/index. ... %2B_timers
Be sure to monitor your delta_t and not call your integration function when it is 0, as data requests sometimes return more than once in the same sim frame.
Jonathan Bleeker
Milviz systems dev
Formerly known as Naruto-kun
Milviz systems dev
Formerly known as Naruto-kun
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
In realism settings, 'Display indicated airspeed' was checked.
When 'Display true airspeed' is checked, there were no difference, still true and indicated airspeed is shown same value that are set from VELOCITY BODY Z. Problem has not solved with realism settings.
My problem is setting VELOCITY BODY Z effect on AIRSPEED TRUE without taking atmospheric condition into account, so that, both AIRSPEED TRUE and AIRSPEED INDICATED show same value on the instrument. I would expect that VELOCITY BODY Z set only AIRSPEED INDICATED simulation variable value, SIMCONNECT API allow me to change AIRSPEED TRUE value (with using external simulation atmospheric model-- ExternalSim sample application in Prepar3D SDK is being used as the application). Currently SIMCONNECT API generates simconnect exception in case of setting AIRSPEED TRUE or AIRSPEED INDICATED directly.
When 'Display true airspeed' is checked, there were no difference, still true and indicated airspeed is shown same value that are set from VELOCITY BODY Z. Problem has not solved with realism settings.
My problem is setting VELOCITY BODY Z effect on AIRSPEED TRUE without taking atmospheric condition into account, so that, both AIRSPEED TRUE and AIRSPEED INDICATED show same value on the instrument. I would expect that VELOCITY BODY Z set only AIRSPEED INDICATED simulation variable value, SIMCONNECT API allow me to change AIRSPEED TRUE value (with using external simulation atmospheric model-- ExternalSim sample application in Prepar3D SDK is being used as the application). Currently SIMCONNECT API generates simconnect exception in case of setting AIRSPEED TRUE or AIRSPEED INDICATED directly.
Re: Setting airspeed true and airspeed indicated values through SimConnect Aircraft Position and Speed Variables
Setting the instrument sim vars has always been rather hit or miss with weird behaviour for me. I would recommend taking the raw velocity values and atmospheric parameters and calculating your own instrument indications using your own vars. I should point out that setting body velocity to true is not going to give you true, but rather total velocity, which would be same as ground speed when in level flight.
Jonathan Bleeker
Milviz systems dev
Formerly known as Naruto-kun
Milviz systems dev
Formerly known as Naruto-kun