Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
Gps Class Referenceabstract

Common GPS callback interface and NMEA parsers for device-specific drivers. More...

#include <GPS.hpp>

Inheritance diagram for Gps:
CXD5603GFChip EVAM8M MT3339 ORG4400

Public Member Functions

void onReadDone (void(*func)(uint8_t fixQuality, uint8_t hour, uint8_t minute, uint8_t sec, uint16_t subsec, int32_t latitude, int32_t longitude, int32_t altitude, uint8_t numSatellites))
 Register the GGA callback; nullptr disables legacy GGA notifications.
virtual void turnOn ()=0
 Enable reception or device power according to the concrete driver.
virtual void turnOff ()=0
 Disable reception or device power according to the concrete driver.
virtual bool isOn ()=0
 Return the concrete driver's reception or hardware power state.

Public Attributes

void(* onNMEAReceived )(Gps &) = nullptr
 Optional raw-NMEA notification used by MT3339 after receiving VTG. Invoked only when no onReadDone() callback is installed; read cached sentences during the callback because most caches are cleared immediately afterward.

Static Protected Member Functions

static uint8_t ParseGGA (const char *msg, uint8_t *hour, uint8_t *minute, uint8_t *sec, uint16_t *subsec, int32_t *latitude, int32_t *longitude, uint8_t *numSat, char *strHDOP, int32_t *altitude, int32_t *sep, int32_t *diffAge, int32_t *diffStation)
static bool ParseGSA (const char *msg, char *opMode, uint8_t *navMode, float *pdop, float *hdop, float *vdop)
static bool ParseRMC (const char *msg, float *spd, float *cog)

Protected Attributes

void(* callbackRead )(uint8_t fixQuality, uint8_t hour, uint8_t minute, uint8_t sec, uint16_t subsec, int32_t latitude, int32_t longitude, int32_t altitude, uint8_t numSatellites)

Detailed Description

Common GPS callback interface and NMEA parsers for device-specific drivers.

Author
Jongsoo Jeong (CoXlab)
Date
2016. 9. 7.
Examples
feather-m0/UltimateGPS+OLED/main.cpp.

Member Function Documentation

◆ isOn()

virtual bool Gps::isOn ( )
pure virtual

Return the concrete driver's reception or hardware power state.

Implemented in CXD5603GFChip, EVAM8M, MT3339, and ORG4400.

◆ onReadDone()

void Gps::onReadDone ( void(* func )(uint8_t fixQuality, uint8_t hour, uint8_t minute, uint8_t sec, uint16_t subsec, int32_t latitude, int32_t longitude, int32_t altitude, uint8_t numSatellites))

Register the GGA callback; nullptr disables legacy GGA notifications.

Parameters
funcReceives fix quality (0 means invalid), UTC hour/minute/second, the unscaled fractional-second digits, encoded NMEA latitude/longitude, encoded altitude, and satellite count. Coordinates are not decimal degrees: the parser multiplies the degrees-and-minutes integer part by 100000 and adds the raw fractional digits, with negative values for south/west. Altitude similarly uses the integer part times 10 plus the fractional digits. Check fix quality before using position values; fractional fields are not normalized.

◆ ParseGGA()

uint8_t Gps::ParseGGA ( const char * msg,
uint8_t * hour,
uint8_t * minute,
uint8_t * sec,
uint16_t * subsec,
int32_t * latitude,
int32_t * longitude,
uint8_t * numSat,
char * strHDOP,
int32_t * altitude,
int32_t * sep,
int32_t * diffAge,
int32_t * diffStation )
staticprotected
Returns
Fix quality 0: No fix / invalid 1: Standard GPS (2D/3D) 2: Differential GPS 4: RTK fixed solution 5: RTK float solution 6: Estimated (DR) fix

◆ turnOff()

virtual void Gps::turnOff ( )
pure virtual

Disable reception or device power according to the concrete driver.

Implemented in CXD5603GFChip, EVAM8M, MT3339, and ORG4400.

◆ turnOn()

virtual void Gps::turnOn ( )
pure virtual

Enable reception or device power according to the concrete driver.

Implemented in CXD5603GFChip, EVAM8M, MT3339, and ORG4400.


The documentation for this class was generated from the following file: