Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Tips And Tricks For Setting Simulator Values

Max Paperno edited this page Apr 18, 2022 · 3 revisions

Tips And Tricks For Setting Simulator Values

16384

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-)

Percentage of 16384

16384 * (percent / 100) or eg. for 5%: 16384 * 0.05

Examples

Set throttle to -15%

16384 * -0.15

Throttle advance in 5% increments

${value:MSFSTouchPortalPlugin.Engine.State.ThrottleEngine1} * 163.84 + 16384 * 0.05
                                                            ^^^^^^^^   ^^^^^^^^^^^^
                                         Convert % to 0-16383 range.   Add 5% of full range.

Adjust AP Hold values by custom stepping

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.

Circular AP heading adjustment with custom stepping

Increments heading in 5° steps and wraps around to 0 after 355 (due to modulo operator):
    (${value:MSFSTouchPortalPlugin.AutoPilot.State.AutoPilotHeadingVar} + 5) % 360