# Radio Navigation {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} Token Variables - along with the [Gauge API](../gauge-api/) - have been deprecated in Microsoft Flight Simulator 2024 in favour of the new [Vars API](../../vars-api/vars-api/) and [Event API](../../event-api/event-api/), which work with the more extensive and supported [Simulation Variables](../../../simvars/simulation-variables/) and [Key Events](../../../key-events/key-events/). {{< /callout >}} This page lists the available **radio navigation** [Token Variables](token-variables/) for use when creating gauges using {{< glossterm >}}wasm{{< /glossterm >}} / C++.     ### ADF {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |-------------------------------------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `ADF_500_HZ_TUNABLE` | `n` (FLOAT) | Specifies the tuneable {{< glossterm >}}adf{{< /glossterm >}} frequency. | | `ADF_CARD_RADIAL` | `n` (FLOAT) | Specifies the {{< glossterm >}}adf{{< /glossterm >}} card cardinal direction, in degrees from 0 to 360. | | `ADF_EXTENDED_FREQUENCY` | `n` (FLOAT) | Specifies the {{< glossterm >}}adf{{< /glossterm >}} extended frequency, [Frequency BCD16](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `ADF_FREQUENCY` | `n` (FLOAT) | Specifies the {{< glossterm >}}adf{{< /glossterm >}} frequency, [Frequency BCD16](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `ADF_IDENTITY` | `p` (PVOID) | Pointer to a string with the {{< glossterm >}}adf{{< /glossterm >}} identity. | | `ADF_MORSE_IDENT` | `b` (BOOL) | This will be TRUE (1) if there is a morse signal, FALSE (0) otherwise. | | `ADF_NEEDLE` | `n` (FLOAT) | The {{< glossterm >}}adf{{< /glossterm >}} needle position, expressed as 16-bit pseudo-degrees. | | `ADF_SIGNAL_STRENGTH` | `n` (FLOAT) | The {{< glossterm >}}adf{{< /glossterm >}} signal strength where 0 is no signal, and 256 and above is a good signal. | | `ADF_SOUND_TOGGLE` | `b` (BOOL) | Whether the {{< glossterm >}}adf{{< /glossterm >}} audio is on (TRUE, 1) or off (FALSE, 0). | | `ADF_VOLUME` | `n` (FLOAT) | The volume of the {{< glossterm >}}adf{{< /glossterm >}} output, expressed as a {{< glossterm >}}percent_over_100{{< /glossterm >}}. | {{< /table-wrapper >}}     ### ATC {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---------------------------------------------------------------------------------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `ATC_AIRPORT_IS_TOWERED` | `b` (BOOL) | This will be TRUE (1) if the airport is controlled, or FALSE (0) otherwise. | | `ATC_CLEARED_LANDING` | `b` (BOOL) | This will be TRUE (1) if the ATC has cleared the aircraft for landing, or FALSE (0) otherwise. | | `ATC_CLEARED_TAKEOFF` | `b` (BOOL) | This will be TRUE (1) if the ATC has cleared the aircraft for takeoff, or FALSE (0) otherwise. | | `ATC_CLEARED_TAXI` | `b` (BOOL) | This will be TRUE (1) if the ATC has cleared the aircraft for taxi, or FALSE (0) otherwise. | | `ATC_RUNWAY_AIRPORT_NAME` | `p` (PVOID) | A pointer to the name of the airport of the runway assigned by the ATC. | | `ATC_RUNWAY_DISTANCE` | `n` (FLOAT) | This value represents the distance between the aircraft and the center of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_END_DISTANCE` | `n` (FLOAT) | This value corresponds to the horizontal distance between the aircraft and the end of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_HEADING_DEGREES_TRUE` | `n` (FLOAT) | This value represents the true heading of the runway selected by the ATC, in degrees. | | `ATC_RUNWAY_LENGTH` | `n` (FLOAT) | The length of the runway assigned by the ATC, in meters. Will return -1 if no runway is assigned. | | `ATC_RUNWAY_RELATIVE_POSITION_X` | `n` (FLOAT) | This value corresponds to the aircraft's main gear relative X (transverse) axis position on the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_RELATIVE_POSITION_Y` | `n` (FLOAT) | This value corresponds to the aircraft's main gear relative Y (height) axis position on the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_RELATIVE_POSITION_Z` | `n` (FLOAT) | This value corresponds to the aircraft's main gear relative Z (longitudinal) axis position on the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_SELECTED` | `n` (BOOL) | Whether the ATC has pre-selected a runway for the aircraft (TRUE, 1) or not (FALSE, 0). | | `ATC_RUNWAY_START_DISTANCE` | `n` (FLOAT) | This value corresponds to the horizontal distance between the aircraft and the start of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_TDPOINT_RELATIVE_POSITION_X` | `n` (FLOAT) | This value represents the aircraft main gear relative X (transverse) axis position according to the aiming point of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_TDPOINT_RELATIVE_POSITION_Y` | `n` (FLOAT) | This value represents the aircraft main gear relative Y (height) axis position according to the aiming point of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_TDPOINT_RELATIVE_POSITION_Z` | `n` (FLOAT) | This value represents the aircraft main gear relative Z (longitudinal) axis position according to the aiming point of the runway selected by the ATC. Value is in meters. | | `ATC_RUNWAY_WIDTH` | `n` (FLOAT) | The width of the runway assigned by the ATC, in meters. Will return -1 if no runway is assigned. | | `SLOPE_TO_ATC_RUNWAY` | `n` (FLOAT) | The slope between the aircraft and the expected landing position of the runway, in radians. Will return 0 if no runway is assigned. | {{< /table-wrapper >}}     ### Beacons
ParametersUniversal Var MemberDescription
MARKER_BEACON_SENSITIVITY_HIGHb (BOOL)Whether the Marker Beacon is in High Sensitivity mode (TRUE, 1) or not (FALSE, 0).
MARKER_BEACON_STATE

