INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         
nmeamessages.h
1 /*
2  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
3  * http://gearbox.sf.net/
4  * Copyright (c) 2004-2010 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Duncan Mercer
5  *
6  * This distribution is licensed to you under the terms described in
7  * the LICENSE file included in this distribution.
8  *
9  */
10 #ifndef GBXGPSUTILACFR_NMEAMESSAGES_H
11 #define GBXGPSUTILACFR_NMEAMESSAGES_H
12 
13 #include <string>
14 #include <gbxgarminacfr/nmeasentence.h>
15 
16 namespace gbxgarminacfr {
17 
19 enum DataType
20 {
29 };
30 
33 {
34 public:
35  virtual ~GenericData() {};
37  virtual DataType type() const=0;
38 
39 private:
40 };
41 
43 enum FixType
44 {
52 };
53 std::string toString( const FixType &f );
54 
57 struct GgaData : public GenericData
58 {
59 public:
60  DataType type() const { return GpGga; }
61 
68 
77  double utcTimeSec;
78 
80  double latitude;
82  double longitude;
86  double altitude;
87 
91 
94 
97 
100 };
101 std::string toString( const GgaData &d );
102 inline std::ostream &operator<<( std::ostream &s, const GgaData &d )
103 { return s << toString(d); }
104 GenericData* extractGgaData( const gbxgpsutilacfr::NmeaSentence& sentence, int timeSec, int timeUsec );
105 
107 class VtgData : public GenericData
108 {
109 public:
110  DataType type() const { return GpVtg; }
111 
118 
121  bool isValid;
122 
124  double headingTrue;
128  double speed;
129 };
130 std::string toString( const VtgData &d );
131 inline std::ostream &operator<<( std::ostream &s, const VtgData &d )
132 { return s << toString(d); }
133 GenericData* extractVtgData( const gbxgpsutilacfr::NmeaSentence& sentence, int timeSec, int timeUsec );
134 
137 class RmeData : public GenericData
138 {
139 public:
140  DataType type() const { return PgRme; }
141 
148 
151  bool isValid;
152 
156 
161 
164 };
165 std::string toString( const RmeData &d );
166 inline std::ostream &operator<<( std::ostream &s, const RmeData &d )
167 { return s << toString(d); }
168 GenericData* extractRmeData( const gbxgpsutilacfr::NmeaSentence& sentence, int timeSec, int timeUsec );
169 
171 class RmcData : public GenericData
172 {
173 public:
174  DataType type() const { return GpRmc; }
175 
182 
191  double utcTimeSec;
192 
194  double latitude;
196  double longitude;
197 
200  bool isValid;
201 
203  double headingTrue;
207  double speed;
208 };
209 std::string toString( const RmcData &d );
210 inline std::ostream &operator<<( std::ostream &s, const RmcData &d )
211 { return s << toString(d); }
212 GenericData* extractRmcData( const gbxgpsutilacfr::NmeaSentence& sentence, int timeSec, int timeUsec );
213 
214 }
215 
216 #endif
 

Generated for GearBox by  doxygen 1.4.5