diff --git a/inc/gps.h b/inc/gps.h --- a/inc/gps.h +++ b/inc/gps.h @@ -1,51 +1,35 @@ -/* - * Master Firmware: NMEA Parser - * - * This file is part of OpenTrack. - * - * OpenTrack is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * OpenTrack 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 Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with OpenTrack. If not, see . - * - * Ethan Zonca - * Matthew Kanning - * Kyle Ripperger - * Matthew Kroening - * - */ - - #ifndef GPS_H_ #define GPS_H_ #include -// Duration before GPS fix is declared stale -#define GPS_STALEFIX_MS 60000 -enum gps_state +typedef struct _gps_data { - GPS_STATE_ACQUIRING = 0, - GPS_STATE_FRESHFIX, - GPS_STATE_STALEFIX, - GPS_STATE_NOFIX -}; + int32_t pdop; + int32_t sats_in_solution; + uint32_t speed; + //! int32_t heading; + + int32_t latitude; + int32_t longitude; + int32_t altitude; + + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; + + uint8_t valid; + uint8_t fixtype; + +} gps_data_t; void gps_init(); +void gps_update_data(void); -void gps_update_position(); -void gps_update_time(uint8_t* hour, uint8_t* minute, uint8_t* second); -void gps_check_lock(uint8_t* lock, uint8_t* sats); uint8_t gps_check_nav(void); @@ -55,5 +39,6 @@ void gps_poweroff(void); void gps_acquirefix(void); uint8_t gps_getstate(void); +gps_data_t* gps_getdata(void); #endif /* GPS_H_ */