WaspGPS.h File Reference

Library for managing the GPS A1084 receiver. More...

#include <inttypes.h>

Include dependency graph for WaspGPS.h:

Go to the source code of this file.

Data Structures

class  WaspGPS
 WaspGPS Class. More...

Defines

#define VERSION   "WaspGPS 01c, (c) 2009 A.Bielsa for Libelium.com\n"
 Version Control.
#define GPS_BINARY   1
 Enables binary mode.
#define GPS_NMEA_GGA   2
 Enables NMEA -> GGA sentences.
#define GPS_NMEA_GLL   4
 Enables NMEA -> GLL sentences.
#define GPS_NMEA_GSA   8
 Enables NMEA -> GSA sentences.
#define GPS_NMEA_GSV   16
 Enables NMEA -> GSV sentences.
#define GPS_NMEA_RMC   32
 Enables NMEA -> RMC sentences.
#define GPS_NMEA_VTG   64
 Enables NMEA -> VTG sentences.
#define GPS_NMEA   128
 Enables NMEA -> All sentences.
#define GPS_BINARY_OFF   256
 In binary mode, set GPS module in request mode.
#define GPS_ON   0
 GPS power mode: ON.
#define GPS_OFF   1
 GPS power mode: OFF.
#define HOT   0
 GPS waking up mode: HOT.
#define WARM   1
 GPS waking up mode: WARM.
#define COLD   2
 GPS waking up mode: COLD.
#define ACK   0
 Flag value.
#define GPS_TIMEOUT   1
 Flag value.
#define GPS_INVALID   2
 Flag value.
#define GPS_ERROR_EPHEMERIS   4
 Flag value.
#define GPS_ERROR_SAVE_EPHEMERIS   8
 Flag value.
#define GPS_DATA_ERROR   16
 Flag value.
#define GPS_BAD_SENTENCE   32
 Flag value.
#define GPS_BAD_CHECKSUM   64
 Flag value.
#define GPS_ERROR_FILE_EPHEMERIS   128
 Flag value.
#define GPS_FILE_EPHEMERIS_EMPTY   256
 Flag value.
#define GPS_TIMEOUT_em   "error: the GPS timed out"
 Error message for flag.
#define GPS_ERROR_EPHEMERIS_em   "error: couldn't get ephemeris"
 Error message for flag.
#define GPS_ERROR_SAVE_EPHEMERIS_em   "error: couldn't save ephemeris to SD"
 Error message for flag.
#define GPS_CREATE_FILE_EPHEMERIS_em   "error: couldn't create ephemeris file"
 Error message for flag.
#define GPS_DATA_ERROR_em   "error: data not consistent"
 Error message for flag.
#define GPS_BAD_SENTENCE_em   "error: different sentence than expected"
 Error message for flag.
#define ATTEMPTS_TO_READ   5
 Values for timings, etc.
#define FILE_EPHEMERIS   "ephemeris.txt"
 File used to save and load ephemeris.

Variables

WaspGPS GPS


Detailed Description

Library for managing the GPS A1084 receiver.

Copyright (C) 2009 Libelium Comunicaciones Distribuidas S.L. http://www.libelium.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Version: 0.6

Design: David Gascón

Implementation: Alberto Bielsa, David Cuartielles, Mikal Hart

Definition in file WaspGPS.h.


Define Documentation

#define ACK   0

Flag value.

Initial value for 'flag'.

Definition at line 222 of file WaspGPS.h.

Referenced by WaspGPS::WaspGPS().

#define ATTEMPTS_TO_READ   5

Values for timings, etc.

Definition at line 276 of file WaspGPS.h.

#define COLD   2

GPS waking up mode: COLD.

Using COLD makes GPS module to restart on a cold one deleting all the previously stored information.

Definition at line 168 of file WaspGPS.h.

Referenced by WaspGPS::close(), and WaspGPS::WaspGPS().

#define FILE_EPHEMERIS   "ephemeris.txt"

