Skip to content

Latest commit

 

History

History
229 lines (222 loc) · 5.75 KB

Choosing.md

File metadata and controls

229 lines (222 loc) · 5.75 KB

Choosing your configuration

There are only a few configurations provided by examples. If your application needs something slightly different, here is a general configuration process.

What number do you want?

First, decide which data members of gps_fix and NMEAGPS you need (see [Data Model](Data Model.md) for member descriptions). Those members must be enabled in GPSfix_cfg.h.

Next, figure out what messages can fill out those members, because those messages must be enabled in NMEAGPS_cfg.h. Here is a table of the NMEA messages parsed by NeoGPS, and which data members they affect:

Message

Data Member

GGA


GLL


GSA


GST


GSV


RMC


VTG


ZDA


PUBX
001


PUBX
041


class gps_fix

status

* * * * * *

date2

* * *

time2

* * * * * * *

lat/lon

* * * *

altitude

* *

speed

* * *

heading

* * *

lat, lon, alt error

*

satellites

* * *

HDOP

* * *

VDOP

* *

PDOP

*

TDOP

*

class NMEAGPS

satellite IDs

* *

satellite azimuth,
  elevation and
  signal strength

*

This table illustrates the poor design of the NMEA message set: it requires multiple messages to deliver a complete fix (i.e., all members of gps_fix). This also explains why many manufacturers provide proprietary messages that are more complete. Above, you can see that the $PUBX,001 message contains all members except date.

While the manufacturer's specification will document all sentences supported for your device, you can also find general descriptions of many NMEA sentences here, here or here.


1 The NMEA proprietary messages "PUBX" are only availble in the `ubloxNMEA` class. See [ublox-specific](ublox.md) instructions for adding this class to your configuration.

2 Date and time are both stored in one member of gps_fix, called dateTime. The fix.dateTime member is a C++ class that has both date-oriented members (Date, Month and Year) and time-oriented members (Hours, Minutes and Seconds). See NeoTime.h for the complete description and capabilities of the dateTime member, such as date/time arithmetic and conversion to/from seconds since the epoch. Hundredths of a second are stored in a separate member of gps_fix, called dateTime_cs, and can also be accessed with the functions dateTime_ms() and dateTime_us().