Go to the documentation of this file.
11 #include <gtest/gtest.h>
25 const char* test_cmd =
26 "$GPGGA,101830.00,3649.76162994,N,00224.53709052,W,2,08,1.1,9.3,M,"
30 EXPECT_TRUE(parse_ret) <<
"Failed parse of: " << test_cmd << endl;
34 EXPECT_TRUE(msg !=
nullptr);
44 const char* test_cmd =
"$GPGGA,,,,,,0,,,,M,,M,,*6";
47 EXPECT_FALSE(parse_ret);
53 const char* test_cmd =
54 "$GPRMC,161229.487,A,3723.2475,N,12158.3416,W,0.13,309.62,120598, ,*10";
57 EXPECT_TRUE(parse_ret) <<
"Failed parse of: " << test_cmd << endl;
62 EXPECT_TRUE(msg !=
nullptr);
70 const char* test_cmd =
"$GPGLL,3723.2475,N,12158.3416,W,161229.487,A,A*41";
73 EXPECT_TRUE(parse_ret) <<
"Failed parse of: " << test_cmd << endl;
78 EXPECT_TRUE(msg !=
nullptr);
86 const char* test_cmd =
"$GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*48";
89 EXPECT_TRUE(parse_ret) <<
"Failed parse of: " << test_cmd << endl;
94 EXPECT_TRUE(msg !=
nullptr);
104 const char* test_cmd =
"$GPZDA,181813,14,10,2003,00,00*4F";
107 EXPECT_TRUE(parse_ret) <<
"Failed parse of: " << test_cmd << endl;
112 EXPECT_TRUE(msg !=
nullptr);
content_t fields
Message content, accesible by individual fields.
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...
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stre...
double ground_speed_knots
content_t fields
Message content, accesible by individual fields.
content_t fields
Message content, accesible by individual fields.
content_t fields
Message content, accesible by individual fields.
Contains classes for various device interfaces.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
uint16_t date_year
2000-...
This namespace contains representation of robot actions and observations.
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
content_t fields
Message content, accesible by individual fields.
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
MSG_CLASS * getMsgByClassPtr()
Like CObservationGPS::getMsgByClass() but returns a nullptr pointer if message is not found,...
double altitude_meters
The measured altitude, in meters (A).
TEST(CGPSInterface, parse_NMEA_GGA)
double true_track
Degrees.
UTC_time UTCTime
The GPS sensor measured timestamp (in UTC time)
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...
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 | |