File used to save and load ephemeris.

"ephemeris.txt"

Definition at line 283 of file WaspGPS.h.

Referenced by WaspGPS::loadEphems(), and WaspGPS::saveEphems().

#define GPS_BAD_CHECKSUM   64

Flag value.

Error, data corrupted in some mysterious way.

Definition at line 229 of file WaspGPS.h.

Referenced by WaspGPS::checkSum().

#define GPS_BAD_SENTENCE   32

Flag value.

Error, arrival of different sentence than expected.

Definition at line 228 of file WaspGPS.h.

#define GPS_BAD_SENTENCE_em   "error: different sentence than expected"

Error message for flag.

String error --> "error: different sentence than expected"

Definition at line 269 of file WaspGPS.h.

#define GPS_BINARY   1

Enables binary mode.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option Binary Mode is enabled.

Definition at line 120 of file WaspGPS.h.

Referenced by WaspGPS::check(), WaspGPS::extractDate(), WaspGPS::extractTime(), WaspGPS::getAltitude(), WaspGPS::getCourse(), WaspGPS::getLatitude(), WaspGPS::getLongitude(), WaspGPS::getPosition(), WaspGPS::getSpeed(), WaspGPS::init(), and WaspGPS::setCommMode().

#define GPS_BINARY_OFF   256

In binary mode, set GPS module in request mode.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, GPS module stops sending binary automatic responses. It will send binary commands only when we ask him.

Definition at line 128 of file WaspGPS.h.

Referenced by WaspGPS::check(), WaspGPS::extractDate(), WaspGPS::extractTime(), WaspGPS::getAltitude(), WaspGPS::getCourse(), WaspGPS::getLatitude(), WaspGPS::getLongitude(), WaspGPS::getPosition(), WaspGPS::getSpeed(), WaspGPS::init(), WaspGPS::loadEphems(), WaspGPS::saveEphems(), and WaspGPS::setCommMode().

#define GPS_CREATE_FILE_EPHEMERIS_em   "error: couldn't create ephemeris file"

Error message for flag.

String error --> "error: couldn't create ephemeris file"

Definition at line 267 of file WaspGPS.h.

#define GPS_DATA_ERROR   16

Flag value.

Error while parsing e.g. the amount of satellites.

Definition at line 227 of file WaspGPS.h.

#define GPS_DATA_ERROR_em   "error: data not consistent"

Error message for flag.

String error --> "error: data not consistent"

Definition at line 268 of file WaspGPS.h.

#define GPS_ERROR_EPHEMERIS   4

Flag value.

Error trying to get an ephemeris string.

Definition at line 225 of file WaspGPS.h.

#define GPS_ERROR_EPHEMERIS_em   "error: couldn't get ephemeris"

Error message for flag.

String error --> "error: couldn't get ephemeris"

Definition at line 265 of file WaspGPS.h.

#define GPS_ERROR_FILE_EPHEMERIS   128

Flag value.

Error, couldn't use the ephemeris file.

Definition at line 230 of file WaspGPS.h.

#define GPS_ERROR_SAVE_EPHEMERIS   8

Flag value.

Error trying to save an ephemeris string.

Definition at line 226 of file WaspGPS.h.

#define GPS_ERROR_SAVE_EPHEMERIS_em   "error: couldn't save ephemeris to SD"

Error message for flag.

String error --> "error: couldn't save ephemeris to SD"

Definition at line 266 of file WaspGPS.h.

#define GPS_FILE_EPHEMERIS_EMPTY   256

Flag value.

Warning, ephemeris file is empty.

Definition at line 231 of file WaspGPS.h.

#define GPS_INVALID   2

Flag value.

The reading was not valid, satellite data isn't good enough.

Definition at line 224 of file WaspGPS.h.

Referenced by WaspGPS::extractDate(), WaspGPS::extractTime(), WaspGPS::getAltitude(), WaspGPS::getCourse(), WaspGPS::getLatitude(), WaspGPS::getLongitude(), WaspGPS::getPosition(), and WaspGPS::getSpeed().

