nmea_gps: Update to handle parsing into structures

NMEA GPS class now uses threads to handle parsing NMEA sentences.
Currently only handles GGA, GSV, and GLL types.  Added queues for
holding parsed data.

    * Parsing thread
    * Parse GPS Fix from GGA and GLL
    * Parse satellite info from GSV
    * Provide a queue for GPS fix data as well as raw sentences
      (for debugging)
    * Target structures and NMEAGPS class have a __str__() method
      which summarizes the objects into a std::string.  These are
      tied to the __str__ method in python
    * Added google unit test for the above functionality

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2018-05-21 07:35:48 -07:00
parent 1b5087105b
commit 3a077df5f6
8 changed files with 1040 additions and 121 deletions

View File

@ -44,7 +44,7 @@ extern "C" {
* An example using I2C.
* @include nmea_gps_i2c.c
*/
/**
* Device context
*/
@ -53,11 +53,11 @@ extern "C" {
mraa_gpio_context gpio_en;
mraa_i2c_context i2c;
} *nmea_gps_context;
/**
* NMEA_GPS Initializer for generic UART operation
*
* @param uart Specify which uart to use.
* @param uart Specify which mraa uart index to use.
* @param baudrate Specify the baudrate to use. The device defaults
* to 9600 baud.
* @param enable_pin Specify the GPIO pin to use for the enable pin,
@ -67,6 +67,16 @@ extern "C" {
nmea_gps_context nmea_gps_init(unsigned int uart, unsigned int baudrate,
int enable_pin);
/**
* NMEA_GPS Initializer for generic UART operation
*
* @param uart Specify which uart (fs device path) to use.
* @param baudrate Specify the baudrate to use. The device defaults
* to 9600 baud.
* @return an initialized device context on success, NULL on error.
*/
nmea_gps_context nmea_gps_init_raw(const char* uart, unsigned int baudrate);
/**
* NMEA_GPS Initializer for UBLOX I2C operation
*