IMPORTANT!
FS9GPS variables are deprecated in Microsoft Flight Simulator 2024. The variables will still work as they did in MSFS 2020 but all support is discontinued. Since WASM modules now run on their own thread, you may encounter data consistency issues or crashes using these from WASM modules. See GPS Variables In MSFS 2024 for more information.

GPSVars are variables that third party APIs and add-ons can use to get information about the position in the world of any number of things, like an airport, a waypoint, etc… as well as a number of other pieces of data used when querying or creating flight plans. These variables can be accessed using the Reverse Polish Notation C: variable type, along with the fs9gps module name, for example:

Get: (C:fs9gps:Variable Name , Units)
Set: (>C:fs9gps:Variable Name , Units)

Within the JavaScript API, these are retrieved like SimVars using:

GetSimVarValue(name, unit, dataSource = "")

You can find detailed information about each particular GPS Var on the following pages:

GPS Vars In MSFS 2024

Due to the threading model of Microsoft Flight Simulator 2024, it can cause changes in cycle wait times from one variable query to the next, something that was never possible in previous versions of the simulation. Therefor you must take great care to leave enough wait time in the consuming code to account for this possibility.

The flight plan FS9GPS variables do not always fully interact with the rest of the current flight plan related systems in the simulator (eg: ATC, World Map, EFB, Career, etc…). When reading or writing the flight plan using these legacy variables, you may find unexpected data or behavior regarding those systems.

If you have to use these variables for legacy maintenance reasons, do not, under any circumstances, write to the flight plan from JavaScript using these variables, as it is guaranteed to result in eventual data corruption and/or crashes.

It is therefor strongly recommend that you switch to equivalent APIs from one of the modern and current API’s available:

GPSVar Index

Below you can find indexed all the SimVars available, presented this way to facilitate finding the required variable at a glance or through the search system:

Airports

Airport Approaches

Airport Arrivals

Airport Departures

Airport Runways

Alternate

Approach

Departure

Destination

Facilities

General

Geo Calculations

ICAO Search Data

Intersections

Messages

Name Search Data

NDB

Nearest Airports

NearestAirportCurrentAirportKind

NearestAirportCurrentAirportLatitude

NearestAirportCurrentAirportLongitude

NearestAirportCurrentApproach

NearestAirportCurrentApproachName

NearestAirportCurrentBestApproach

NearestAirportCurrentBestApproachEnum

NearestAirportCurrentComFrequencyName

NearestAirportCurrentComFrequencyValue

NearestAirportCurrentDeparture

NearestAirportCurrentDistance

NearestAirportCurrentFrequency

NearestAirportCurrentFrequencyName

NearestAirportCurrentFuel1

NearestAirportCurrentFuel2

NearestAirportCurrentICAO

NearestAirportCurrentIdent

NearestAirportCurrentLine

NearestAirportCurrentLongestAirportDirection

NearestAirportCurrentLongestRunwayLength

NearestAirportCurrentTowered

NearestAirportCurrentTrueBearing

NearestAirportDepartureCurrentWaypoint

NearestAirportDepartureName

NearestAirportDeparturesNumber

NearestAirportDepartureWaypointICAO

NearestAirportDepartureWaypointsNumber

NearestAirportItemsNumber

NearestAirportMaximumDistance

NearestAirportMaximumItems

NearestAirportSelected

NearestAirportSelectedAirportCity

NearestAirportSelectedAirportElevation

NearestAirportSelectedAirportLatitude

NearestAirportSelectedAirportLongitude

NearestAirportSelectedAirportName

NearestAirportSelectedAirportRunwaysNumber

NearestAirportSelectedApproachIndex

NearestAirportSelectedFrequencyIndex

NearestAirportSelectedFrequencyValue

NearestAirportSelectedLatitude

NearestAirportSelectedLongitude

NearestAirportSelectedNumberApproaches

NearestAirportSelectedNumberFrequencies

NearestAirportSelectedRunway

NearestAirportSelectedRunwayDesignation

NearestAirportSelectedRunwayLength

NearestAirportSelectedRunwaySurface

NearestAirportSelectedRunwayWidth

Nearest Airspace

Nearest Intersections

Nearest NDB

Nearest VOR

New Waypoint

VOR

Waypoint

Waypoint Approach