Public Types |
enum | ppsEdgeType { ppsRise = 0,
ppsFall
} |
| The PPS edge type to interrupt on.
More...
|
enum | Parity |
| A copy of the Serial parity enum.
More...
|
Public Member Functions |
| GPS (PinName tx, PinName rx, const char *name=NULL) |
| GPS constructor.
|
bool | isTimeValid (void) |
| Is the time reported by the GPS valid.
|
int | getGPSquality (void) |
| Is the positional fix reported by the GPS valid.
|
int | numOfSats (void) |
| How many satellites were used in the last fix.
|
double | latitude (void) |
| What was the last reported latitude (in degrees)
|
double | longitude (void) |
| What was the last reported longitude (in degrees)
|
double | altitude (void) |
| What was the last reported altitude (in kilometers)
|
double | height (void) |
| What was the last reported altitude/height (in kilometers)
|
GPS_VTG * | vtg (GPS_VTG *g) |
| Get all vector parameters together.
|
GPS_VTG * | vtg (void) |
| Get all vector parameters together.
|
GPS_Geodetic * | geodetic (GPS_Geodetic *g) |
| Get all three geodetic parameters together.
|
GPS_Geodetic * | geodetic (void) |
| Get all three geodetic parameters together.
|
GPS_Time * | timeNow (GPS_Time *n) |
| Take a snap shot of the current time.
|
GPS_Time * | timeNow (void) |
| Take a snap shot of the current time.
|
double | julianDayNumber (void) |
| Return the curent day.
|
double | julianDate (void) |
| Return the curent date/time as a Julian date.
|
double | siderealDegrees (void) |
| Get the current sidereal degree angle.
|
double | siderealHA (void) |
| Get the current sidereal hour angle.
|
void | ppsAttach (PinName irq, ppsEdgeType type=ppsRise) |
| Optionally, connect a 1PPS single to an Mbed pin.
|
void | ppsUnattach (void) |
| Remove any 1PPS signal previously attached.
|
void | rx_irq (void) |
| GPS serial receive interrupt handler.
|
void | pps_irq (void) |
| GPS pps interrupt handler.
|
void | ticktock (void) |
| 10ms Ticker callback.
|
template<typename T > |
void | attach_pps (T *tptr, void(T::*mptr)(void)) |
| Attach a user object/method callback function to the PPS signal.
|
void | attach_pps (void(*fptr)(void)) |
| Attach a user callback function to the PPS signal.
|
template<typename T > |
void | attach_rmc (T *tptr, void(T::*mptr)(void)) |
| Attach a user callback function to the NMEA RMC message processed signal.
|
void | attach_rmc (void(*fptr)(void)) |
| Attach a user callback function to the NMEA RMC message processed signal.
|
template<typename T > |
void | attach_gga (T *tptr, void(T::*mptr)(void)) |
| Attach a user callback function to the NMEA GGA message processed signal.
|
void | attach_gga (void(*fptr)(void)) |
| Attach a user callback function to the NMEA GGA message processed signal.
|
template<typename T > |
void | attach_vtg (T *tptr, void(T::*mptr)(void)) |
| Attach a user callback function to the NMEA VTG message processed signal.
|
void | attach_vtg (void(*fptr)(void)) |
| Attach a user callback function to the NMEA VTG message processed signal.
|
template<typename T > |
void | attach_ukn (T *tptr, void(T::*mptr)(void)) |
| Attach a user callback function to the unknown NMEA message.
|
void | attach_ukn (void(*fptr)(void)) |
| Attach a user callback function to the unknown NMEA message.
|
char * | setGga (char *s) |
| Set's the GGA string memory pointer.
|
char * | setRmc (char *s) |
| Set's the RMC string memory pointer.
|
char * | setVtg (char *s) |
| Set's the VTG string memory pointer.
|
char * | setUkn (char *s) |
| Set's the UKN string memory pointer.
|
void | baud (int baudrate) |
| Set the baud rate the GPS module is using.
|
void | format (int bits, Parity parity, int stop_bits) |
| Set the serial port format the GPS module is using.
|
void | NmeaOnUart0 (bool b) |
| Send incoming GPS bytes to Uart0.
|
Data Fields |
void * | _base |
| A pointer to the UART peripheral base address being used.
|
char | buffer [2][GPS_BUFFER_LEN] |
| The RX serial buffer.
|
int | active_buffer |
| The current "active" buffer, i.e. the buffer the ISR is writing to.
|
int | rx_buffer_in |
| The active buffer "in" pointer.
|
bool | process_required |
| Boolean flag set when the "passive" buffer is full and needs processing.
|
FunctionPointer | cb_pps |
| A callback object for the 1PPS user API.
|
FunctionPointer | cb_rmc |
| A callback object for the NMEA RMS message processed signal user API.
|
FunctionPointer | cb_gga |
| A callback object for the NMEA GGA message processed signal user API.
|
FunctionPointer | cb_vtg |
| A callback object for the NMEA RMS message processed signal user API.
|
FunctionPointer | cb_ukn |
| A callback object for the NMEA RMS message processed signal user API.
|
Protected Attributes |
bool | _ppsInUse |
| Flag set true when a GPS PPS has been attached to a pin.
|
InterruptIn * | _pps |
| An InterruptIn object to "trigger" on the PPS edge.
|
Ticker * | _second100 |
| A Ticker object called every 10ms.
|
GPS_Time | theTime |
| A GPS_Time object used to hold the last parsed time/date data.
|
GPS_Geodetic | thePlace |
| A GPS_Geodetic object used to hold the last parsed positional data.
|
GPS_VTG | theVTG |
| A GPS_VTG object used to hold vector data.
|
char | _lastByte |
| Used to record the previous byte received.
|
bool | _nmeaOnUart0 |
| Used for debugging.
|