PROGRAMMING APIs

You can access the following environment variables using the E: identifier in RPN, or through SimConnect (similar to SimVars). Note that most of these variables are read-only and cannot be set, unless otherwise specified:

 

Variable Units Description
ABSOLUTE TIME Seconds This returns the seconds since 12:00 am 1/1/1AD Zulu Time See the Note On Zulu Time for more information.
ZULU TIME Seconds This returns the seconds since midnight (00:00 Zulu Time) on the current day.
ZULU DAY OF WEEK Number This returns the current Zulu Time day of the week as an integer value between 0 and 6 (inclusive), where 0 is Sunday and 6 is Saturday. See the Note On Zulu Time for more information.
ZULU DAY OF MONTH Number This returns the current Zulu Time day of the month as an integer value between 1 and 31 (inclusive). See the Note On Zulu Time for more information.
ZULU MONTH OF YEAR Number This returns the current Zulu Time month of the year as an integer value between 1 and 12 (inclusive), where 1 is January and 12 is December. See the Note On Zulu Time for more information.
ZULU DAY OF YEAR Number This returns the current Zulu Time day of the year as an integer value between 0 and 365 (365 only on a leap year). See the Note On Zulu Time for more information.
ZULU YEAR Number This returns the current Zulu Time year as an integer value. See the Note On Zulu Time for more information.
ZULU SUNRISE TIME Seconds This returns the seconds since midnight until the sunrise based on Zulu Time. See the Note On Zulu Time for more information.
ZULU SUNSET TIME Seconds This returns the seconds since midnight until the sunset based on Zulu Time. See the Note On Zulu Time for more information.
LOCAL TIME Seconds This returns the seconds since midnight (00:00 local time) on the current day.
LOCAL DAY OF WEEK Number This returns the current day of the week as an integer value between 0 and 6 (inclusive), where 0 is Monday and 6 is Sunday, within the local time reference.
LOCAL DAY OF MONTH Number This returns the current day of the month as an integer value between 1 and 31 (inclusive), within the local time reference.
LOCAL MONTH OF YEAR Number This returns the current month of the year as an integer value between 1 and 12 (inclusive), where 1 is January and 12 is December, within the local time reference.
LOCAL DAY OF YEAR Number This returns the current day of the year as an integer value between 0 and 365 (365 only on a leap year), within the local time reference.
LOCAL YEAR Number This returns the current year (local time) as an integer value.
TIME ZONE OFFSET Seconds This returns the offset between the local time and Zulu Time. See the Note On Zulu Time for more information.
TIME OF DAY

Enum

(Number)

This will return an integer value representing the approximate time of day where:

  • 0 = dawn
  • 1 = day
  • 2 = dusk
  • 3 = night
TOOLTIP UNITS

Enum

(Number)

This will return an integer value representing the current units used to display tooltip information, where:

  • 0 = default
  • 1 = metric (SI)
  • 2 = US (imperial)
UNITS OF MEASURE

Enum

(Number)

This indicates the units used to express measurements and will return an integer value representing the following:

  • 0 - English
  • 1 - Metric with altitude in feet
  • 2 - Metric with altitude in meters
SIMULATION RATE Number This is used to get/set the internal rate of passing time within the simulation(independently of the visual frame rate). The value will be clamped between 0.0625 and 128, and a value of 1 means that 1 second of game time is the same as 1 second of "real" time, and lower values will make the game time slower, and higher values will make the game time faster. Values are always multiples of two starting at 0.0625, so you can have: 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, ... 128
SIMULATION TIME Seconds This returns a value for the seconds since the simulation has been started.
SIMULATION DELTA TIME Number This returns a value for the time passed between the last simulation frame and the current one.
IS IN VR Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the simulation is in VR mode or not.
IS USING MOTION CONTROLLERS Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the user is using 6DoF controllers in VR or not.
IS USING JOYSTICK THROTTLE Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the user is manipulating the throttle with a joystick device or not.
IS IN RTC Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the simulation is currently running an RTC or not.
IS AVATAR Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the user is in "Avatar" mode or not.
IS AIRCRAFT Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether the user is in "Aircraft" mode or not.
EFB_BRIGHTNESS Percent Over 100

This return the brightness of the EFB, from 0 to 1. If it is set to "auto brightness" within the EFB's settings, then -1 will be returned.

NOTE: This variable will be renamed in a coming update to "EFB BRIGHTNESS" (no underscore)

SWITCH USER ALWAYS ALLOWED Boolean This returns either 1 (TRUE) or 0 (FALSE) to indicate whether there is no limitation to switch between avatar and aircraft mode or not.

 

Note On Zulu Time

It should be be noted that Zulu Time is calculated off of the local time using a table of time-zones. For example, if the simulation is in a timezone that is +9 hours, then Zulu Time will be considered as current time - 9h.