SDP Code
Fork of MODGPS by
GPS_VTG.h@3:28a1b60b0f37, 2011-04-16 (annotated)
- Committer:
- AjK
- Date:
- Sat Apr 16 09:37:33 2011 +0000
- Revision:
- 3:28a1b60b0f37
- Parent:
- 2:8aa059e7d8b1
- Child:
- 4:1e3a53f150aa
1.13 See ChangeLog.c
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AjK | 2:8aa059e7d8b1 | 1 | /* |
AjK | 2:8aa059e7d8b1 | 2 | Copyright (c) 2010 Andy Kirkham |
AjK | 2:8aa059e7d8b1 | 3 | |
AjK | 2:8aa059e7d8b1 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
AjK | 2:8aa059e7d8b1 | 5 | of this software and associated documentation files (the "Software"), to deal |
AjK | 2:8aa059e7d8b1 | 6 | in the Software without restriction, including without limitation the rights |
AjK | 2:8aa059e7d8b1 | 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
AjK | 2:8aa059e7d8b1 | 8 | copies of the Software, and to permit persons to whom the Software is |
AjK | 2:8aa059e7d8b1 | 9 | furnished to do so, subject to the following conditions: |
AjK | 2:8aa059e7d8b1 | 10 | |
AjK | 2:8aa059e7d8b1 | 11 | The above copyright notice and this permission notice shall be included in |
AjK | 2:8aa059e7d8b1 | 12 | all copies or substantial portions of the Software. |
AjK | 2:8aa059e7d8b1 | 13 | |
AjK | 2:8aa059e7d8b1 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
AjK | 2:8aa059e7d8b1 | 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
AjK | 2:8aa059e7d8b1 | 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
AjK | 2:8aa059e7d8b1 | 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
AjK | 2:8aa059e7d8b1 | 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
AjK | 2:8aa059e7d8b1 | 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
AjK | 2:8aa059e7d8b1 | 20 | THE SOFTWARE. |
AjK | 2:8aa059e7d8b1 | 21 | */ |
AjK | 2:8aa059e7d8b1 | 22 | |
AjK | 2:8aa059e7d8b1 | 23 | #ifndef GPS_VTG_H |
AjK | 2:8aa059e7d8b1 | 24 | #define GPS_VTG_H |
AjK | 2:8aa059e7d8b1 | 25 | |
AjK | 2:8aa059e7d8b1 | 26 | #include "mbed.h" |
AjK | 3:28a1b60b0f37 | 27 | #include "iomacros.h" |
AjK | 2:8aa059e7d8b1 | 28 | |
AjK | 2:8aa059e7d8b1 | 29 | /** GPS_Time definition. |
AjK | 2:8aa059e7d8b1 | 30 | */ |
AjK | 2:8aa059e7d8b1 | 31 | class GPS_VTG { |
AjK | 2:8aa059e7d8b1 | 32 | public: |
AjK | 2:8aa059e7d8b1 | 33 | |
AjK | 2:8aa059e7d8b1 | 34 | //! The velocity (in knots) |
AjK | 2:8aa059e7d8b1 | 35 | double _velocity_knots; |
AjK | 2:8aa059e7d8b1 | 36 | //! The velocity (in kph) |
AjK | 2:8aa059e7d8b1 | 37 | double _velocity_kph; |
AjK | 2:8aa059e7d8b1 | 38 | //! The track (in decimal degrees true) |
AjK | 2:8aa059e7d8b1 | 39 | double _track_true; |
AjK | 2:8aa059e7d8b1 | 40 | //! The track (in decimal degrees magnetic) |
AjK | 2:8aa059e7d8b1 | 41 | double _track_mag; |
AjK | 2:8aa059e7d8b1 | 42 | |
AjK | 2:8aa059e7d8b1 | 43 | GPS_VTG(); |
AjK | 2:8aa059e7d8b1 | 44 | GPS_VTG * vtg(GPS_VTG *n); |
AjK | 2:8aa059e7d8b1 | 45 | void nmea_vtg(char *s); |
AjK | 2:8aa059e7d8b1 | 46 | |
AjK | 2:8aa059e7d8b1 | 47 | double velocity_knots(void) { return _velocity_knots; } |
AjK | 2:8aa059e7d8b1 | 48 | double velocity_kph(void) { return _velocity_kph; } |
AjK | 2:8aa059e7d8b1 | 49 | double track_true(void) { return _track_true; } |
AjK | 2:8aa059e7d8b1 | 50 | double track_mag(void) { return _track_mag; } |
AjK | 2:8aa059e7d8b1 | 51 | |
AjK | 2:8aa059e7d8b1 | 52 | }; |
AjK | 2:8aa059e7d8b1 | 53 | |
AjK | 2:8aa059e7d8b1 | 54 | #endif |
AjK | 2:8aa059e7d8b1 | 55 |