Main MRPT website > C++ reference for MRPT 1.9.9
CGPSInterface_parser_NMEA.cpp
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 
10 #include "hwdrivers-precomp.h" // Precompiled headers
11 
12 #include <mrpt/system/os.h>
13 #include <mrpt/system/filesystem.h>
15 #include <iostream>
16 
17 using namespace mrpt::hwdrivers;
18 using namespace mrpt::obs;
19 using namespace mrpt::system;
20 using namespace std;
21 
22 const size_t MAX_NMEA_LINE_LENGTH = 1024;
23 
24 bool CGPSInterface::implement_parser_NMEA(size_t& out_minimum_rx_buf_to_decide)
25 {
26  out_minimum_rx_buf_to_decide = 3;
27 
28  if (m_rx_buffer.size() < 3) return true; // no need to skip a byte
29 
30  const size_t nBytesAval = m_rx_buffer.size(); // Available for read
31 
32  // If the string does not start with "$GP" it is not valid:
33  uint8_t peek_buffer[3];
34  m_rx_buffer.peek_many(&peek_buffer[0], 3);
35  if (peek_buffer[0] != '$' || peek_buffer[1] != 'G' || peek_buffer[2] != 'P')
36  {
37  // Not the start of a NMEA string, skip 1 char:
38  return false;
39  }
40  else
41  {
42  // It starts OK: try to find the end of the line
43  std::string line;
44  bool line_is_ended = false;
45  for (size_t i = 0; i < nBytesAval && i < MAX_NMEA_LINE_LENGTH; i++)
46  {
47  const char val = static_cast<char>(m_rx_buffer.peek(i));
48  if (val == '\r' || val == '\n')
49  {
50  line_is_ended = true;
51  break;
52  }
53  line.push_back(val);
54  }
55  if (line_is_ended)
56  {
57  // Pop from buffer:
58  for (size_t i = 0; i < line.size(); i++) m_rx_buffer.pop();
59 
60  // Parse:
61  const bool did_have_gga = m_just_parsed_messages.has_GGA_datum;
63  line, m_just_parsed_messages, false /*verbose*/))
64  {
65  // Parsers must set only the part of the msg type:
66  m_just_parsed_messages.sensorLabel = "NMEA";
67 
68  // Save GGA cache (useful for NTRIP,...)
69  const bool now_has_gga = m_just_parsed_messages.has_GGA_datum;
70  if (now_has_gga && !did_have_gga)
71  {
72  m_last_GGA = line;
73  }
74  }
75  else
76  {
77  if (m_verbose)
78  std::cerr << "[CGPSInterface::implement_parser_NMEA] Line "
79  "of unknown format ignored: `"
80  << line << "`\n";
81  }
82  return true;
83  }
84  else
85  {
86  // We still need to wait for more data to be read:
87  out_minimum_rx_buf_to_decide = nBytesAval + 1;
88  return true;
89  }
90  }
91 }
92 
93 /* -----------------------------------------------------
94  parse_NMEA
95 ----------------------------------------------------- */
97  const std::string& s, mrpt::obs::CObservationGPS& out_obs,
98  const bool verbose)
99 {
100  static mrpt::system::TTimeStamp last_known_date =
101  mrpt::system::now(); // For building complete date+time in msgs without
102  // a date.
103  static mrpt::system::TTimeStamp last_known_time = mrpt::system::now();
104 
105  if (verbose) cout << "[CGPSInterface] GPS raw string: " << s << endl;
106 
107  // Firstly! If the string does not start with "$GP" it is not valid:
108  if (s.size() < 7) return false;
109  if (s[0] != '$' || s[1] != 'G') return false;
110 
111  std::vector<std::string> lstTokens;
113  s, "*,\t\r\n", lstTokens, false /* do not skip blank tokens */);
114  if (lstTokens.size() < 3) return false;
115 
116  for (size_t i = 0; i < lstTokens.size(); i++)
117  lstTokens[i] = mrpt::system::trim(lstTokens[i]); // Trim whitespaces
118 
119  bool parsed_ok = false;
120  // Try to determine the kind of command:
121  if (lstTokens[0] == "$GPGGA" && lstTokens.size() >= 13)
122  {
123  // ---------------------------------------------
124  // GGA
125  // ---------------------------------------------
126  bool all_fields_ok = true;
127  std::string token;
128 
129  // Fill out the output structure:
131 
132  // Time:
133  token = lstTokens[1];
134  if (token.size() >= 6)
135  {
136  gga.fields.UTCTime.hour = 10 * (token[0] - '0') + token[1] - '0';
137  gga.fields.UTCTime.minute = 10 * (token[2] - '0') + token[3] - '0';
138  gga.fields.UTCTime.sec = atof(&(token.c_str()[4]));
139  }
140  else
141  all_fields_ok = false;
142 
143  // Latitude:
144  token = lstTokens[2];
145  if (token.size() >= 4)
146  {
147  double lat = 10 * (token[0] - '0') + token[1] - '0';
148  lat += atof(&(token.c_str()[2])) / 60.0;
150  }
151  else
152  all_fields_ok = false;
153 
154  // N/S:
155  token = lstTokens[3];
156  if (token.empty())
157  all_fields_ok = false;
158  else if (token[0] == 'S')
160 
161  // Longitude:
162  token = lstTokens[4];
163  if (token.size() >= 5)
164  {
165  double lat =
166  100 * (token[0] - '0') + 10 * (token[1] - '0') + token[2] - '0';
167  lat += atof(&(token.c_str()[3])) / 60.0;
169  }
170  else
171  all_fields_ok = false;
172 
173  // E_W:
174  token = lstTokens[5];
175  if (token.empty())
176  all_fields_ok = false;
177  else if (token[0] == 'W')
179 
180  // fix quality:
181  token = lstTokens[6];
182  if (!token.empty())
183  gga.fields.fix_quality = (unsigned char)atoi(token.c_str());
184 
185  // sats:
186  token = lstTokens[7];
187  if (!token.empty())
188  gga.fields.satellitesUsed = (unsigned char)atoi(token.c_str());
189 
190  // HDOP:
191  token = lstTokens[8];
192  if (!token.empty())
193  {
194  gga.fields.HDOP = (float)atof(token.c_str());
195  gga.fields.thereis_HDOP = true;
196  }
197 
198  // Altitude:
199  token = lstTokens[9];
200  if (token.empty())
201  all_fields_ok = false;
202  else
203  gga.fields.altitude_meters = atof(token.c_str());
204 
205  // Units of the altitude:
206  // token = lstTokens[10];
207  // ASSERT_(token == "M");
208 
209  // Geoidal separation [B] (undulation)
210  token = lstTokens[11];
211  if (!token.empty()) gga.fields.geoidal_distance = atof(token.c_str());
212 
213  // Units of the geoidal separation:
214  // token = lstTokens[12];
215  // ASSERT_(token == "M");
216 
217  // Total altitude [A]+[B] and mmGPS Corrected total altitude
218  // Corr([A]+[B]):
222 
223  if (all_fields_ok)
224  {
225  out_obs.setMsg(gga);
227  out_obs.timestamp =
228  gga.fields.UTCTime.getAsTimestamp(last_known_date);
229  out_obs.has_satellite_timestamp = true;
230  }
231  parsed_ok = all_fields_ok;
232  }
233  else if (lstTokens[0] == "$GPRMC" && lstTokens.size() >= 13)
234  {
235  // ---------------------------------------------
236  // GPRMC
237  // ---------------------------------------------
238  bool all_fields_ok = true;
239  std::string token;
240 
241  // Fill out the output structure:
243 
244  // Time:
245  token = lstTokens[1];
246  if (token.size() >= 6)
247  {
248  rmc.fields.UTCTime.hour = 10 * (token[0] - '0') + token[1] - '0';
249  rmc.fields.UTCTime.minute = 10 * (token[2] - '0') + token[3] - '0';
250  rmc.fields.UTCTime.sec = atof(&(token.c_str()[4]));
251  }
252  else
253  all_fields_ok = false;
254 
255  // Valid?
256  token = lstTokens[2];
257  if (token.empty())
258  all_fields_ok = false;
259  else
260  rmc.fields.validity_char = token.c_str()[0];
261 
262  // Latitude:
263  token = lstTokens[3];
264  if (token.size() >= 4)
265  {
266  double lat = 10 * (token[0] - '0') + token[1] - '0';
267  lat += atof(&(token.c_str()[2])) / 60.0;
269  }
270  else
271  all_fields_ok = false;
272 
273  // N/S:
274  token = lstTokens[4];
275  if (token.empty())
276  all_fields_ok = false;
277  else if (token[0] == 'S')
279 
280  // Longitude:
281  token = lstTokens[5];
282  if (token.size() >= 5)
283  {
284  double lat =
285  100 * (token[0] - '0') + 10 * (token[1] - '0') + token[2] - '0';
286  lat += atof(&(token.c_str()[3])) / 60.0;
288  }
289  else
290  all_fields_ok = false;
291 
292  // E/W:
293  token = lstTokens[6];
294  if (token.empty())
295  all_fields_ok = false;
296  else if (token[0] == 'W')
298 
299  // Speed:
300  token = lstTokens[7];
301  if (!token.empty()) rmc.fields.speed_knots = atof(token.c_str());
302 
303  // Direction:
304  token = lstTokens[8];
305  if (!token.empty()) rmc.fields.direction_degrees = atof(token.c_str());
306 
307  // Date:
308  token = lstTokens[9];
309  if (token.size() >= 6)
310  {
311  rmc.fields.date_day = 10 * (token[0] - '0') + token[1] - '0';
312  rmc.fields.date_month = 10 * (token[2] - '0') + token[3] - '0';
313  rmc.fields.date_year = atoi(&(token.c_str()[4]));
314  }
315  else
316  all_fields_ok = false;
317 
318  // Magnetic var
319  token = lstTokens[10];
320  if (token.size() >= 2)
321  {
322  rmc.fields.magnetic_dir = atof(token.c_str());
323  // E/W:
324  token = lstTokens[11];
325  if (token.empty())
326  all_fields_ok = false;
327  else if (token[0] == 'W')
329  }
330 
331  // Mode ind.
332  if (lstTokens.size() >= 14)
333  {
334  // Only for NMEA 2.3
335  token = lstTokens[12];
336  if (token.empty())
337  all_fields_ok = false;
338  else
339  rmc.fields.positioning_mode = token.c_str()[0];
340  }
341  else
342  rmc.fields.positioning_mode = 'A'; // Default for older receiver
343 
344  if (all_fields_ok)
345  {
346  out_obs.setMsg(rmc);
348  out_obs.timestamp =
350  last_known_date = rmc.getDateAsTimestamp();
351  last_known_time = out_obs.timestamp;
352  out_obs.has_satellite_timestamp = true;
353  }
354  parsed_ok = all_fields_ok;
355  }
356  else if (lstTokens[0] == "$GPGLL" && lstTokens.size() >= 5)
357  {
358  // ---------------------------------------------
359  // GPGLL
360  // ---------------------------------------------
361  bool all_fields_ok = true;
362  std::string token;
363 
364  // Fill out the output structure:
366  // Latitude:
367  token = lstTokens[1];
368  if (token.size() >= 4)
369  {
370  double lat = 10 * (token[0] - '0') + token[1] - '0';
371  lat += atof(&(token.c_str()[2])) / 60.0;
373  }
374  else
375  all_fields_ok = false;
376 
377  // N/S:
378  token = lstTokens[2];
379  if (token.empty())
380  all_fields_ok = false;
381  else if (token[0] == 'S')
383 
384  // Longitude:
385  token = lstTokens[3];
386  if (token.size() >= 5)
387  {
388  double lat =
389  100 * (token[0] - '0') + 10 * (token[1] - '0') + token[2] - '0';
390  lat += atof(&(token.c_str()[3])) / 60.0;
392  }
393  else
394  all_fields_ok = false;
395 
396  // E/W:
397  token = lstTokens[4];
398  if (token.empty())
399  all_fields_ok = false;
400  else if (token[0] == 'W')
402 
403  if (lstTokens.size() >= 7)
404  {
405  // Time:
406  token = lstTokens[5];
407  if (token.size() >= 6)
408  {
409  gll.fields.UTCTime.hour =
410  10 * (token[0] - '0') + token[1] - '0';
411  gll.fields.UTCTime.minute =
412  10 * (token[2] - '0') + token[3] - '0';
413  gll.fields.UTCTime.sec = atof(&(token.c_str()[4]));
414  }
415  else
416  all_fields_ok = false;
417 
418  // Valid?
419  token = lstTokens[6];
420  if (token.empty())
421  all_fields_ok = false;
422  else
423  gll.fields.validity_char = token.c_str()[0];
424  }
425 
426  if (all_fields_ok)
427  {
428  out_obs.setMsg(gll);
430  out_obs.timestamp =
431  gll.fields.UTCTime.getAsTimestamp(last_known_date);
432  last_known_time = out_obs.timestamp;
433  out_obs.has_satellite_timestamp = true;
434  }
435  parsed_ok = all_fields_ok;
436  }
437  else if (lstTokens[0] == "$GPVTG" && lstTokens.size() >= 9)
438  {
439  // ---------------------------------------------
440  // GPVTG
441  // ---------------------------------------------
442  bool all_fields_ok = true;
443  std::string token;
444 
445  // Fill out the output structure:
447 
448  vtg.fields.true_track = atof(lstTokens[1].c_str());
449  vtg.fields.magnetic_track = atof(lstTokens[3].c_str());
450  vtg.fields.ground_speed_knots = atof(lstTokens[5].c_str());
451  vtg.fields.ground_speed_kmh = atof(lstTokens[7].c_str());
452 
453  if (lstTokens[2] != "T" || lstTokens[4] != "M" || lstTokens[6] != "N" ||
454  lstTokens[8] != "K")
455  all_fields_ok = false;
456 
457  if (all_fields_ok)
458  {
459  out_obs.setMsg(vtg);
461  out_obs.timestamp = last_known_time;
462  out_obs.has_satellite_timestamp = false;
463  }
464  parsed_ok = all_fields_ok;
465  }
466  else if (lstTokens[0] == "$GPZDA" && lstTokens.size() >= 5)
467  {
468  // ---------------------------------------------
469  // GPZDA
470  // ---------------------------------------------
471  bool all_fields_ok = true;
472  std::string token;
473 
474  // Fill out the output structure:
476  //$--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx
477  // hhmmss.ss = UTC
478  // xx = Day, 01 to 31
479  // xx = Month, 01 to 12
480  // xxxx = Year
481  // xx = Local zone description, 00 to +/- 13 hours
482  // xx = Local zone minutes description (same sign as hours)
483 
484  // Time:
485  token = lstTokens[1];
486  if (token.size() >= 6)
487  {
488  zda.fields.UTCTime.hour = 10 * (token[0] - '0') + token[1] - '0';
489  zda.fields.UTCTime.minute = 10 * (token[2] - '0') + token[3] - '0';
490  zda.fields.UTCTime.sec = atof(&(token.c_str()[4]));
491  }
492  else
493  all_fields_ok = false;
494 
495  // Day:
496  token = lstTokens[2];
497  if (!token.empty()) zda.fields.date_day = atoi(token.c_str());
498  // Month:
499  token = lstTokens[3];
500  if (!token.empty()) zda.fields.date_month = atoi(token.c_str());
501  // Year:
502  token = lstTokens[4];
503  if (!token.empty()) zda.fields.date_year = atoi(token.c_str());
504 
505  if (all_fields_ok)
506  {
507  out_obs.setMsg(zda);
509  try
510  {
511  out_obs.timestamp = zda.getDateTimeAsTimestamp();
512  last_known_date = zda.getDateAsTimestamp();
513  out_obs.has_satellite_timestamp = true;
514  last_known_time = out_obs.timestamp;
515  }
516  catch (...)
517  {
518  // Invalid date:
519  out_obs.timestamp = out_obs.originalReceivedTimestamp;
520  }
521  }
522  parsed_ok = all_fields_ok;
523  }
524  else
525  {
526  // other commands?
527  }
528 
529  return parsed_ok;
530 }
mrpt::obs::gnss::Message_NMEA_VTG::content_t::ground_speed_kmh
double ground_speed_kmh
Definition: gnss_messages_ascii_nmea.h:194
os.h
filesystem.h
mrpt::obs::gnss::Message_NMEA_RMC::content_t::validity_char
int8_t validity_char
This will be: 'A'=OK or 'V'=void.
Definition: gnss_messages_ascii_nmea.h:151
mrpt::obs::gnss::Message_NMEA_RMC::getDateAsTimestamp
mrpt::system::TTimeStamp getDateAsTimestamp() const
Build an MRPT timestamp with the year/month/day of this observation.
Definition: gnss_messages_ascii_nmea.cpp:176
mrpt::obs::gnss::Message_NMEA_VTG::fields
content_t fields
Message content, accesible by individual fields.
Definition: gnss_messages_ascii_nmea.h:198
mrpt::hwdrivers::CGPSInterface::parse_NMEA
static bool parse_NMEA(const std::string &cmd_line, mrpt::obs::CObservationGPS &out_obs, const bool verbose=false)
Parses one line of NMEA data from a GPS receiver, and writes the recognized fields (if any) into an o...
Definition: CGPSInterface_parser_NMEA.cpp:96
mrpt::obs::gnss::Message_NMEA_GGA::content_t::longitude_degrees
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
Definition: gnss_messages_ascii_nmea.h:39
s
GLdouble s
Definition: glext.h:3676
mrpt::obs::gnss::Message_NMEA_RMC::content_t::speed_knots
double speed_knots
Measured speed (in knots)
Definition: gnss_messages_ascii_nmea.h:157
mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_month
uint8_t date_month
Definition: gnss_messages_ascii_nmea.h:161
mrpt::obs::gnss::Message_NMEA_ZDA::getDateAsTimestamp
mrpt::system::TTimeStamp getDateAsTimestamp() const
Build an MRPT timestamp with the year/month/day of this observation.
Definition: gnss_messages_ascii_nmea.cpp:275
mrpt::obs::gnss::Message_NMEA_VTG::content_t::ground_speed_knots
double ground_speed_knots
Definition: gnss_messages_ascii_nmea.h:194
mrpt::obs::gnss::Message_NMEA_GGA
NMEA datum: GGA.
Definition: gnss_messages_ascii_nmea.h:23
mrpt::obs::gnss::Message_NMEA_GGA::fields
content_t fields
Message content, accesible by individual fields.
Definition: gnss_messages_ascii_nmea.h:67
mrpt::obs::gnss::Message_NMEA_GLL::fields
content_t fields
Message content, accesible by individual fields.
Definition: gnss_messages_ascii_nmea.h:130
mrpt::obs::gnss::Message_NMEA_ZDA::fields
content_t fields
Message content, accesible by individual fields.
Definition: gnss_messages_ascii_nmea.h:227
mrpt::obs::gnss::Message_NMEA_ZDA::getDateTimeAsTimestamp
mrpt::system::TTimeStamp getDateTimeAsTimestamp() const
Build an MRPT UTC timestamp with the year/month/day + hour/minute/sec of this observation.
Definition: gnss_messages_ascii_nmea.cpp:268
mrpt::system::now
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
Definition: datetime.h:75
mrpt::obs::gnss::Message_NMEA_ZDA
NMEA datum: ZDA.
Definition: gnss_messages_ascii_nmea.h:205
mrpt::hwdrivers
Contains classes for various device interfaces.
Definition: C2DRangeFinderAbstract.h:22
mrpt::obs::gnss::Message_NMEA_GGA::content_t::HDOP
float HDOP
The HDOP (Horizontal Dilution of Precision) as returned by the sensor.
Definition: gnss_messages_ascii_nmea.h:62
mrpt::obs::CObservationGPS::originalReceivedTimestamp
mrpt::system::TTimeStamp originalReceivedTimestamp
The local computer-based timestamp based on the reception of the message in the computer.
Definition: CObservationGPS.h:85
mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_year
uint16_t date_year
2000-...
Definition: gnss_messages_ascii_nmea.h:223
uint8_t
unsigned char uint8_t
Definition: rptypes.h:41
mrpt::obs::gnss::Message_NMEA_GLL::content_t::validity_char
int8_t validity_char
This will be: 'A'=OK or 'V'=void.
Definition: gnss_messages_ascii_nmea.h:126
mrpt::system::tokenize
void tokenize(const std::string &inString, const std::string &inDelimiters, OUT_CONTAINER &outTokens, bool skipBlankTokens=true) noexcept
Tokenizes a string according to a set of delimiting characters.
mrpt::obs
This namespace contains representation of robot actions and observations.
Definition: CParticleFilter.h:17
mrpt::obs::CObservation::timestamp
mrpt::system::TTimeStamp timestamp
The associated UTC time-stamp.
Definition: CObservation.h:60
mrpt::obs::gnss::Message_NMEA_RMC::content_t::magnetic_dir
double magnetic_dir
Magnetic variation direction (East:+, West:-)
Definition: gnss_messages_ascii_nmea.h:163
mrpt::system::TTimeStamp
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:31
mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_day
uint8_t date_day
1-31
Definition: gnss_messages_ascii_nmea.h:219
mrpt::obs::gnss::Message_NMEA_GGA::content_t::latitude_degrees
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
Definition: gnss_messages_ascii_nmea.h:37
mrpt::obs::gnss::UTC_time::getAsTimestamp
mrpt::system::TTimeStamp getAsTimestamp(const mrpt::system::TTimeStamp &date) const
Build an MRPT timestamp with the hour/minute/sec of this structure and the date from the given timest...
Definition: gnss_messages_common.cpp:186
mrpt::obs::gnss::Message_NMEA_RMC::content_t::direction_degrees
double direction_degrees
Measured speed direction (in degrees)
Definition: gnss_messages_ascii_nmea.h:159
val
int val
Definition: mrpt_jpeglib.h:955
mrpt::obs::gnss::Message_NMEA_RMC::content_t::latitude_degrees
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
Definition: gnss_messages_ascii_nmea.h:153
mrpt::obs::gnss::Message_NMEA_GLL::content_t::longitude_degrees
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
Definition: gnss_messages_ascii_nmea.h:124
mrpt::obs::gnss::Message_NMEA_GGA::content_t::satellitesUsed
uint32_t satellitesUsed
The number of satelites used to compute this estimation.
Definition: gnss_messages_ascii_nmea.h:56
mrpt::obs::gnss::UTC_time::hour
uint8_t hour
Definition: gnss_messages_common.h:172
mrpt::obs::gnss::Message_NMEA_RMC::content_t::positioning_mode
char positioning_mode
'A': Autonomous, 'D': Differential, 'N': Not valid, 'E': Estimated, 'M': Manual
Definition: gnss_messages_ascii_nmea.h:166
mrpt::obs::gnss::Message_NMEA_RMC::content_t::longitude_degrees
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
Definition: gnss_messages_ascii_nmea.h:155
mrpt::obs::gnss::UTC_time::minute
uint8_t minute
Definition: gnss_messages_common.h:173
mrpt::obs::gnss::Message_NMEA_RMC::fields
content_t fields
Message content, accesible by individual fields.
Definition: gnss_messages_ascii_nmea.h:170
mrpt::obs::gnss::Message_NMEA_GLL::content_t::latitude_degrees
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
Definition: gnss_messages_ascii_nmea.h:122
mrpt::obs::gnss::Message_NMEA_GGA::content_t::corrected_orthometric_altitude
double corrected_orthometric_altitude
The corrected (only for TopCon mmGPS) orthometric altitude, in meters mmGPS(A+B).
Definition: gnss_messages_ascii_nmea.h:54
mrpt::obs::gnss::Message_NMEA_GGA::content_t::altitude_meters
double altitude_meters
The measured altitude, in meters (A).
Definition: gnss_messages_ascii_nmea.h:46
mrpt::obs::gnss::Message_NMEA_GGA::content_t::UTCTime
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
Definition: gnss_messages_ascii_nmea.h:35
MAX_NMEA_LINE_LENGTH
const size_t MAX_NMEA_LINE_LENGTH
Definition: CGPSInterface_parser_NMEA.cpp:22
mrpt::obs::gnss::lat
double lat
[deg], [deg], hgt over sea level[m]
Definition: gnss_messages_novatel.h:230
mrpt::obs::gnss::Message_NMEA_GGA::content_t::thereis_HDOP
bool thereis_HDOP
This states whether to take into account the value in the HDOP field.
Definition: gnss_messages_ascii_nmea.h:59
mrpt::obs::gnss::Message_NMEA_VTG::content_t::true_track
double true_track
Degrees.
Definition: gnss_messages_ascii_nmea.h:193
mrpt::obs::gnss::Message_NMEA_GGA::content_t::orthometric_altitude
double orthometric_altitude
The measured orthometric altitude, in meters (A)+(B).
Definition: gnss_messages_ascii_nmea.h:51
mrpt::obs::gnss::Message_NMEA_GLL
NMEA datum: GLL.
Definition: gnss_messages_ascii_nmea.h:108
mrpt::obs::gnss::Message_NMEA_ZDA::content_t::UTCTime
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
Definition: gnss_messages_ascii_nmea.h:217
mrpt::obs::CObservationGPS
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...
Definition: CObservationGPS.h:70
mrpt::obs::gnss::Message_NMEA_GGA::content_t::geoidal_distance
double geoidal_distance
Undulation: Difference between the measured altitude and the geoid, in meters (B).
Definition: gnss_messages_ascii_nmea.h:49
mrpt::obs::CObservationGPS::has_satellite_timestamp
bool has_satellite_timestamp
If true, CObservation::timestamp has been generated from accurate satellite clock.
Definition: CObservationGPS.h:89
mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_year
uint8_t date_year
Definition: gnss_messages_ascii_nmea.h:161
mrpt::obs::gnss::Message_NMEA_RMC::content_t::date_day
uint8_t date_day
Date: day (1-31), month (1-12), two-digits year (00-99)
Definition: gnss_messages_ascii_nmea.h:161
mrpt::obs::CObservationGPS::setMsg
void setMsg(const MSG_CLASS &msg)
Stores a message in the list messages, making a copy of the passed object.
Definition: CObservationGPS.h:106
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::system::trim
std::string trim(const std::string &str)
Removes leading and trailing spaces.
Definition: string_utils.cpp:270
mrpt::obs::gnss::Message_NMEA_RMC::content_t::UTCTime
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
Definition: gnss_messages_ascii_nmea.h:149
mrpt::obs::gnss::Message_NMEA_RMC
NMEA datum: RMC.
Definition: gnss_messages_ascii_nmea.h:137
mrpt::hwdrivers::CGPSInterface::implement_parser_NMEA
bool implement_parser_NMEA(size_t &out_minimum_rx_buf_to_decide)
Definition: CGPSInterface_parser_NMEA.cpp:24
mrpt::obs::gnss::Message_NMEA_ZDA::content_t::date_month
uint8_t date_month
1-12
Definition: gnss_messages_ascii_nmea.h:221
mrpt::obs::gnss::Message_NMEA_GGA::content_t::fix_quality
uint8_t fix_quality
NMEA standard values: 0 = invalid, 1 = GPS fix (SPS), 2 = DGPS fix, 3 = PPS fix, 4 = Real Time Kinema...
Definition: gnss_messages_ascii_nmea.h:44
CGPSInterface.h
mrpt::obs::gnss::Message_NMEA_GLL::content_t::UTCTime
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
Definition: gnss_messages_ascii_nmea.h:120
mrpt::obs::gnss::Message_NMEA_VTG
NMEA datum: VTG.
Definition: gnss_messages_ascii_nmea.h:181
mrpt::system
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
Definition: math_frwds.h:25
mrpt::obs::gnss::Message_NMEA_VTG::content_t::magnetic_track
double magnetic_track
Definition: gnss_messages_ascii_nmea.h:193
hwdrivers-precomp.h
mrpt::obs::gnss::UTC_time::sec
double sec
Definition: gnss_messages_common.h:174



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST