Main MRPT website > C++ reference for MRPT 1.9.9
gnss_messages_ascii_nmea.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include "gnss_messages_common.h"
12 
13 namespace mrpt
14 {
15 namespace obs
16 {
17 namespace gnss
18 {
19 // Pragma to ensure we can safely serialize some of these structures
20 #pragma pack(push, 1)
21 
22 /** NMEA datum: GGA. \sa mrpt::obs::CObservationGPS */
24 {
26  /** Static msg type (member expected by templates) */
27  enum
28  {
30  };
32  struct content_t
33  {
34  /** The GPS sensor measured timestamp (in UTC time) */
36  /** The measured latitude, in degrees (North:+ , South:-) */
38  /** The measured longitude, in degrees (East:+ , West:-) */
40  /** NMEA standard values: 0 = invalid, 1 = GPS fix (SPS), 2 = DGPS fix,
41  * 3 = PPS fix, 4 = Real Time Kinematic, 5 = Float RTK, 6 = estimated
42  * (dead reckoning) (2.3 feature), 7 = Manual input mode, 8 = Simulation
43  * mode */
45  /** The measured altitude, in meters (A). */
47  /** Undulation: Difference between the measured altitude and the geoid,
48  * in meters (B). */
50  /** The measured orthometric altitude, in meters (A)+(B). */
52  /** The corrected (only for TopCon mmGPS) orthometric altitude, in
53  * meters mmGPS(A+B). */
55  /** The number of satelites used to compute this estimation. */
57  /** This states whether to take into account the value in the HDOP
58  * field. */
60  /** The HDOP (Horizontal Dilution of Precision) as returned by the
61  * sensor. */
62  float HDOP;
63 
64  content_t();
65  };
66  /** Message content, accesible by individual fields */
68 
69  void dumpToStream(
70  mrpt::utils::CStream& out) const override; // See docs in base
71 
72  /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords
73  * structure (requires linking against mrpt-topography)
74  * Call as: getAsStruct<TGeodeticCoords>(); */
75  template <class TGEODETICCOORDS>
76  inline TGEODETICCOORDS getOrthoAsStruct() const
77  {
78  return TGEODETICCOORDS(
81  }
82  /** Return the corrected geodetic coords as a
83  * mrpt::topography::TGeodeticCoords structure (requires linking against
84  * mrpt-topography)
85  * Call as: getAsStruct<TGeodeticCoords>(); */
86  template <class TGEODETICCOORDS>
87  inline TGEODETICCOORDS getCorrectedOrthoAsStruct() const
88  {
89  return TGEODETICCOORDS(
92  }
93  /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords
94  * structure (requires linking against mrpt-topography)
95  * Call as: getAsStruct<TGeodeticCoords>(); */
96  template <class TGEODETICCOORDS>
97  inline TGEODETICCOORDS getAsStruct() const
98  {
99  return TGEODETICCOORDS(
102  }
103 
104  bool getAllFieldDescriptions(std::ostream& o) const override;
105  bool getAllFieldValues(std::ostream& o) const override;
106 };
107 
108 /** NMEA datum: GLL. \sa mrpt::obs::CObservationGPS */
110 {
112  /** Static msg type (member expected by templates) */
113  enum
114  {
116  };
118  struct content_t
119  {
120  /** The GPS sensor measured timestamp (in UTC time) */
122  /** The measured latitude, in degrees (North:+ , South:-) */
124  /** The measured longitude, in degrees (East:+ , West:-) */
126  /** This will be: 'A'=OK or 'V'=void */
128  content_t();
129  };
130  /** Message content, accesible by individual fields */
132  void dumpToStream(
133  mrpt::utils::CStream& out) const override; // See docs in base
134  bool getAllFieldDescriptions(std::ostream& o) const override;
135  bool getAllFieldValues(std::ostream& o) const override;
136 };
137 
138 /** NMEA datum: RMC. \sa mrpt::obs::CObservationGPS */
140 {
142  /** Static msg type (member expected by templates) */
143  enum
144  {
146  };
148  struct content_t
149  {
150  /** The GPS sensor measured timestamp (in UTC time) */
152  /** This will be: 'A'=OK or 'V'=void */
154  /** The measured latitude, in degrees (North:+ , South:-) */
156  /** The measured longitude, in degrees (East:+ , West:-) */
158  /** Measured speed (in knots) */
159  double speed_knots;
160  /** Measured speed direction (in degrees) */
162  /** Date: day (1-31), month (1-12), two-digits year (00-99) */
164  /** Magnetic variation direction (East:+, West:-) */
165  double magnetic_dir;
166  /** 'A': Autonomous, 'D': Differential, 'N': Not valid, 'E': Estimated,
167  * 'M': Manual */
169  content_t();
170  };
171  /** Message content, accesible by individual fields */
173 
174  /** Build an MRPT timestamp with the year/month/day of this observation. */
176 
177  void dumpToStream(
178  mrpt::utils::CStream& out) const override; // See docs in base
179  bool getAllFieldDescriptions(std::ostream& o) const override;
180  bool getAllFieldValues(std::ostream& o) const override;
181 };
182 
183 /** NMEA datum: VTG. \sa mrpt::obs::CObservationGPS */
185 {
187  /** Static msg type (member expected by templates) */
188  enum
189  {
191  };
193  struct content_t
194  {
195  /** Degrees */
198  content_t();
199  };
200  /** Message content, accesible by individual fields */
202  void dumpToStream(
203  mrpt::utils::CStream& out) const override; // See docs in base
204  bool getAllFieldDescriptions(std::ostream& o) const override;
205  bool getAllFieldValues(std::ostream& o) const override;
206 };
207 
208 /** NMEA datum: ZDA. \sa mrpt::obs::CObservationGPS */
210 {
212  /** Static msg type (member expected by templates) */
213  enum
214  {
216  };
218  struct content_t
219  {
220  /** The GPS sensor measured timestamp (in UTC time) */
222  /** 1-31 */
224  /** 1-12 */
226  /** 2000-... */
228  content_t();
229  };
230  /** Message content, accesible by individual fields */
232 
233  /** Build an MRPT UTC timestamp with the year/month/day + hour/minute/sec of
234  * this observation. */
236  /** Build an MRPT timestamp with the year/month/day of this observation. */
238 
239  void dumpToStream(
240  mrpt::utils::CStream& out) const override; // See docs in base
241  bool getAllFieldDescriptions(std::ostream& o) const override;
242  bool getAllFieldValues(std::ostream& o) const override;
243 };
244 #pragma pack(pop) // End of pack = 1
245 }
246 }
247 } // End of namespaces
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:32
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
uint8_t fix_quality
NMEA standard values: 0 = invalid, 1 = GPS fix (SPS), 2 = DGPS fix, 3 = PPS fix, 4 = Real Time Kinema...
content_t fields
Message content, accesible by individual fields.
bool getAllFieldValues(std::ostream &o) const override
Dumps a line with the sequence of all field values (without a line feed at the end).
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
unsigned __int16 uint16_t
Definition: rptypes.h:44
bool getAllFieldValues(std::ostream &o) const override
Dumps a line with the sequence of all field values (without a line feed at the end).
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
UTC (Coordinated Universal Time) time-stamp structure for GPS messages.
gnss_message_type_t
List of all known GNSS message types.
content_t fields
Message content, accesible by individual fields.
uint32_t satellitesUsed
The number of satelites used to compute this estimation.
bool getAllFieldDescriptions(std::ostream &o) const override
Dumps a header for getAllFieldValues()
void dumpToStream(mrpt::utils::CStream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
content_t fields
Message content, accesible by individual fields.
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
signed char int8_t
Definition: rptypes.h:40
int8_t validity_char
This will be: &#39;A&#39;=OK or &#39;V&#39;=void.
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
double orthometric_altitude
The measured orthometric altitude, in meters (A)+(B).
unsigned char uint8_t
Definition: rptypes.h:41
bool getAllFieldValues(std::ostream &o) const override
Dumps a line with the sequence of all field values (without a line feed at the end).
bool getAllFieldDescriptions(std::ostream &o) const override
Dumps a header for getAllFieldValues()
double altitude_meters
The measured altitude, in meters (A).
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:41
bool thereis_HDOP
This states whether to take into account the value in the HDOP field.
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
double corrected_orthometric_altitude
The corrected (only for TopCon mmGPS) orthometric altitude, in meters mmGPS(A+B). ...
void dumpToStream(mrpt::utils::CStream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
TGEODETICCOORDS getCorrectedOrthoAsStruct() const
Return the corrected geodetic coords as a mrpt::topography::TGeodeticCoords structure (requires linki...
#define GNSS_MESSAGE_BINARY_BLOCK(DATA_PTR, DATA_LEN)
mrpt::system::TTimeStamp getDateAsTimestamp() const
Build an MRPT timestamp with the year/month/day of this observation.
bool getAllFieldDescriptions(std::ostream &o) const override
Dumps a header for getAllFieldValues()
uint8_t date_day
Date: day (1-31), month (1-12), two-digits year (00-99)
content_t fields
Message content, accesible by individual fields.
float HDOP
The HDOP (Horizontal Dilution of Precision) as returned by the sensor.
void dumpToStream(mrpt::utils::CStream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
bool getAllFieldValues(std::ostream &o) const override
Dumps a line with the sequence of all field values (without a line feed at the end).
void dumpToStream(mrpt::utils::CStream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
bool getAllFieldValues(std::ostream &o) const override
Dumps a line with the sequence of all field values (without a line feed at the end).
TGEODETICCOORDS getOrthoAsStruct() const
Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure (requires linking against...
bool getAllFieldDescriptions(std::ostream &o) const override
Dumps a header for getAllFieldValues()
double geoidal_distance
Undulation: Difference between the measured altitude and the geoid, in meters (B).
double magnetic_dir
Magnetic variation direction (East:+, West:-)
mrpt::system::TTimeStamp getDateAsTimestamp() const
Build an MRPT timestamp with the year/month/day of this observation.
mrpt::system::TTimeStamp getDateTimeAsTimestamp() const
Build an MRPT UTC timestamp with the year/month/day + hour/minute/sec of this observation.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool getAllFieldDescriptions(std::ostream &o) const override
Dumps a header for getAllFieldValues()
Pure virtual base for all message types.
double direction_degrees
Measured speed direction (in degrees)
TGEODETICCOORDS getAsStruct() const
Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure (requires linking against...
char positioning_mode
&#39;A&#39;: Autonomous, &#39;D&#39;: Differential, &#39;N&#39;: Not valid, &#39;E&#39;: Estimated, &#39;M&#39;: Manual
content_t fields
Message content, accesible by individual fields.
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
int8_t validity_char
This will be: &#39;A&#39;=OK or &#39;V&#39;=void.
void dumpToStream(mrpt::utils::CStream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
unsigned __int32 uint32_t
Definition: rptypes.h:47
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019