GPS Functions

The GPS functions are used to return data from a serial communications channel opened as GPS. The function GPS(VALID) should be checked before any of these functions are used to ensure that the returned value is valid.

Position Functions

GPS(LATITUDE)

Returns the latitude in degrees as a floating point number, values are negative for South of equator

GPS(LONGITUDE)

Returns the longitude in degrees as a floating point number, values are negative for West of the meridian.

GPS(ALTITUDE)

Returns current altitude (if sentence GGA is enabled).

Time Functions

GPS(DATE)

Returns the normal date string corrected for local time eg, "12-01-2020".

GPS(TIME)

Returns the normal time string corrected for local time eg, "12:09:33".

GPS(SPEED)

Returns the ground speed in knots as a floating point number.

GPS(TRACK)

Returns the track over the ground (degrees true) as a floating point number.

Quality and Accuracy Functions

GPS(FIX)

Returns non zero (true) if the GPS has a fix on sufficient satellites and is producing valid data.

GPS(SATELLITES)

Returns number of satellites in view (if sentence GGA is enabled).

GPS(DOP)

Returns DOP (dilution of precision) value (if sentence GGA is enabled).

GPS(GEOID)

Returns the geoid-ellipsoid separation (if sentence GGA is enabled).

Status Functions

GPS(VALID)

Returns: 0=invalid data, 1=valid data