A class that handles the GPS data.
More...
#include <gps.h>
|
void | initialize () |
|
const GpsData & | getData () const |
| Gets the latest GPS data state. This does not invoke a parse, the parser automatically populates this data. More...
|
|
void | saveToFile (const char *filename) |
| Saves raw NMEA data to a file. More correctly, this saves data read by the UART via the Panda USB interface to file. More...
|
|
void | saveToCsvFile (const char *filename) |
| Saves parsed GPS data to a file in CSV format. This is done after parsing raw NMEA strings. More...
|
|
void | setUsb (Panda::Usb *usbHandler) |
| Sets the USB handler for GPS UART communication. More...
|
|
void | addObserver (GpsListener *listener) |
| Adds and Observer for updates on successful parsed NMEA strings. More...
|
|
bool | isReady () |
| Checks if GPS data is valid, from a GLL status parse. More...
|
|
void | startParsing () |
| Starts a reading and parsing thread. A valid and initialized USB handler is needed to be set for success.
|
|
void | stopParsing () |
| Stops the reading and parsing thread. Called after startParsing() when done with GPS data.
|
|
|
virtual void | entryAction () |
| Called once at the beginning of the thread running. More...
|
|
virtual void | exitAction () |
| Called once when thread is commanded to stop. More...
|
|
void | checkSuspend () |
| Blocks the thread from a pause() call until resume() is called.
|
|
bool | start () |
| Starts the internal thread method. More...
|
|
void | stop () |
| Stops the internal thread method. More...
|
|
void | WaitForInternalThreadToExit () |
| Will wait until the thread has finished.
|
|
int | lock () |
| Performs a mutual exclusion lock. Will halt if locked by another thread, and will resume when the other thread performs an unlock. More...
|
|
int | unlock () |
| Performs a mutual exclusion unlock. Will allow other threads that have been locked to resume. More...
|
|
void | pause () |
| Performs a pause. More...
|
|
void | resume () |
| Resumes the thread from a pause. More...
|
|
bool | running () |
| Returns the state of the thread. More...
|
|
Protected Member Functions inherited from Panda::UsbListener |
virtual void | notificationUartWrite () |
|
virtual void | notificationCanRead (char *buffer, size_t bufferLength) |
|
virtual void | notificationCanWrite () |
|
A class that handles the GPS data.
This class interfaces with a Panda::Usb class to handle the polling of the Grey Panda's internal UART interface for the u-blox M8 GPS module communication.
Adds and Observer for updates on successful parsed NMEA strings.
- Parameters
-
listener | The observer for fresh GPS data. |
const GpsData& Panda::Gps::getData |
( |
| ) |
const |
Gets the latest GPS data state. This does not invoke a parse, the parser automatically populates this data.
- Returns
- The current GPS data.
bool Panda::Gps::isReady |
( |
| ) |
|
Checks if GPS data is valid, from a GLL status parse.
- Returns
- true is ready, flase if not ready.
void Panda::Gps::saveToCsvFile |
( |
const char * |
filename | ) |
|
Saves parsed GPS data to a file in CSV format. This is done after parsing raw NMEA strings.
- Parameters
-
filename | The filename and path for data to be saved. |
void Panda::Gps::saveToFile |
( |
const char * |
filename | ) |
|
Saves raw NMEA data to a file. More correctly, this saves data read by the UART via the Panda USB interface to file.
- Parameters
-
filename | The filename and path for data to be saved. |
void Panda::Gps::setUsb |
( |
Panda::Usb * |
usbHandler | ) |
|
Sets the USB handler for GPS UART communication.
- Parameters
-
usbHandler | The Panda USB handler. |
The documentation for this class was generated from the following file: