Dependents:   V2_GPSRTC

Committer:
joosttromp
Date:
Fri Jun 17 12:37:03 2011 +0000
Revision:
0:62fa44dd600b

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joosttromp 0:62fa44dd600b 1 /*
joosttromp 0:62fa44dd600b 2 Copyright (c) 2010 Andy Kirkham
joosttromp 0:62fa44dd600b 3
joosttromp 0:62fa44dd600b 4 Permission is hereby granted, free of charge, to any person obtaining a copy
joosttromp 0:62fa44dd600b 5 of this software and associated documentation files (the "Software"), to deal
joosttromp 0:62fa44dd600b 6 in the Software without restriction, including without limitation the rights
joosttromp 0:62fa44dd600b 7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
joosttromp 0:62fa44dd600b 8 copies of the Software, and to permit persons to whom the Software is
joosttromp 0:62fa44dd600b 9 furnished to do so, subject to the following conditions:
joosttromp 0:62fa44dd600b 10
joosttromp 0:62fa44dd600b 11 The above copyright notice and this permission notice shall be included in
joosttromp 0:62fa44dd600b 12 all copies or substantial portions of the Software.
joosttromp 0:62fa44dd600b 13
joosttromp 0:62fa44dd600b 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
joosttromp 0:62fa44dd600b 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
joosttromp 0:62fa44dd600b 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
joosttromp 0:62fa44dd600b 17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
joosttromp 0:62fa44dd600b 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
joosttromp 0:62fa44dd600b 19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
joosttromp 0:62fa44dd600b 20 THE SOFTWARE.
joosttromp 0:62fa44dd600b 21 */
joosttromp 0:62fa44dd600b 22
joosttromp 0:62fa44dd600b 23 #ifndef GPS_GEODETIC_H
joosttromp 0:62fa44dd600b 24 #define GPS_GEODETIC_H
joosttromp 0:62fa44dd600b 25
joosttromp 0:62fa44dd600b 26 #include "mbed.h"
joosttromp 0:62fa44dd600b 27
joosttromp 0:62fa44dd600b 28 /** GPS_Geodetic definition.
joosttromp 0:62fa44dd600b 29 */
joosttromp 0:62fa44dd600b 30 class GPS_Geodetic {
joosttromp 0:62fa44dd600b 31 public:
joosttromp 0:62fa44dd600b 32
joosttromp 0:62fa44dd600b 33 //! double The latitude
joosttromp 0:62fa44dd600b 34 double lat;
joosttromp 0:62fa44dd600b 35
joosttromp 0:62fa44dd600b 36 //! double The longitude
joosttromp 0:62fa44dd600b 37 double lon;
joosttromp 0:62fa44dd600b 38
joosttromp 0:62fa44dd600b 39 //! double The altitude
joosttromp 0:62fa44dd600b 40 double alt;
joosttromp 0:62fa44dd600b 41
joosttromp 0:62fa44dd600b 42 int num_of_gps_sats;
joosttromp 0:62fa44dd600b 43 int gps_satellite_quality;
joosttromp 0:62fa44dd600b 44 GPS_Geodetic() { lat = 0.0; lon = 0.0; alt = 0.0; }
joosttromp 0:62fa44dd600b 45
joosttromp 0:62fa44dd600b 46 int numOfSats(void) { return num_of_gps_sats; }
joosttromp 0:62fa44dd600b 47 int getGPSquality(void) { return gps_satellite_quality; }
joosttromp 0:62fa44dd600b 48 void nmea_gga(char *s);
joosttromp 0:62fa44dd600b 49 double convert_lat_coord(char *s, char north_south);
joosttromp 0:62fa44dd600b 50 double convert_lon_coord(char *s, char east_west);
joosttromp 0:62fa44dd600b 51 double convert_height(char *s);
joosttromp 0:62fa44dd600b 52 };
joosttromp 0:62fa44dd600b 53
joosttromp 0:62fa44dd600b 54 #endif
joosttromp 0:62fa44dd600b 55