Weather Station using an mBed microcontroller and a Windows CE Device

Dependencies:   TextLCD mbed HMC6352

Embed: (wiki syntax)

« Back to documentation index

GPS Class Reference

GPS Class Reference

A GPS interface for reading from a Globalsat EM-406 GPS Module. More...

#include <GPS.h>

Public Member Functions

 GPS (PinName tx, PinName rx)
 Create the GPS interface, connected to the specified serial port.
int sample ()
 Sample the incoming GPS data, returning whether there is a lock.

Data Fields

float longitude
 The longitude (call sample() to set)
float latitude
 The latitude (call sample() to set)
int lock
 Create a value for gps lock/unlocked.
float altitude
 Altitude of Sensor from Sea Level.
int numSat
 Number of Satillites.
float horDil
 Horizontal Dilution.
float GPStime
 Time.
int GPSdate
 Date.

Detailed Description

A GPS interface for reading from a Globalsat EM-406 GPS Module.

Definition at line 29 of file GPS.h.


Constructor & Destructor Documentation

GPS ( PinName  tx,
PinName  rx 
)

Create the GPS interface, connected to the specified serial port.

Definition at line 26 of file GPS.cpp.


Member Function Documentation

int sample (  )

Sample the incoming GPS data, returning whether there is a lock.

Returns:
1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0

Definition at line 32 of file GPS.cpp.


Field Documentation

float altitude

Altitude of Sensor from Sea Level.

Definition at line 52 of file GPS.h.

int GPSdate

Date.

Definition at line 64 of file GPS.h.

float GPStime

Time.

Definition at line 61 of file GPS.h.

float horDil

Horizontal Dilution.

Definition at line 58 of file GPS.h.

float latitude

The latitude (call sample() to set)

Definition at line 46 of file GPS.h.

int lock

Create a value for gps lock/unlocked.

Definition at line 49 of file GPS.h.

float longitude

The longitude (call sample() to set)

Definition at line 43 of file GPS.h.

int numSat

Number of Satillites.

Definition at line 55 of file GPS.h.