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