[][src]Crate adafruit_gps

Adafruit_gps

This is a port from the adafruit python code that reads the output from their GPS systems.

Python code: https://github.com/adafruit/Adafruit_CircuitPython_GPS

GPS module docs: https://learn.adafruit.com/adafruit-ultimate-gps/

PMTK commands https://cdn-shop.adafruit.com/datasheets/PMTK_A11.pdf

Modules

The PMTK module is a way of easily sending command to the GPS, changing it's settings.

The nmea module reads the data given by the GPS. Use the gps.update() trait to get easy to use data, but for specific use cases custom commands can be read.

Hardware specs

Please read the docs for the specific GPS module you are using. Update rate: 1Hz or 10Hz outputs.

Gps struct

port is the open_port option satellite_data -> the individual satellite data from GSA and GSV navigation_data -> the naviagtion data from GGA and VTG

Module Outputs

gps.update() gives the following outputs in the GpsData struct

  • UTC - The UTC time as a f64
  • Latitude - As degrees
  • Longitude - As degrees
  • Altitude - Altitude above Mean Sea Level in metres.
  • True Course - Measured heading, degrees
  • Magnetic Course - Measured heading by magnatic north, degrees
  • Speed (knots)
  • Speed (kph)
  • Geoidal Separation - Difference between WGS-84 earth ellipsoid and mean sea level, basically altitude.
  • Age Diff Corr - Age in seconds since last update from reference station.
  • PDOP - Position DOP
  • HDOP - Horizontal DOP
  • VDOP - Vertical DOP
  • Satellites - As a Vec
    • ID - Satellite id number, 1-32 and 193-195 for QZSS.
    • Elevation - Elevation of the satellite in degrees
    • Azimuth - The degrees from north the satellite is, if it was on the ground.
    • SNR - Signal to Noise ratio: Signal / Noise , 0-99, null if not tracking.

Note: DOP is dilution of precision, a measure of error based on the position of the satellites.

More info on the GPS module at

Modules

PMTK

PMTK commands give the gps module settings for output.

gps

This is the main module around which all other modules interact. It contains the Gps structure, open port and GpsData that are central to using this module.

nmea

NMEA is the sentence format for receiving data from a GPS.