Defines | |
#define | GPS_BUFFER_SIZE 50 |
The maximum length of a binary GPS engine message. | |
Enumerations | |
enum | GPS_PARSE_STATE_MACHINE { GPS_START1, GPS_START2, GPS_COMMAND1, GPS_COMMAND2, GPS_READMESSAGE, GPS_CHECKSUMMESSAGE, GPS_EOMCR, GPS_EOMLF } |
GPS parse engine state machine values. More... | |
Functions | |
GPS_FIX_TYPE | gpsGetFixType () |
Get the type of fix. | |
int32_t | gpsGetPeakAltitude () |
Peak altitude detected while GPS is in 3D fix mode since the system was booted. | |
void | gpsInit () |
Initialize the GPS subsystem. | |
bool_t | gpsIsReady () |
Determine if new GPS message is ready to process. | |
uint8_t | gpsNMEAChecksum (uint8_t *buffer, uint8_t length) |
Calculate NMEA-0183 message checksum of buffer that is length bytes long. | |
bool_t | gpsSetup () |
Verify the GPS engine is sending the @Hb position report message. | |
void | gpsParsePositionMessage () |
Parse the Motorola @Hb (Short position/message) report. | |
void | gpsPowerOn () |
Turn on the GPS engine power and serial interface. | |
void | gpsPowerOff () |
Turn off the GPS engine power and serial interface. | |
void | gpsUpdate () |
Read the serial FIFO and process complete GPS messages. | |
Variables | |
uint8_t | gpsIndex |
Index into gpsBuffer used to store message data. | |
GPS_PARSE_STATE_MACHINE | gpsParseState |
State machine used to parse the GPS message stream. | |
uint8_t | gpsBuffer [GPS_BUFFER_SIZE] |
Buffer to store data as it is read from the GPS engine. | |
int32_t | gpsPeakAltitude |
Peak altitude detected while GPS is in 3D fix mode. | |
uint8_t | gpsChecksum |
Checksum used to verify binary message from GPS engine. |
#define GPS_BUFFER_SIZE 50 |
The maximum length of a binary GPS engine message.
GPS parse engine state machine values.
GPS_FIX_TYPE gpsGetFixType | ( | ) |
Get the type of fix.
References GPS_2D_FIX, GPS_3D_FIX, GPS_NO_FIX, and gpsPosition.
Referenced by ballastCheck(), cutDownCheck(), gpsParsePositionMessage(), main(), tncGPGGAPacket(), tncGPRMCPacket(), and tncStatusPacket().
int32_t gpsGetPeakAltitude | ( | ) |
Peak altitude detected while GPS is in 3D fix mode since the system was booted.
References gpsPeakAltitude.
void gpsInit | ( | ) |
Initialize the GPS subsystem.
References GPS_START1, gpsParseState, gpsPeakAltitude, and gpsPosition.
Referenced by main().
bool_t gpsIsReady | ( | ) |
Determine if new GPS message is ready to process.
This function is a one shot and typically returns true once a second for each GPS position fix.
References gpsPosition.
Referenced by gpsSetup(), and main().
Calculate NMEA-0183 message checksum of buffer that is length bytes long.
buffer | pointer to data buffer. | |
length | number of bytes in buffer. |
Referenced by tncGPGGAPacket(), and tncGPRMCPacket().
void gpsParsePositionMessage | ( | ) |
Parse the Motorola @Hb (Short position/message) report.
References GPS_3D_FIX, gpsBuffer, gpsGetFixType(), gpsPeakAltitude, and gpsPosition.
Referenced by gpsUpdate().
void gpsPowerOff | ( | ) |
Turn off the GPS engine power and serial interface.
References IO_GPS_PWR.
Referenced by diagPort().
void gpsPowerOn | ( | ) |
bool_t gpsSetup | ( | ) |
Verify the GPS engine is sending the @Hb position report message.
If not, configure the GPS engine to send the desired report.
References gpsIsReady(), gpsUpdate(), TIME_DUTYCYCLE_20, timeGetTicks(), and timeSetDutyCycle().
Referenced by main().
void gpsUpdate | ( | ) |
Read the serial FIFO and process complete GPS messages.
References GPS_CHECKSUMMESSAGE, GPS_COMMAND1, GPS_COMMAND2, GPS_EOMCR, GPS_EOMLF, GPS_READMESSAGE, GPS_START1, GPS_START2, gpsBuffer, gpsChecksum, gpsIndex, gpsParsePositionMessage(), gpsParseState, serialHasData(), and serialRead().
Referenced by gpsSetup(), and main().
Buffer to store data as it is read from the GPS engine.
Referenced by gpsParsePositionMessage(), and gpsUpdate().
Peak altitude detected while GPS is in 3D fix mode.
Referenced by gpsGetPeakAltitude(), gpsInit(), and gpsParsePositionMessage().