GPS/GNSS

GPS/GNSS Overview

The Global Positioning System, GPS, is a satellite-based navigation system operated by the U.S. Department of Defense that provides location information. GPS was originally intended for US military applications, but in the 1980s, the government made the system available for civilian use. As GPS has become a vital global utility, other countries and international organizations are starting to launch similar satellite systems. Collectively, these systems are referred to as Global Navigation Satellite System or GNSS. Examples of other GNSS are the Russian GLONASS, European Union GALILEO and Chinese Beidou. As these systems become fully functional, many GNSS receiver manufacturers are releasing devices that leverage multiple GNSS to increase the number of visible satellites for more accurate and reliable positioning.

GPS/GNSS works on the basis of trilateration. Each satellite in a system continuously transmits messages that include the time the message was sent, precise orbital information and the orbits of all satellites in the system (the almanac). A GPS/GNSS receiver calculates its position by precisely timing these messages from at least four satellites.

GPS/GNSS Communication Protocol: NMEA

Position information from GPS/GNSS receivers can be obtained in many different formats. One of the most commonly supported protocols is National Marine Electronics Association 0183 standard, frequently referred to as NMEA. NMEA is an electrical and data specification for communication between marine electronic devices including GPS/GNSS receivers. It uses ASCII text in a sentence format to transmit data from one talker to multiple listeners at the same time. The standard also defines the format of individual sentences. For serial communication, NMEA specifies an interface speed of 4800 baud (38400 baud for the high speed specification) with 8 bits of data, no parity, and one stop bit. It is important to note that while many GPS/GNSS receivers adhere to specification, not all do. It is important to consult the receiver manufacturers documentation to understand your device.

NMEA Sentences

Generally, NMEA 0183 sentences have the following structure:

  1. Start of the sentence, denoted by a "$".
  2. A five character address field consisting of:
    1. A two character talker identifier. For GPS/GNSS sentences, the talker identifier generally includes: GP for GPS information; GL for GLONASS information; and GN for mixed GPS and GLONASS information.
    2. A three character sentence formatter.
  3. One or more data fields separated by commas.
  4. A checksum delimiter and value.
  5. Sentence terminators (carriage return and line feed).

The GPS/GNSS library supports five standard NMEA 0183 sentence formatters:

  • GGA: Global Positioning System Fix Data
  • GSA: GNSS Dilution of Precision (DOP) and Active Satellites
  • GSV: GNSS Satellites in View
  • RMC: Recommended Minimum Specific GNSS Data
  • VTG: Course Over Ground and Ground Speed

Connecting to a GPS/GNSS Receiver

For the GPS/GNSS library to use a GPS/GNSS receiver there needs to be a serial port, physical or virtual, for the library to connect to. This connection can be established in many different ways and will vary from device to device, however it will generally be one of the following:

Consult your receiver manufacturer's documentation to understand your device.

In addition to supporting a connection to a receiver the library supports playback of NMEA sentences stored in an ASCII text file for testing and demonstration.

1/27/2015