On this page
- GPS Vars In MSFS 2024
- GPSVar Index
- 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
- Nearest Airspace
- Nearest Intersections
- Nearest NDB
- Nearest VOR
- New Waypoint
- VOR
- Waypoint
- Waypoint Approach
GPS Variables (Legacy)
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:
Facility Data
In JavaScript, we strongly recommend the MSFS Avionics Framework Facility Loader(opens in a new tab), or the
JS_LISTENER_FACILITYCoherent 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_PLANNEDROUTECoherent 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(opens in a new tab), GeoCircle(opens in a new tab), NavMath(opens in a new tab)). 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
WaypointAirportCurrentFrequency
WaypointAirportFrequenciesNumber
WaypointAirportLongestRunwayDirection
WaypointAirportSelectedFrequencyIndex
Airport Approaches
WaypointAirportApproachCurrentLeg
WaypointAirportApproachCurrentLegBearing
WaypointAirportApproachCurrentLegDistance
WaypointAirportApproachCurrentLegIcao
WaypointAirportApproachCurrentLegIsMinutes
WaypointAirportApproachCurrentLegType
WaypointAirportApproachCurrentTransition
WaypointAirportApproachesNumber
WaypointAirportApproachNumberLegs
WaypointAirportApproachSelectedTransition
WaypointAirportApproachTransitionLatitude
WaypointAirportApproachTransitionLongitude
WaypointAirportApproachTransitionName
WaypointAirportApproachTransitionSize
WaypointAirportApproachTransitionsNumber
WaypointAirportBestApproachEnum
Airport Arrivals
WaypointAirportArrivalCurrentWaypoint
WaypointAirportArrivalWaypointICAO
Airport Departures
WaypointAirportCurrentDeparture
WaypointAirportDepartureCurrentWaypoint
WaypointAirportDeparturesNumber
Airport Runways
WaypointAirportRunwayDesignation
WaypointAirportRunwayDirection
WaypointAirportRunwayElevation
Alternate
Approach
FlightPlanActiveApproachWaypoint
FlightPlanApproachAirportIdent
FlightPlanApproachIsWaypointRunway
FlightPlanApproachSegmentDistance
FlightPlanApproachSegmentLength
FlightPlanApproachTransitionIndex
FlightPlanApproachTransitionName
FlightPlanApproachWaypointsNumber
FlightPlanApproachWaypointType
Departure
Destination
Facilities
General
Geo Calculations
ICAO Search Data
Intersections
WaypointIntersectionCurrentRoute
WaypointIntersectionNearestVorDistance
WaypointIntersectionNearestVorFrequency
WaypointIntersectionNearestVorIdent
WaypointIntersectionNearestVorMagneticRadial
WaypointIntersectionNearestVorTrueRadial
WaypointIntersectionNearestVorType
WaypointIntersectionRouteNextIcao
WaypointIntersectionRouteNumber
Messages
Name Search Data
NDB
WaypointNdbNearestAirportBearing
WaypointNdbNearestAirportDistance
Nearest Airports
NearestAirportCurrentAirportKind
NearestAirportCurrentAirportLatitude
NearestAirportCurrentAirportLongitude
NearestAirportCurrentApproachName
NearestAirportCurrentBestApproach
NearestAirportCurrentBestApproachEnum
NearestAirportCurrentComFrequencyName
NearestAirportCurrentComFrequencyValue
NearestAirportCurrentDeparture
NearestAirportCurrentFrequency
NearestAirportCurrentFrequencyName
NearestAirportCurrentLongestAirportDirection
NearestAirportCurrentLongestRunwayLength
NearestAirportCurrentTrueBearing
NearestAirportDepartureCurrentWaypoint
NearestAirportDeparturesNumber
NearestAirportDepartureWaypointICAO
NearestAirportDepartureWaypointsNumber
NearestAirportSelectedAirportCity
NearestAirportSelectedAirportElevation
NearestAirportSelectedAirportLatitude
NearestAirportSelectedAirportLongitude
NearestAirportSelectedAirportName
NearestAirportSelectedAirportRunwaysNumber
NearestAirportSelectedApproachIndex
NearestAirportSelectedFrequencyIndex
NearestAirportSelectedFrequencyValue
NearestAirportSelectedLatitude
NearestAirportSelectedLongitude
NearestAirportSelectedNumberApproaches
NearestAirportSelectedNumberFrequencies
NearestAirportSelectedRunwayDesignation
NearestAirportSelectedRunwayLength
Nearest Airspace
NearestAirspaceCurrentAheadTime
NearestAirspaceCurrentAltitude
NearestAirspaceCurrentFrequency
NearestAirspaceCurrentFrequencyName
NearestAirspaceCurrentLatitude
NearestAirspaceCurrentLongitude
NearestAirspaceCurrentMaxAltitude
NearestAirspaceCurrentMinAltitude
NearestAirspaceCurrentNearDistance
Nearest Intersections
NearestIntersectionAddIntersectionType
NearestIntersectionCurrentCurrentRoute
NearestIntersectionCurrentDistance
NearestIntersectionCurrentFilter
NearestIntersectionCurrentICAO
NearestIntersectionCurrentIdent
NearestIntersectionCurrentIntersectionLatitude
NearestIntersectionCurrentIntersectionLongitude
NearestIntersectionCurrentLatitude
NearestIntersectionCurrentLine
NearestIntersectionCurrentLongitude
NearestIntersectionCurrentRouteName
NearestIntersectionCurrentRouteNextIcao
NearestIntersectionCurrentRouteNumber
NearestIntersectionCurrentRoutePrevIcao
NearestIntersectionCurrentTrueBearing
NearestIntersectionCurrentType
NearestIntersectionItemsNumber
NearestIntersectionMaximumDistance
NearestIntersectionMaximumItems
NearestIntersectionRemoveIntersectionType
NearestIntersectionSelectedIntersection
NearestIntersectionSelectedIntLatitude
NearestIntersectionSelectedIntLongitude
NearestIntersectionSelectedRefVorDistance
NearestIntersectionSelectedRefVorFrequency
NearestIntersectionSelectedRefVorId
NearestIntersectionSelectedRefVorMagneticRadial
NearestIntersectionSelectedRefVorTrueRadial
Nearest NDB
Nearest VOR
New Waypoint
VOR
WaypointVorNearestAirportBearing
WaypointVorNearestAirportDistance
Waypoint
FlightPlanWaypointActualFuelConsumption
FlightPlanWaypointDistanceRemaining
FlightPlanWaypointDistanceTotal
FlightPlanWaypointEstimatedFuelConsumption
FlightPlanWaypointEstimatedTimeRemaining
FlightPlanWaypointFuelRemainedAtArrival
FlightPlanWaypointMagneticHeading
FlightPlanWaypointRemainingDistance
FlightPlanWaypointRemainingTotalDistance
FlightPlanWaypointSpeedEstimate
Waypoint Approach
FlightPlanWaypointApproachAltitude
FlightPlanWaypointApproachCourse
FlightPlanWaypointApproachICAO
FlightPlanWaypointApproachIndex
FlightPlanWaypointApproachLatitude
FlightPlanWaypointApproachLegDistance
FlightPlanWaypointApproachLegFromDistance
FlightPlanWaypointApproachLegTotalDistance
FlightPlanWaypointApproachLongitude
FlightPlanWaypointApproachMode
FlightPlanWaypointApproachName
FlightPlanWaypointApproachRemainingDistance
FlightPlanWaypointApproachRemainingTotalDistance