Interface to the MTK3339 GPS module

Dependents:   app_gps lpc812_exp_solution_exp-port-gps-lib

Embed: (wiki syntax)

« Back to documentation index

MTK3339 Class Reference

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:
txUART TX line pin
rxUART 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:
tptrpointer to the object to call the member function on
mptrpointer to the member function to be called
maskspecifies which sentence types (NmeaSentence) that are of interest. The member function will only be called for messages specified in this mask.

Definition at line 102 of file MTK3339.h.

void start ( void(*)(void)  fptr,
int  mask 
)

Start to read data from the GPS module.

Parameters:
fptrA pointer to a void function that will be called when there is data available.
maskspecifies 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

GgaType gga

Time, position and fix related data.

Definition at line 134 of file MTK3339.h.

VtgType vtg

Course and speed information relative to ground.

Definition at line 139 of file MTK3339.h.