User manual

LPCXpresso Experiment Kit - User’s Guide
Page 118
Copyright 2013 © Embedded Artists AB
Figure 66 GPS Module Data Format
The code below will read one message at a time from the GPS and then extract the time and latitude
parts into the gpsData structure.
#include "LPC11xx.h"
#include "uart.h"
#include "gps.h" //put typedef declaration below (gpsData) in gps.h file
/**
* Data structure for the GPS values
*/
typedef struct gpsData {
uint8_t satellitesUsed[20];
uint8_t utcTime[20];
uint8_t altitude[20];
uint8_t bufLatitude[20];
uint8_t bufLongitude[20];
int positionFixed;
int northSouthIndicator;
int eastWestIndicator;
int latitude;
int longitude;
} gpsData;
static uint8_t END_OF_MESSAGE = '\0';
static uint8_t DIVIDER = ',';
// The parsed data
static gpsData data;