# Working with SimVars and L:Vars

Information from the simulator and the HPG aircraft is available to be accessed at any time.

# Aircraft Simulation Variables (A:Vars)

A:Vars indicate data from the MSFS simulation, including the environment and default systems.

A few popular examples include:

Variable Description
PLANE ALTITUDE, feet Altitude above the earth.
GPS GROUND SPEED, knots Speed over the ground
RADIO HEIGHT, feet Radio Altitude (height over the ground)

View The full list of simulation variables in MSFS (opens new window). Each variable on this page may be prefixed with A:, but this is not necessary as it is the default variable prefix.

Examples:

{"set_message":{"text":"my variable is: {0}", "params": [
  {"var":["PLANE ALTITUDE", "feet"]}
]}}

Note that A:Vars are usually read-only. Some A:Vars however can be written directly, like the transponder:

Examples:

{"set":{"var":["TRANSPONDER STATE:1", "enum"]}, "value": 1}

# Local Variables (L:Vars)

L:Vars are much more open than A:Vars.

  • Simply writing to any L:Var will create it, if it didn't previously exist.
  • Developers are free to use L:Vars for anything they want.

You have access to the HPG Aircraft SDK L:Vars, as well as being able to write your own L:Vars for your own use. Note that most HPG aircraft SDK L:vars are also read-only.

Examples:

{"set_message":{"text":"my variable is: {0}", "params": [
  {"var":["L:H145_SDK_VARIANT_ID", "number"]}
]}}

Examples:

{"set":{"var":["L:MY_MISSION_VAR", "number"]}, "value": 99}