GPS VARIABLES
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:
- Airports
- Nearest Airports
- Intersections
- Nearest Intersections
- NDB
- VOR
- Flightplans
- Miscellaneous
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:
-
Facility Data
In JavaScript, we strongly recommend the MSFS Avionics Framework Planned, or the JS_LISTENER_FACILITY Coherent listener and associated API calls. In WASM, we recommend the SimConnect Facilities API.
-
FlightPlan
In Javascript, we strongly recommend the MSFS Avionics Framework FlightPlanRouteManager, or the JS_LISTENER_PLANNEDROUTE Coherent listener and associated API calls. In WASM, we recommend the Planned Route API.
-
Geographical And Navigational Math
In Javascript, we recommend the MSFS Avionics Framework’s geographical mathematics classes (GeoPoint, GeoCircle, NavMath). In WASM, there are a number of libraries of this type of math available, but we don’t have a specific recommendation amongst them, nor is one included with the SDK.
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
WaypointAirportICAO
WaypointAirportIdent
WaypointAirportKind
WaypointAirportType
WaypointAirportName
WaypointAirportCity
WaypointAirportRegion
WaypointAirportLatitude
WaypointAirportLongitude
WaypointAirportElevation
WaypointAirportFuel1
WaypointAirportBestApproachEnum
WaypointAirportBestApproach
WaypointAirportRadarCoverage
WaypointAirportAirspace
WaypointAirportTowered
WaypointAirportCurrentFrequency
WaypointAirportSelectedFrequencyIndex
WaypointAirportSelectedFrequencyValue
WaypointAirportFrequenciesNumber
WaypointAirportFrequencyName
WaypointAirportFrequencyLimit
WaypointAirportFrequencyValue
WaypointAirportFrequencyType
WaypointAirportCurrentRunway
Airport Runways
WaypointAirportRunwaysNumber
WaypointAirportRunwayLatitude
WaypointAirportRunwayLongitude
WaypointAirportRunwayElevation
WaypointAirportRunwayDirection
WaypointAirportRunwayDesignation
WaypointAirportRunwayLength
WaypointAirportRunwayWidth
WaypointAirportRunwaySurface
WaypointAirportRunwayLighting
WaypointAirportLongestRunwayDirection
Airport Approaches
WaypointAirportCurrentApproach
WaypointAirportSelectedApproach
WaypointAirportApproachesNumber
WaypointAirportApproachName
WaypointAirportApproachGps
WaypointAirportApproachTransitionsNumber
WaypointAirportApproachCurrentTransition
WaypointAirportApproachSelectedTransition
WaypointAirportApproachTransitionName
WaypointAirportApproachTransitionLatitude
WaypointAirportApproachTransitionLongitude
WaypointAirportApproachTransitionSize
WaypointAirportApproachCurrentLeg
WaypointAirportApproachNumberLegs
WaypointAirportApproachCurrentLegIcao
WaypointAirportApproachCurrentLegType
WaypointAirportApproachCurrentLegBearing
WaypointAirportApproachCurrentLegDistance
WaypointAirportApproachCurrentLegIsMinutes
Airport Departures
WaypointAirportDeparturesNumber
WaypointAirportCurrentDeparture
WaypointAirportDepartureName
WaypointAirportDepartureWaypointsNumber
WaypointAirportDepartureCurrentWaypoint
WaypointAirportDepartureWaypointICAO
Airport Arrivals
WaypointAirportArrivalsNumber
WaypointAirportCurrentArrival
WaypointAirportArrivalName
WaypointAirportArrivalWaypointsNumber
WaypointAirportArrivalCurrentWaypoint
WaypointAirportArrivalWaypointICAO
Nearest Airport
NearestAirportSelectedAirportLatitude
NearestAirportSelectedAirportLongitude
NearestAirportCurrentAirportLatitude
NearestAirportCurrentAirportLongitude
NearestAirportMaximumItems
NearestAirportMaximumDistance
NearestAirportItemsNumber
NearestAirportCurrentLine
NearestAirportCurrentICAO
NearestAirportSelectedAirportName
NearestAirportCurrentIdent
NearestAirportSelectedAirportCity
NearestAirportSelectedAirportElevation
NearestAirportSelectedRunway
NearestAirportSelectedFrequencyValue
NearestAirportSelectedFrequencyIndex
NearestAirportCurrentFrequency
NearestAirportCurrentFrequencyName
NearestAirportCurrentFuel1
NearestAirportCurrentTowered
NearestAirportSelectedAirportRunwaysNumber
NearestAirportSelectedRunwayDesignation
NearestAirportSelectedRunwayLength
NearestAirportSelectedRunwayWidth
NearestAirportSelectedRunwaySurface
NearestAirportCurrentAirportKind
NearestAirportCurrentLongestAirportDirection
NearestAirportCurrentDistance
NearestAirportCurrentTrueBearing
NearestAirportCurrentBestApproachEnum
NearestAirportCurrentBestApproach
NearestAirportCurrentComFrequencyName
NearestAirportCurrentComFrequencyValue
NearestAirportCurrentLongestRunwayLength
NearestAirportSelected
NearestAirportSelectedLatitude
NearestAirportSelectedLongitude
NearestAirportSelectedNumberFrequencies
NearestAirportSelectedNumberApproaches
NearestAirportCurrentApproach
NearestAirportCurrentApproachName
NearestAirportSelectedApproachIndex
NearestAirportDeparturesNumber
NearestAirportCurrentDeparture
NearestAirportDepartureName
NearestAirportDepartureWaypointsNumber
NearestAirportDepartureCurrentWaypoint
NearestAirportDepartureWaypointICAO
Intersections
WaypointIntersectionICAO
WaypointIntersectionIdent
WaypointIntersectionCity
WaypointIntersectionRegion
WaypointIntersectionLatitude
WaypointIntersectionLongitude
WaypointIntersectionType
WaypointIntersectionNearestVorIdent
WaypointIntersectionNearestVorFrequency
WaypointIntersectionNearestVorType
WaypointIntersectionNearestVorTrueRadial
WaypointIntersectionNearestVorMagneticRadial
WaypointIntersectionNearestVorDistance
WaypointIntersectionRouteNumber
WaypointIntersectionCurrentRoute
WaypointIntersectionRouteName
WaypointIntersectionRoutePrevIcao
WaypointIntersectionRouteNextIcao
Nearest Intersection
NearestIntersectionCurrentLatitude
NearestIntersectionCurrentLongitude
NearestIntersectionMaximumItems
NearestIntersectionMaximumDistance
NearestIntersectionCurrentFilter
NearestIntersectionAddIntersectionType
NearestIntersectionRemoveIntersectionType
NearestIntersectionSetDefaultFilter
NearestIntersectionItemsNumber
NearestIntersectionCurrentLine
NearestIntersectionCurrentIntersectionLatitude
NearestIntersectionCurrentIntersectionLongitude
NearestIntersectionCurrentICAO
NearestIntersectionCurrentIdent
NearestIntersectionCurrentType
NearestIntersectionCurrentDistance
NearestIntersectionCurrentTrueBearing
NearestIntersectionSelectedIntersection
NearestIntersectionSelectedIntLatitude
NearestIntersectionSelectedIntLongitude
NearestIntersectionSelectedRefVorId
NearestIntersectionSelectedRefVorType
NearestIntersectionSelectedRefVorFrequency
NearestIntersectionSelectedRefVorTrueRadial
NearestIntersectionSelectedRefVorMagneticRadial
NearestIntersectionSelectedRefVorDistance
NearestIntersectionCurrentRouteNumber
NearestIntersectionCurrentCurrentRoute
NearestIntersectionCurrentRouteName
NearestIntersectionCurrentRoutePrevIcao
NearestIntersectionCurrentRouteNextIcao
NDB
WaypointNdbICAO
WaypointNdbIdent
WaypointNdbType
WaypointNdbName
WaypointNdbCity
WaypointNdbRegion
WaypointNdbLatitude
WaypointNdbLongitude
WaypointNdbElevation
WaypointNdbFrequency
WaypointNdbWeatherBroadcast
WaypointNdbMagneticVariation
WaypointNdbNearestAirportId
WaypointNdbNearestAirportLongestRunwayDirection
WaypointNdbNearestAirportKind
WaypointNdbNearestAirportBearing
WaypointNdbNearestAirportDistance
Nearest NDB
NearestNdbCurrentLatitude
NearestNdbCurrentLongitude
NearestNdbMaximumItems
NearestNdbMaximumDistance
NearestNdbItemsNumber
NearestNdbCurrentLine
NearestNdbCurrentNdbLatitude
NearestNdbCurrentNdbLongitude
NearestNdbCurrentICAO
NearestNdbCurrentIdent
NearestNdbCurrentType
NearestNdbCurrentFrequency
NearestNdbCurrentDistance
NearestNdbCurrentTrueBearing
NearestNdbSelectedNdb
NearestNdbSelectedNdbLatitude
NearestNdbSelectedNdbLongitude
NearestNdbSelectedNdbName
NearestNdbSelectedNdbCity
NearestNdbSelectedNdbType
NearestNdbSelectedNdbFrequency
VOR
WaypointVorICAO
WaypointVorIdent
WaypointVorType
WaypointVorClass
WaypointVorName
WaypointVorCity
WaypointVorRegion
WaypointVorLatitude
WaypointVorLongitude
WaypointVorElevation
WaypointVorFrequency
WaypointVorWeatherBroadcast
WaypointVorMagneticVariation
WaypointVorNearestAirportId
WaypointVorNearestAirportLongestRunwayDirection
WaypointVorNearestAirportKind
WaypointVorNearestAirportBearing
WaypointVorNearestAirportDistance
Nearest Vor
NearestVorCurrentLatitude
NearestVorCurrentLongitude
NearestVorMaximumItems
NearestVorMaximumDistance
NearestVorCurrentFilter
NearestVorAddVorType
NearestVorRemoveVorType
NearestVorSetDefaultFilter
NearestVorItemsNumber
NearestVorCurrentLine
NearestVorCurrentVorLatitude
NearestVorCurrentVorLongitude
NearestVorCurrentICAO
NearestVorCurrentIdent
NearestVorCurrentType
NearestVorCurrentFrequency
NearestVorCurrentDistance
NearestVorCurrentTrueBearing
NearestVorSelectedVor
NearestVorSelectedVorLatitude
NearestVorSelectedVorLongitude
NearestVorSelectedVorName
NearestVorSelectedVorCity
NearestVorSelectedVorType
NearestVorSelectedVorFrequency
NearestVorSelectedVorMagneticVariation
Nearest Airspace
NearestAirspaceCurrentLatitude
NearestAirspaceCurrentLongitude
NearestAirspaceCurrentAltitude
NearestAirspaceTrueGroundTrack
NearestAirspaceGroundSpeed
NearestAirspaceNearDistance
NearestAirspaceNearAltitude
NearestAirspaceAheadTime
NearestAirspaceQuery
NearestAirspaceMaximumItems
NearestAirspaceMaximumDistance
NearestAirspaceItemsNumber
NearestAirspaceCurrentLine
NearestAirspaceCurrentName
NearestAirspaceCurrentType
NearestAirspaceCurrentFrequency
NearestAirspaceCurrentFrequencyName
NearestAirspaceCurrentMinAltitude
NearestAirspaceCurrentMaxAltitude
NearestAirspaceCurrentStatus
NearestAirspaceCurrentNearDistance
NearestAirspaceCurrentAheadTime
Messages
MessageItemsNumber
MessageCurrentLine
MessageCurrentType
NewMessagesNumber
NewMessagesConfirm
ICAO Search
IcaoSearchInitialIcao
IcaoSearchStartCursor
IcaoSearchStopCursor
IcaoSearchAdvanceCursor
IcaoSearchAdvanceCharacter
IcaoSearchEnterChar
IcaoSearchBackupChar
IcaoSearchCursorPosition
IcaoSearchCurrentIdent
IcaoSearchCurrentIcao
IcaoSearchCurrentIcaoType
IcaoSearchCurrentIcaoRegion
IcaoSearchMatchedIcaosNumber
IcaoSearchMatchedIcao
Name Search
NameSearchInitialIcao
NameSearchInitialName
NameSearchStartCursor
NameSearchStopCursor
NameSearchAdvanceCursor
NameSearchAdvanceCharacter
NameSearchEnterChar
NameSearchBackupChar
NameSearchCursorPosition
NameSearchCurrentName
NameSearchCurrentMatch
NameSearchCurrentIcao
NameSearchCurrentIcaoType
NameSearchCurrentIcaoRegion
Flightplans
FlightPlanTitle
FlightPlanDescription
FlightPlanIsActiveFlightPlan
FlightPlanIsLoadedApproach
FlightPlanIsActiveApproach
FlightPlanIsActiveWaypoint
FlightPlanIsDirectTo
FlightPlanDirectToWaypoint
FlightPlanActiveWaypoint
FlightPlanActiveApproachWaypoint
FlightPlanIsActiveWaypointLocked
FlightPlanWaypointsNumber
FlightPlanRouteType
FlightPlanFlightPlanType
FlightPlanCruisingAltitude
FlightPlanDirectToDestination
FlightPlanCancelDirectTo
Flightplan Departures
FlightPlanDepartureAirportIdent
FlightPlanDepartureName
FlightPlanDepartureLatitude
FlightPlanDepartureLongitude
FlightPlanDepartureAltitude
Flightplan Destinations
FlightPlanDestinationAirportident
FlightPlanDestinationName
FlightPlanDestinationLatitude
FlightPlanDestinationLongitude
FlightPlanDestinationAltitude
Alternate Flightplan
FlightPlanAlternateAirportIdent
FlightPlanAlternateName
FlightPlanAlternateLatitude
FlightPlanAlternateLongitude
FlightPlanAlternateAltitude
Flightplan Approaches
FlightPlanNewApproachAirport
FlightPlanNewApproachApproach
FlightPlanNewApproachTransition
FlightPlanNewApproachMissed
FlightPlanNewApproachAddInitialLeg
FlightPlanLoadApproach
FlightPlanApproachWaypointType
FlightPlanApproachMode
FlightPlanApproachSegmentType
FlightPlanApproachSegmentDistance
FlightPlanApproachSegmentLength
FlightPlanApproachIsWaypointRunway
FlightPlanApproachAirportIdent
FlightPlanApproachIndex
FlightPlanApproachName
FlightPlanApproachTransitionIndex
FlightPlanApproachTransitionName
FlightPlanIsApproachFinal
FlightPlanIsApproachMissed
FlightPlanActiveApproachWaypoint
FlightPlanApproachWaypointsNumber
FlightPlanApproachType
Flightplan Waypoints
FlightPlanAddWaypoint
FlightPlanDeleteWaypoint
FlightPlanWaypointIndex
FlightPlanWaypointLatitude
FlightPlanWaypointLongitude
FlightPlanWaypointAltitude
FlightPlanWaypointICAO
FlightPlanWaypointIdent
FlightPlanWaypointAirwayIdent
FlightPlanWaypointType
FlightPlanWaypointMinAltitude
FlightPlanWaypointFrequency
FlightPlanWaypointMagneticHeading
FlightPlanWaypointSpeedEstimate
FlightPlanWaypointDistance
FlightPlanWaypointDistanceTotal
FlightPlanWaypointDistanceRemaining
FlightPlanWaypointRemainingDistance
FlightPlanWaypointRemainingTotalDistance
FlightPlanWaypointTimeZoneDeviation
FlightPlanWaypointETE
FlightPlanWaypointATE
FlightPlanWaypointEstimatedTimeRemaining
FlightPlanWaypointETA
FlightPlanWaypointFuelRemainedAtArrival
FlightPlanWaypointEstimatedFuelConsumption
FlightPlanWaypointActualFuelConsumption
Flightplan Approaches
FlightPlanWaypointApproachIndex
FlightPlanWaypointApproachType
FlightPlanWaypointApproachMode
FlightPlanWaypointApproachName
FlightPlanWaypointApproachICAO
FlightPlanWaypointApproachLatitude
FlightPlanWaypointApproachLongitude
FlightPlanWaypointApproachAltitude
FlightPlanWaypointApproachTarget
FlightPlanWaypointApproachLegDistance
FlightPlanWaypointApproachLegTotalDistance
FlightPlanWaypointApproachLegFromDistance
FlightPlanWaypointApproachRemainingDistance
FlightPlanWaypointApproachRemainingTotalDistance
FlightPlanWaypointApproachCourse
New Flightplan
FlightPlanNewWaypointLatitude
FlightPlanNewWaypointLongitude
FlightPlanNewWaypointIdent
FlightPlanNewWaypointICAO
Facilities
FacilityICAO
FacilityCode
FacilityIdent
FacilityValid
FacilityName
FacilityCity
FacilityRegion
FacilityLatitude
FacilityLongitude
FacilityMagneticVariation
Geo Calculations
GeoCalcLatitude1
GeoCalcLongitude1
GeoCalcAzimuth1
GeoCalcLatitude2
GeoCalcLongitude2
GeoCalcAzimuth2
GeoCalcLength
GeoCalcCrossTrack
GeoCalcBearing
GeoCalcDistance
GeoCalcIsIntersect
GeoCalcIntersectionLatitude
GeoCalcIntersectionLatitude
GeoCalcExtrapolationLatitude
GeoCalcExtrapolationLongitude