e (ENUM)

  1. 0 = no beacon
  2. 1 = outer
  3. 2 = middle
  4. 3 = inner
The marker beacon state.
MARKER_BEACON_TEST_MUTEb (BOOL)Whether the Marker Beacon is in test/mute mode (TRUE, 1) or not (FALSE, 0).
MARKER_SOUND_TOGGLEn (FLOAT)Whether the Marker Beacon sound is on (TRUE, 1) or not (FALSE, 0).
    ### COM
ParametersUniversal Var MemberDescription
COM_ACTIVE_FREQUENCYn (FLOAT)The COM active frequency, Frequency BCD16 encoded.
COM_BOTH_RECEIVEn (FLOAT)Whether the audio is being recieved on both COMs (TRUE , 1) or not (FALSE, 0).

COM_FREQUENCY

COM2_FREQUENCY

n (FLOAT)Specifies COM 1/2 radio frequency, Frequency BCD16 encoded.
COM_RADIO_25_KHZ_TUNABLEb (BOOL)Whether the COM radio is tuneable (TRUE , 1) or not (FALSE, 0).
COM_RECEIVEb (BOOL)Whether the aircraft is receiving on this COM channel (TRUE, 1) or not (FALSE, 0).
COM_RECEIVE_EX1b (BOOL)Whether the aircraft is receiving on this COM channel (TRUE, 1) or not (FALSE, 0).

COM_STANDBY_FREQUENCY

COM_STBY_FREQUENCY

COM2_STBY_FREQUENCY

n (FLOAT)Specifies COM 1/2 radio standby frequency, Frequency BCD16 encoded.
COM_VOLUMEn (FLOAT)The volume of the COM radio, as a percentage between 0 and 100.

COM1_AUTOSWITCH_ON

COM2_AUTOSWITCH_ON

b (BOOL)Whether the aircraft COM switch 1/2 is on (TRUE, 1) or not (FALSE, 0).

COM1_STORED_FREQUENCY

COM2_STORED_FREQUENCY

COM3_STORED_FREQUENCY

