-
-
Notifications
You must be signed in to change notification settings - Fork 9
Tips And Tricks For Setting Simulator Values
You will see the value +/-16384
appear often, which is a common range for various simulator "set" commands, especially for things like control surfaces and levers.
Typically this translates to some percentage value within the simulator (eg. -16384
aileron deflection is 100% to the left, or technically "-100%").
So it usually helps to translate the awkward 16384
value to percentages, as demonstrated in various examples below.
As an aside here, in the SimConnect documentation, the value 16384
is commonly listed as 16383
instead. In fact I believed that at first and the first version
of this page said "16383" everywhere. Turns out the docs are wrong, and, for example, setting propeller pitch to 16383 only gets it to 99.9%. And the variable
values we get back from SimConnect are also in the 16384 range. 16384
actually makes a lot more sense from a programming and math perspective since it's a nice
0x4000
in hex and also evenly divisible. 8-)
16384 * (percent / 100)
or eg. for 5%: 16384 * 0.05
16384 * -0.15
${value:MSFSTouchPortalPlugin.Engine.State.ThrottleEngine1} * 163.84 + 16384 * 0.05
^^^^^^^^ ^^^^^^^^^^^^
Convert % to 0-16383 range. Add 5% of full range.
Add 1000' to currently set AP altitude hold value:
${value:MSFSTouchPortalPlugin.AutoPilot.State.AutoPilotAltitudeVar} + 1000
The other AP settings work the same, just use the corresponding state variable.
Increments heading in 5° steps and wraps around to 0 after 355 (due to modulo operator):
(${value:MSFSTouchPortalPlugin.AutoPilot.State.AutoPilotHeadingVar} + 5) % 360