![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
MODGPS/GPS_VTG.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_VTG_H |
pd0wm | 0:bec310bde899 | 24 | #define GPS_VTG_H |
pd0wm | 0:bec310bde899 | 25 | |
pd0wm | 0:bec310bde899 | 26 | #include "mbed.h" |
pd0wm | 0:bec310bde899 | 27 | |
pd0wm | 0:bec310bde899 | 28 | /** GPS_Time definition. |
pd0wm | 0:bec310bde899 | 29 | */ |
pd0wm | 0:bec310bde899 | 30 | class GPS_VTG { |
pd0wm | 0:bec310bde899 | 31 | public: |
pd0wm | 0:bec310bde899 | 32 | |
pd0wm | 0:bec310bde899 | 33 | //! The velocity (in knots) |
pd0wm | 0:bec310bde899 | 34 | double _velocity_knots; |
pd0wm | 0:bec310bde899 | 35 | //! The velocity (in kph) |
pd0wm | 0:bec310bde899 | 36 | double _velocity_kph; |
pd0wm | 0:bec310bde899 | 37 | //! The track (in decimal degrees true) |
pd0wm | 0:bec310bde899 | 38 | double _track_true; |
pd0wm | 0:bec310bde899 | 39 | //! The track (in decimal degrees magnetic) |
pd0wm | 0:bec310bde899 | 40 | double _track_mag; |
pd0wm | 0:bec310bde899 | 41 | |
pd0wm | 0:bec310bde899 | 42 | GPS_VTG(); |
pd0wm | 0:bec310bde899 | 43 | GPS_VTG * vtg(GPS_VTG *n); |
pd0wm | 0:bec310bde899 | 44 | void nmea_vtg(char *s); |
pd0wm | 0:bec310bde899 | 45 | |
pd0wm | 0:bec310bde899 | 46 | double velocity_knots(void) { return _velocity_knots; } |
pd0wm | 0:bec310bde899 | 47 | double velocity_kph(void) { return _velocity_kph; } |
pd0wm | 0:bec310bde899 | 48 | double track_true(void) { return _track_true; } |
pd0wm | 0:bec310bde899 | 49 | double track_mag(void) { return _track_mag; } |
pd0wm | 0:bec310bde899 | 50 | |
pd0wm | 0:bec310bde899 | 51 | }; |
pd0wm | 0:bec310bde899 | 52 | |
pd0wm | 0:bec310bde899 | 53 | #endif |
pd0wm | 0:bec310bde899 | 54 |