n (FLOAT)Specifies COM 1/2/3 stored frequency, Frequency BCD16 encoded.

COM1_TRANSMIT_SELECT

COM2_TRANSMIT_SELECT

b (BOOL)Audio panel COM transmit state, either on (TRUE, 1) or off (FALSE, 0).
    ### DME
ParametersUniversal Var MemberDescription
CURRENT_DME

e (ENUM)

  1. 0 = DME1
  2. 1 = DME2
The currently selected DME.
CURRENT_DME_DISTANCEn (FLOAT)The DME (1 or 2) distance, in nm.
CURRENT_DME_SPEEDn (FLOAT)The DME (1 or 2) speed, in Knots.
CURRENT_DME_MINn (FLOAT)The DME (1 or 2) minutes until arriving.

DME1_DISPLAY_TYPE

DME2_DISPLAY_TYPE

b (BOOL)

The type of display for the DME, either TRUE (1) for the speed, in knots, or FALSE (0) for the distance readout.

DME1_DISTANCE

DME2_DISTANCE

n (FLOAT)The DME (1 or 2) distance readout.

DME1_MORSE_IDENT

DME2_MORSE_IDENT

b (BOOL)This will be TRUE (1) if there is a morse signal, FALSE (0) otherwise.

DME1_SPEED

DME2_SPEED

n (FLOAT)The DME (1 or 2) speed readout.
DME_SOUND_TOGGLEn (FLOAT)Audio panel DME audio state, either on (TRUE, 1) or off (FALSE, 0).
    ### GPS {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---------------------------------------------------------------------------------|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | `GPS_DRIVES_NAV1` | `b` (BOOL) | Whether the {{< glossterm >}}gps{{< /glossterm >}} is driving the Nav 1 indicator (TRUE, 1) or not (FALSE, 0). | | `GPS_FLAGS` | `f` (FLAGS) | {{< glossterm >}}gps{{< /glossterm >}} flag settings. See `GPS_FLAG_` in GAUGES.h. | | `GPS_FLIGHTPLAN_TOTAL_DISTANCE` | `n` (FLOAT) | The {{< glossterm >}}gps{{< /glossterm >}} flightplan total distance in meters. | | `GPS_GROUND_HEADING` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} true heading, in Radians (0 - 2PI). | | `GPS_GROUND_SPEED` | `n` (FLOAT) | The current ground speed, in meters per second. | | `GPS_GROUND_TRACK` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} ground track (heading + magvar, magnetic yaw), in Radians (0 - 2PI). | | `GPS_MAGVAR` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} magnetic variation, in radians. | | `GPS_OBS_ACTIVE` | `b` (BOOL) | Whether the OBS mode is currently active (TRUE, 1) or not (FALSE, 0). If TRUE, this will disable the automatic sequencing of waypoints in the GPS flight plan. | | `GPS_OBS_VALUE` | `n` (FLOAT) | The current course set for the OBS, in degrees. | | `GPS_POSITION_ALT` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} altitude, in meters. | | `GPS_POSITION_LAT` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} latitude, in latitude meters (`meters * (360 / 40007000)`). | | `GPS_POSITION_LON` | `n` (FLOAT) | The current {{< glossterm >}}gps{{< /glossterm >}} longitude, in radians. | | `GPS_WP_BEARING` | `n` (FLOAT) | The magnetic bearing to waypoint the next heading, in radians. | | `GPS_WP_CROSS_TRK` | `n` (FLOAT) | The cross track distance, in meters. | | `GPS_WP_DISTANCE` | `n` (FLOAT) | Meters to next waypoint. | | `GPS_WP_NEXT_ALT` | `n` (FLOAT) | The altitude of next waypoint, in meters. | | `GPS_WP_NEXT_LAT` | `n` (FLOAT) | The latitude of next waypoint, in degrees. | | `GPS_WP_NEXT_LON` | `n` (FLOAT) | The longitude of next waypoint, in degrees. | | `GPS_WP_PREV_ALT` | `n` (FLOAT) | The altitude of previous waypoint, in meters. | | `GPS_WP_PREV_LAT` | `n` (FLOAT) | The latitude of previous waypoint, in degrees. | | `GPS_WP_PREV_LON` | `n` (FLOAT) | The longitude of previous waypoint, in degrees. | | `GPS_WP_REQ_HDG` | `n` (FLOAT) | The required heading, magnetic, from the prev wayppoint to next waypoint, in radians. | | `GPS_WP_STRING` | `p` (PVOID) | The name of the next waypoint. | | `GPS_WP_TRUE_BEARING` | `n` (FLOAT) | The true bearing to the waypoint, in degrees. | | `GPS_WP_TRUE_REQ_HDG` | `n` (FLOAT) | The required true heading to the waypoint, in degrees. | {{< /table-wrapper >}}     ### HSI
