Skip to content
rico23rico edited this page Jun 29, 2021 · 4 revisions

Possible GPS statuses

Defined in global_constants.lua:

GPS_STATUS_OFF  = 0
GPS_STATUS_FAULT= 1
GPS_STATUS_INIT = 2
GPS_STATUS_ACQ  = 3
GPS_STATUS_NAV  = 4

Statuses "ALTAID" and "TEST" not implemented.

GPS global table

GPS_sys[i] = {
    status = [enum], -- One of the previous constants
    nr_satellites = [int], -- Number of satellites currently locked (<=3 if not NAV, >3 if NAV)
    lat = [float],
    lon = [float],
    alt = [float],  -- In feet
    true_track = [float],
    gs = [float],
    private = {} -- Do not touch
}

Where i == 1 or i == 2. If status ~= GPS_STATUS_NAV, values lat, lon, alt, true_track, and gs must be considered invalid and must not be used.

Clone this wiki locally