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-2018, 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(std::ostream& out) const override; // See docs in base
70 
71  /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords
72  * structure (requires linking against mrpt-topography)
73  * Call as: getAsStruct<TGeodeticCoords>(); */
74  template <class TGEODETICCOORDS>
75  inline TGEODETICCOORDS getOrthoAsStruct() const
76  {
77  return TGEODETICCOORDS(
80  }
81  /** Return the corrected geodetic coords as a
82  * mrpt::topography::TGeodeticCoords structure (requires linking against
83  * mrpt-topography)
84  * Call as: getAsStruct<TGeodeticCoords>(); */
85  template <class TGEODETICCOORDS>
86  inline TGEODETICCOORDS getCorrectedOrthoAsStruct() const
87  {
88  return TGEODETICCOORDS(
91  }
92  /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords
93  * structure (requires linking against mrpt-topography)
94  * Call as: getAsStruct<TGeodeticCoords>(); */
95  template <class TGEODETICCOORDS>
96  inline TGEODETICCOORDS getAsStruct() const
97  {
98  return TGEODETICCOORDS(
101  }
102 
103  bool getAllFieldDescriptions(std::ostream& o) const override;
104  bool getAllFieldValues(std::ostream& o) const override;
105 };
106 
107 /** NMEA datum: GLL. \sa mrpt::obs::CObservationGPS */
109 {
111  /** Static msg type (member expected by templates) */
112  enum
113  {
115  };
117  struct content_t
118  {
119  /** The GPS sensor measured timestamp (in UTC time) */
121  /** The measured latitude, in degrees (North:+ , South:-) */
123  /** The measured longitude, in degrees (East:+ , West:-) */
125  /** This will be: 'A'=OK or 'V'=void */
127  content_t();
128  };
129  /** Message content, accesible by individual fields */
131  void dumpToStream(std::ostream& out) const override; // See docs in base
132  bool getAllFieldDescriptions(std::ostream& o) const override;
133  bool getAllFieldValues(std::ostream& o) const override;
134 };
135 
136 /** NMEA datum: RMC. \sa mrpt::obs::CObservationGPS */
138 {
140  /** Static msg type (member expected by templates) */
141  enum
142  {
144  };
146  struct content_t
147  {
148  /** The GPS sensor measured timestamp (in UTC time) */
150  /** This will be: 'A'=OK or 'V'=void */
152  /** The measured latitude, in degrees (North:+ , South:-) */
154  /** The measured longitude, in degrees (East:+ , West:-) */
156  /** Measured speed (in knots) */
157  double speed_knots;
158  /** Measured speed direction (in degrees) */
160  /** Date: day (1-31), month (1-12), two-digits year (00-99) */
162  /** Magnetic variation direction (East:+, West:-) */
163  double magnetic_dir;
164  /** 'A': Autonomous, 'D': Differential, 'N': Not valid, 'E': Estimated,
165  * 'M': Manual */
167  content_t();
168  };
169  /** Message content, accesible by individual fields */
171 
172  /** Build an MRPT timestamp with the year/month/day of this observation. */
174 
175  void dumpToStream(std::ostream& out) const override; // See docs in base
176  bool getAllFieldDescriptions(std::ostream& o) const override;
177  bool getAllFieldValues(std::ostream& o) const override;
178 };
179 
180 /** NMEA datum: VTG. \sa mrpt::obs::CObservationGPS */
182 {
184  /** Static msg type (member expected by templates) */
185  enum
186  {
188  };
190  struct content_t
191  {
192  /** Degrees */
195  content_t();
196  };
197  /** Message content, accesible by individual fields */
199  void dumpToStream(std::ostream& out) const override; // See docs in base
200  bool getAllFieldDescriptions(std::ostream& o) const override;
201  bool getAllFieldValues(std::ostream& o) const override;
202 };
203 
204 /** NMEA datum: ZDA. \sa mrpt::obs::CObservationGPS */
206 {
208  /** Static msg type (member expected by templates) */
209  enum
210  {
212  };
214  struct content_t
215  {
216  /** The GPS sensor measured timestamp (in UTC time) */
218  /** 1-31 */
220  /** 1-12 */
222  /** 2000-... */
224  content_t();
225  };
226  /** Message content, accesible by individual fields */
228 
229  /** Build an MRPT UTC timestamp with the year/month/day + hour/minute/sec of
230  * this observation. */
232  /** Build an MRPT timestamp with the year/month/day of this observation. */
234 
235  void dumpToStream(std::ostream& out) const override; // See docs in base
236  bool getAllFieldDescriptions(std::ostream& o) const override;
237  bool getAllFieldValues(std::ostream& o) const override;
238 };
239 #pragma pack(pop) // End of pack = 1
240 } // namespace gnss
241 } // namespace obs
242 } // namespace mrpt
void dumpToStream(std::ostream &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:-)
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()
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).
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). ...
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.
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).
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()
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
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()
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
Pure virtual base for all message types.
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
double direction_degrees
Measured speed direction (in degrees)
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
TGEODETICCOORDS getAsStruct() const
Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure (requires linking against...
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:31
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.
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: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019