ParametersUniversal Var MemberDescription
HSI_BEARINGn (FLOAT)This will return the HSI needle bearing, in degrees.
HSI_BEARING_VALIDb (BOOL)This will be TRUE (1) if the HSI_BEARING variable contains valid data, or FALSE (0) otherwise.
HSI_DESIRED_HEADING_NEEDLEn (FLOAT)The HSI desired heading, in degrees.
HSI_DISTANCEn (FLOAT)The DME/GPS distance in nm.
HSI_HORIZONTAL_NEEDLEn (FLOAT)The HSI horizontal needle position between -1 and 1, which corresponds to -0.7º and 0.7º.
HSI_HORIZONTAL_VALIDb (BOOL)Whether the HSI signal is valid (TRUE, 1) or not (FALSE, 0).
HSI_OBI_NEEDLEn (FLOAT)The OBS needle setting, in degrees.
HSI_SIGNAL_LOCALISERb (BOOL)Whether the station is a localiser (TRUE, 1) or not (FALSE, 0).
HSI_SPEEDn (FLOAT)The DME/GPS speed, in Knots.
HSI_STATION_NAMEp (PVOID)The HSI station name.
HSI_TF_FLAG

e (ENUM)

  1. 0 = Off
  2. 1 = TO
  3. 2 = FROM
The HSI to/from flag setting.
HSI_VERTICAL_VALIDb (BOOL)Whether the NAV flag is on (TRUE, 1) or not (FALSE, 0).
HSI_VERTICAL_NEEDLEn (FLOAT)

The HSI vertical needle position. The value returned will be between -1 and 1 (corresponding to -10º and 10º) if VOR, or between -2.5º and 2.5º if localizer, or between -5nm and 5nm if GPS.

    ### NAV
ParametersUniversal Var MemberDescription
NAV_VOLUMEn (FLOAT)The volume of the NAV Radio, expressed as a percentage from 0 to 100.

NAV1_AUTOSWITCH_ON

NAV2_AUTOSWITCH_ON

b (BOOL)Whether the NAV1/2 autoswitch is on (TRUE, 1) or not (FALSE, 0).

NAV1_COMMNAV_TEST

NAV2_COMMNAV_TEST

b (BOOL)This will be TRUE (1) if the NAV1/2 COM system is working and FALSE (0) if it is not.

NAV1_FREQUENCY

NAV2_FREQUENCY

n (FLOAT)The NAV1/2 active frequency, expressed as a Frequency BCD16 value.

NAV1_MORSE_IDENT

NAV2_MORSE_IDENT

b (BOOL)This will be TRUE (1) if there is a morse signal, and FALSE (0) otherwise.

NAV1_SOUND_TOGGLE

NAV2_SOUND_TOGGLE

n (FLOAT)This will be TRUE (1) if NAV1/2 audio is enabled, and FALSE (0) otherwise.

NAV1_STBY_FREQUENCY

NAV2_STBY_FREQUENCY

n (FLOAT)The NAV1/2 standby frequency, expressed as a Frequency BCD16 value.

NAV1_VOR_RADIAL

NAV2_VOR_RADIAL