#define GPS_NMEA   128

Enables NMEA -> All sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, all NMEA sentences are enabled.

Definition at line 127 of file WaspGPS.h.

Referenced by WaspGPS::getPosition(), WaspGPS::setCommMode(), and WaspGPS::WaspGPS().

#define GPS_NMEA_GGA   2

Enables NMEA -> GGA sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA GGA sentences are enabled.

Definition at line 121 of file WaspGPS.h.

Referenced by WaspGPS::check(), WaspGPS::extractTime(), WaspGPS::getAltitude(), WaspGPS::getLatitude(), WaspGPS::getLongitude(), and WaspGPS::setCommMode().

#define GPS_NMEA_GLL   4

Enables NMEA -> GLL sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA GLL sentences are enabled.

Definition at line 122 of file WaspGPS.h.

Referenced by WaspGPS::setCommMode().

#define GPS_NMEA_GSA   8

Enables NMEA -> GSA sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA GSA sentences are enabled.

Definition at line 123 of file WaspGPS.h.

Referenced by WaspGPS::setCommMode().

#define GPS_NMEA_GSV   16

Enables NMEA -> GSV sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA GSV sentences are enabled.

Definition at line 124 of file WaspGPS.h.

Referenced by WaspGPS::setCommMode().

#define GPS_NMEA_RMC   32

Enables NMEA -> RMC sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA RMC sentences are enabled.

Definition at line 125 of file WaspGPS.h.

Referenced by WaspGPS::extractDate(), and WaspGPS::setCommMode().

#define GPS_NMEA_VTG   64

Enables NMEA -> VTG sentences.

There are differents ways to set communication with GPS module: Binary mode or NMEA mode.

Setting this option, only NMEA VTG sentences are enabled.

Definition at line 126 of file WaspGPS.h.

Referenced by WaspGPS::getCourse(), WaspGPS::getSpeed(), and WaspGPS::setCommMode().

#define GPS_OFF   1

GPS power mode: OFF.

Using GPS_OFF makes GPS module to switch off.

Definition at line 143 of file WaspGPS.h.

Referenced by WaspGPS::OFF(), and WaspGPS::setMode().

#define GPS_ON   0

GPS power mode: ON.

Using GPS_ON makes GPS module to switch on.

Definition at line 142 of file WaspGPS.h.

Referenced by WaspGPS::ON(), WaspGPS::setMode(), and WaspGPS::WaspGPS().

#define GPS_TIMEOUT   1

Flag value.

The GPS timed out while waiting for a string.

Definition at line 223 of file WaspGPS.h.

Referenced by WaspGPS::getPosition(), and WaspGPS::getRaw().

#define GPS_TIMEOUT_em   "error: the GPS timed out"

Error message for flag.

String error --> "error: the GPS timed out"

Definition at line 264 of file WaspGPS.h.

Referenced by WaspGPS::getRaw().

#define HOT   0

GPS waking up mode: HOT.

Using HOT makes GPS module to restart on a hot one, keeping ephemeris and almanacs.

This mode is used by default.

Definition at line 166 of file WaspGPS.h.

Referenced by WaspGPS::init().

#define VERSION   "WaspGPS 01c, (c) 2009 A.Bielsa for Libelium.com\n"

Version Control.

Definition at line 49 of file WaspGPS.h.

Referenced by WaspSD::getLibVersion(), and WaspGPS::getLibVersion().

#define WARM   1

GPS waking up mode: WARM.

Using WARM makes GPS module to restart on a warm one, keeping almanacs.

Definition at line 167 of file WaspGPS.h.


Variable Documentation

Definition at line 1357 of file WaspGPS.cpp.

Referenced by WaspRTC::setTimeFromGPS().


Generated on Tue Jul 20 09:30:57 2010 for WaspmoteAPI by  doxygen 1.5.6