Interface to the MTK3339 GPS module
Dependents: app_gps lpc812_exp_solution_exp-port-gps-lib
MTK3339 Class Reference
An interface to the MTK3339 GPS module. More...
#include <MTK3339.h>
Public Member Functions | |
MTK3339 (PinName tx, PinName rx) | |
Create an interface to the MTK3339 GPS module. | |
void | start (void(*fptr)(void), int mask) |
Start to read data from the GPS module. | |
template<typename T > | |
void | start (T *tptr, void(T::*mptr)(void), int mask) |
Start to read data from the GPS module. | |
void | stop () |
Stop to read data from GPS module. | |
NmeaSentence | getAvailableDataType () |
Get the type of the data reported in available data callback. | |
double | getLatitudeAsDegrees () |
Get latitude in degrees (decimal format) | |
double | getLongitudeAsDegrees () |
Get longitude in degrees (decimal format) | |
Data Fields | |
GgaType | gga |
Time, position and fix related data. | |
VtgType | vtg |
Course and speed information relative to ground. |
Detailed Description
An interface to the MTK3339 GPS module.
Definition at line 7 of file MTK3339.h.
Constructor & Destructor Documentation
MTK3339 | ( | PinName | tx, |
PinName | rx | ||
) |
Create an interface to the MTK3339 GPS module.
- Parameters:
-
tx UART TX line pin rx UART RX line pin
Definition at line 6 of file MTK3339.cpp.
Member Function Documentation
MTK3339::NmeaSentence getAvailableDataType | ( | ) |
Get the type of the data reported in available data callback.
This method will only return a valid type when called within the callback.
Definition at line 30 of file MTK3339.cpp.
double getLatitudeAsDegrees | ( | ) |
Get latitude in degrees (decimal format)
Definition at line 34 of file MTK3339.cpp.
double getLongitudeAsDegrees | ( | ) |
Get longitude in degrees (decimal format)
Definition at line 51 of file MTK3339.cpp.
void start | ( | T * | tptr, |
void(T::*)(void) | mptr, | ||
int | mask | ||
) |
Start to read data from the GPS module.
- Parameters:
-
tptr pointer to the object to call the member function on mptr pointer to the member function to be called mask specifies which sentence types (NmeaSentence) that are of interest. The member function will only be called for messages specified in this mask.
void start | ( | void(*)(void) | fptr, |
int | mask | ||
) |
Start to read data from the GPS module.
- Parameters:
-
fptr A pointer to a void function that will be called when there is data available. mask specifies which sentence types (NmeaSentence) that are of interest. The callback function will only be called for messages specified in this mask.
Definition at line 16 of file MTK3339.cpp.
void stop | ( | ) |
Stop to read data from GPS module.
Definition at line 24 of file MTK3339.cpp.
Field Documentation
Generated on Tue Jul 12 2022 23:30:58 by