n (FLOAT)The rdial that the aircraft is on, in radians.
TACAN_DRIVES_NAV1b (BOOL)Whether the TACAN is driving the Nav 1 indicator (TRUE, 1) or not (FALSE, 0).
    ### Pilot
ParametersUniversal Var MemberDescription
PILOT_TRANSMITTER_TYPE

e (ENUM)

  1. 0 = COM1
  2. 1 = COM2
  3. 2 = COM3
  4. 3 = TEL
  5. 4 = NONE
The channel on which the pilot is transmitting.
PILOT_TRANSMITTINGb (BOOL)Whether the pilot is transmitting (TRUE, 1) or not (FALSE, 0).
    ### Radio
ParametersUniversal Var MemberDescription
RADIO_HEIGHTn (FLOAT)The radar altitude, in meters.
RADIO_MORSE_IDENT_STATESf (FLAGS)

The radio morse state, formed using these flags:

  1. 1: VOR1 (Bit 1)
  2. 2: VOR2 (Bit 2)
  3. 4: DME1 (Bit 3)
  4. 8: DME2 (Bit 4)
  5. 16: ADF (Bit 5)
RADIO_STACK_VISIBLEb (BOOL)Whether the radio stack is visible (TRUE, 1) or not (FALSE, 0).
    ### VOR
ParametersUniversal Var MemberDescription

VOR1_BACK_COURSE_FLAGS

VOR2_BACK_COURSE_FLAGS

f (FLAGS)

The status of VOR1/2, comprised from the following:

  1. BIT0:[index] Back course available
  2. BIT1:[index] Localizer tuned in
  3. BIT2:[index] On course
  4. BIT7:[index] Station active

VOR1_BEARING_DEGREES

VOR2_BEARING_DEGREES

n (FLOAT)The relative bearing for the VOR1/2 station, measured in degrees.

VOR1_CODE

VOR2_CODE

f (FLAGS)

The VOR 1/2 code flags:

  1. BIT0:[index] 1= DME available
  2. BIT1:[index] 1 = TACAN available
  3. BIT2:[index] 1= voice available
  4. BIT3:[index] 1= no nav signal available
  5. BIT4:[index] 1= DME transmitter at glide slope transmitter
  6. BIT5:[index] 1= no localizer backcourse
  7. BIT6:[index] 1= glideslope available
  8. BIT7:[index] 0= VOR, 1= Localizer

VOR1_GS_FLAG

VOR2_GS_FLAG

b (BOOL)Whether there is a glideslope signal on VOR1/2 (TRUE, 1) or not (FALSE, 0).

VOR1_GS_NEEDLE

VOR2_GS_NEEDLE

n (FLOAT)The glideslope needle deflection, between -120 and 120, which corresponds to -0.7 and 0.7.

VOR1_IDENTITY

VOR2_IDENTITY

p (PVOID)The VOR 1/2 identity, as a string.

VOR1_MAG_VAR

VOR2_MAG_VAR

n (FLOAT)The magnetic deviation at the location of the VOR1/2 station, between 0 and 65536, corresponding to 0º to 360º.

VOR1_NEEDLE

VOR2_NEEDLE

n (FLOAT)The VOR1/2 needle deviation, between -127 and 127. This corresponds to between -10 and 10 if VOR, or between -2.5 and 2.5 if localizer.
VOR1_NEEDLE_RADIOn (FLOAT)The VOR1 needle deviation - driven always by VOR - between -127 and 127. This corresponds to between -10 and 10 if VOR, or between -2.5 and 2.5 if localizer.

VOR1_OBI

VOR2_OBI

n (FLOAT)The VOR1/2 OBS setting, in degrees.

VOR1_SIGNAL_STRENGTH

VOR2_SIGNAL_STRENGTH

n (FLOAT)The VOR1/2 signal strnegth where 0 is no signal and greater than or eqiual to 256 is a good signal.

VOR1_TF_FLAG

VOR2_TF_FLAG

e (ENUM)

  1. 0 = Off
  2. 1 = To
  3. 2 = From
The to/from status of VOR1/2.