# 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-index/). {{< /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 {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `MARKER_BEACON_SENSITIVITY_HIGH` | `b` (BOOL) | Whether the Marker Beacon is in High Sensitivity mode (TRUE, 1) or not (FALSE, 0). | | `MARKER_BEACON_STATE` | `e` (ENUM){{< params/smallfont-list >}}0 = no beacon1 = outer2 = middle3 = inner{{< /params/smallfont-list >}} | The marker beacon state. | | `MARKER_BEACON_TEST_MUTE` | `b` (BOOL) | Whether the Marker Beacon is in test/mute mode (TRUE, 1) or not (FALSE, 0). | | `MARKER_SOUND_TOGGLE` | `n` (FLOAT) | Whether the Marker Beacon sound is on (TRUE, 1) or not (FALSE, 0). | {{< /table-wrapper >}} ### COM {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `COM_ACTIVE_FREQUENCY` | `n` (FLOAT) | The COM active frequency, [Frequency BCD16](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `COM_BOTH_RECEIVE` | `n` (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](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `COM_RADIO_25_KHZ_TUNABLE` | `b` (BOOL) | Whether the COM radio is tuneable (TRUE , 1) or not (FALSE, 0). | | `COM_RECEIVE` | `b` (BOOL) | Whether the aircraft is receiving on this COM channel (TRUE, 1) or not (FALSE, 0). | | `COM_RECEIVE_EX1` | `b` (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](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `COM_VOLUME` | `n` (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](../../../simvars/simulation-variable-units/#Frequency%20BCD16) encoded. | | `COM1_TRANSMIT_SELECT``COM2_TRANSMIT_SELECT` | `b` (BOOL) | Audio panel COM transmit state, either on (TRUE, 1) or off (FALSE, 0). | {{< /table-wrapper >}} ### DME {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `CURRENT_DME` | `e` (ENUM){{< params/smallfont-list >}}0 = DME11 = DME2{{< /params/smallfont-list >}} | The currently selected {{< glossterm >}}dme{{< /glossterm >}}. | | `CURRENT_DME_DISTANCE` | `n` (FLOAT) | The {{< glossterm >}}dme{{< /glossterm >}} (1 or 2) distance, in {{< glossterm >}}nm{{< /glossterm >}}. | | `CURRENT_DME_SPEED` | `n` (FLOAT) | The {{< glossterm >}}dme{{< /glossterm >}} (1 or 2) speed, in {{< glossterm >}}knots{{< /glossterm >}}. | | `CURRENT_DME_MIN` | `n` (FLOAT) | The {{< glossterm >}}dme{{< /glossterm >}} (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 {{< glossterm >}}dme{{< /glossterm >}} (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 {{< glossterm >}}dme{{< /glossterm >}} (1 or 2) speed readout. | | `DME_SOUND_TOGGLE` | `n` (FLOAT) | Audio panel {{< glossterm >}}dme{{< /glossterm >}} audio state, either on (TRUE, 1) or off (FALSE, 0). | {{< /table-wrapper >}} ### 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 {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `HSI_BEARING` | `n` (FLOAT) | This will return the HSI needle bearing, in degrees. | | `HSI_BEARING_VALID` | `b` (BOOL) | This will be TRUE (1) if the `HSI_BEARING` variable contains valid data, or FALSE (0) otherwise. | | `HSI_DESIRED_HEADING_NEEDLE` | `n` (FLOAT) | The HSI desired heading, in degrees. | | `HSI_DISTANCE` | `n` (FLOAT) | The {{< glossterm >}}dme{{< /glossterm >}}/{{< glossterm >}}GPS{{< /glossterm >}} distance in {{< glossterm >}}nm{{< /glossterm >}}. | | `HSI_HORIZONTAL_NEEDLE` | `n` (FLOAT) | The HSI horizontal needle position between -1 and 1, which corresponds to -0.7º and 0.7º. | | `HSI_HORIZONTAL_VALID` | `b` (BOOL) | Whether the HSI signal is valid (TRUE, 1) or not (FALSE, 0). | | `HSI_OBI_NEEDLE` | `n` (FLOAT) | The OBS needle setting, in degrees. | | `HSI_SIGNAL_LOCALISER` | `b` (BOOL) | Whether the station is a localiser (TRUE, 1) or not (FALSE, 0). | | `HSI_SPEED` | `n` (FLOAT) | The {{< glossterm >}}dme{{< /glossterm >}}/{{< glossterm >}}GPS{{< /glossterm >}} speed, in {{< glossterm >}}knots{{< /glossterm >}}. | | `HSI_STATION_NAME` | `p` (PVOID) | The HSI station name. | | `HSI_TF_FLAG` | `e` (ENUM){{< params/smallfont-list >}}0 = Off1 = TO2 = FROM{{< /params/smallfont-list >}} | The HSI to/from flag setting. | | `HSI_VERTICAL_VALID` | `b` (BOOL) | Whether the NAV flag is on (TRUE, 1) or not (FALSE, 0). | | `HSI_VERTICAL_NEEDLE` | `n` (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 -5{{< glossterm >}}nm{{< /glossterm >}} and 5{{< glossterm >}}nm{{< /glossterm >}} if GPS. | {{< /table-wrapper >}} ### NAV {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `NAV_VOLUME` | `n` (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](../../../simvars/simulation-variable-units/#Frequency%20BCD16) 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](../../../simvars/simulation-variable-units/#Frequency%20BCD16) value. | | `NAV1_VOR_RADIAL``NAV2_VOR_RADIAL` | `n` (FLOAT) | The rdial that the aircraft is on, in radians. | | `TACAN_DRIVES_NAV1` | `b` (BOOL) | Whether the TACAN is driving the Nav 1 indicator (TRUE, 1) or not (FALSE, 0). | {{< /table-wrapper >}} ### Pilot {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `PILOT_TRANSMITTER_TYPE` | `e` (ENUM){{< params/smallfont-list >}}0 = COM11 = COM22 = COM33 = TEL4 = NONE{{< /params/smallfont-list >}} | The channel on which the pilot is transmitting. | | `PILOT_TRANSMITTING` | `b` (BOOL) | Whether the pilot is transmitting (TRUE, 1) or not (FALSE, 0). | {{< /table-wrapper >}} ### Radio {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `RADIO_HEIGHT` | `n` (FLOAT) | The radar altitude, in meters. | | `RADIO_MORSE_IDENT_STATES` | `f` (FLAGS) | The radio morse state, formed using these flags:{{< params/smallfont-list >}}1: VOR1 (Bit 1)2: VOR2 (Bit 2)4: DME1 (Bit 3)8: DME2 (Bit 4)16: ADF (Bit 5){{< /params/smallfont-list >}} | | `RADIO_STACK_VISIBLE` | `b` (BOOL) | Whether the radio stack is visible (TRUE, 1) or not (FALSE, 0). | {{< /table-wrapper >}} ### VOR {{< table-wrapper >}} | Parameters | Universal Var Member | Description | |---|---|---| | `VOR1_BACK_COURSE_FLAGS``VOR2_BACK_COURSE_FLAGS` | `f` (FLAGS) | The status of VOR1/2, comprised from the following:{{< params/smallfont-list >}}BIT0:[index] Back course availableBIT1:[index] Localizer tuned inBIT2:[index] On courseBIT7:[index] Station active{{< /params/smallfont-list >}} | | `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:{{< params/smallfont-list >}}BIT0:[index] 1= DME availableBIT1:[index] 1 = TACAN availableBIT2:[index] 1= voice availableBIT3:[index] 1= no nav signal availableBIT4:[index] 1= DME transmitter at glide slope transmitterBIT5:[index] 1= no localizer backcourseBIT6:[index] 1= glideslope availableBIT7:[index] 0= VOR, 1= Localizer{{< /params/smallfont-list >}} | | `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_RADIO` | `n` (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){{< params/smallfont-list >}}0 = Off1 = To2 = From{{< /params/smallfont-list >}} | The to/from status of VOR1/2. | {{< /table-wrapper >}}