2010-08-03 22:42:15 +00:00
|
|
|
/* hadie - High Altitude Balloon flight software */
|
|
|
|
/*============================================================*/
|
|
|
|
/* Copyright (C)2010 Philip Heron <phil@sanslogic.co.uk> */
|
|
|
|
/* */
|
|
|
|
/* This program is distributed under the terms of the GNU */
|
|
|
|
/* General Public License, version 2. You may use, modify, */
|
|
|
|
/* and redistribute it under the terms of this license. A */
|
|
|
|
/* copy should be included with this source. */
|
|
|
|
|
2011-01-08 17:06:05 +00:00
|
|
|
#ifndef GPS_H
|
|
|
|
#define GPS_H
|
|
|
|
|
|
|
|
/* Uncomment if using a u-blox 5 based GPS receiver */
|
|
|
|
#define UBLOX5 1
|
|
|
|
|
2010-08-03 22:42:15 +00:00
|
|
|
typedef struct {
|
|
|
|
|
|
|
|
uint8_t hour; /* 0-23 */
|
|
|
|
uint8_t minute; /* 0-60 */
|
|
|
|
uint8_t second; /* 0-60 */
|
|
|
|
|
|
|
|
int16_t latitude_i; /* -180-180 */
|
|
|
|
uint32_t latitude_f; /* 0-999999 */
|
2010-08-05 21:25:15 +00:00
|
|
|
char latitude_h; /* Hemisphere */
|
2010-08-03 22:42:15 +00:00
|
|
|
|
|
|
|
int16_t longitude_i; /* -180-180 */
|
|
|
|
uint32_t longitude_f; /* 0-999999 */
|
2010-08-05 21:25:15 +00:00
|
|
|
char longitude_h; /* Hemisphere */
|
2010-08-03 22:42:15 +00:00
|
|
|
|
|
|
|
int32_t altitude; /* 0-99999 */
|
|
|
|
|
|
|
|
uint8_t fix; /* 0-2 */
|
|
|
|
uint8_t sats; /* 0-99 */
|
|
|
|
|
|
|
|
} gpsfix_t;
|
|
|
|
|
2011-01-08 17:06:05 +00:00
|
|
|
extern void gps_init(void);
|
2010-08-03 22:42:15 +00:00
|
|
|
extern char gps_parse(gpsfix_t *gps);
|
|
|
|
|
2011-01-08 17:06:05 +00:00
|
|
|
#ifdef UBLOX5
|
|
|
|
extern char gps_ubx_init(void);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|