parser_tests.cpp
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2017, Southwest Research Institute® (SwRI®)
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of Southwest Research Institute® (SwRI®) nor the
14 // names of its contributors may be used to endorse or promote products
15 // derived from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL SOUTHWEST RESEARCH INSTITUTE BE LIABLE FOR ANY
21 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 //
28 // *****************************************************************************
29 
36 
37 #include <gtest/gtest.h>
42 
43 TEST(ParserTestSuite, testBestposAsciiParsing)
44 {
46  std::string bestpos_str = "#BESTPOSA,ICOM1,0,87.5,FINESTEERING,1956,157432.000,00000800,7145,6938;"
47  "SOL_COMPUTED,SINGLE,29.44391220792,-98.61476921244,261.4344,-26.0000,WGS84,2.1382,"
48  "3.1092,4.0429,\"\",0.000,0.000,8,8,8,8,0,06,00,03*ecf2202b\r\n"
49  "#BESTPOSA,COM1,0,83.5,FINESTEERING,1419,336148.000,02000040,6145,2724;SOL_COMPUTED,SINGLE,"
50  "51.11636418888,-114.03832502118,1064.9520,-16.2712,WGS84,1.6961,1.3636,3.6449,\"\","
51  "0.000,0.000,8,8,8,8,0,0,0,06,0,03*f181ad10\r\n"
52  "#BESTPOSA,COM1,0,78.5,FINESTEERING,1419,336208.000,02000040,6145,2724;SOL_COMPUTED,"
53  "NARROW_INT,51.11635910984,-114.03833105168,1063.8416,-16.2712,WGS84,0.0135,0.0084,"
54  "0.0172,\"AAAA\",1.000,0.000,8,8,8,8,0,01,0,03*072421c0\r\n";
55  std::string extracted_str;
56 
58 
59  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
60  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
61  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
62  std::string remaining;
63 
64  extractor.ExtractCompleteMessages(bestpos_str, nmea_sentences, novatel_sentences,
65  binary_messages, remaining);
66 
67  ASSERT_EQ(0, nmea_sentences.size());
68  ASSERT_EQ(0, binary_messages.size());
69  ASSERT_EQ(3, novatel_sentences.size());
70 
71  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
72 
73  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
74 
75  novatel_gps_msgs::NovatelPositionPtr msg = parser.ParseAscii(sentence);
76 
77  ASSERT_NE(msg.get(), nullptr);
78 
79  ASSERT_EQ("SOL_COMPUTED", msg->solution_status);
80  ASSERT_DOUBLE_EQ(29.44391220792, msg->lat);
81  ASSERT_DOUBLE_EQ(-98.61476921244, msg->lon);
82 }
83 
84 TEST(ParserTestSuite, testCorrimudataAsciiParsing)
85 {
87  std::string sentence_str = "#CORRIMUDATAA,COM1,0,77.5,FINESTEERING,1769,237601.000,02000020,"
88  "bdba,12597;1769,237601.000000000,-0.000003356,0.000002872,0.000001398,0.000151593,"
89  "0.000038348,-0.000078820*e370e1d9\r\n";
90  std::string extracted_str;
91 
93 
94  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
95  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
96  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
97  std::string remaining;
98 
99  extractor.ExtractCompleteMessages(sentence_str, nmea_sentences, novatel_sentences,
100  binary_messages, remaining);
101 
102  ASSERT_EQ(0, nmea_sentences.size());
103  ASSERT_EQ(0, binary_messages.size());
104  ASSERT_EQ(1, novatel_sentences.size());
105 
106  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
107 
108  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
109 
110  novatel_gps_msgs::NovatelCorrectedImuDataPtr msg = parser.ParseAscii(sentence);
111 
112  ASSERT_NE(msg.get(), nullptr);
113  ASSERT_EQ(1769, msg->gps_week_num);
114  ASSERT_DOUBLE_EQ(237601.0, msg->gps_seconds);
115  ASSERT_DOUBLE_EQ(-0.000003356, msg->pitch_rate);
116  ASSERT_DOUBLE_EQ(0.000002872, msg->roll_rate);
117  ASSERT_DOUBLE_EQ(0.000001398, msg->yaw_rate);
118  ASSERT_DOUBLE_EQ(0.000151593, msg->lateral_acceleration);
119  ASSERT_DOUBLE_EQ(0.000038348, msg->longitudinal_acceleration);
120  ASSERT_DOUBLE_EQ(-0.00007882, msg->vertical_acceleration);
121 }
122 
123 TEST(ParserTestSuite, testGpgsvParsing)
124 {
126  std::string sentence_str = "$GPGSV,3,3,11,12,07,00.,32,13,03,227,36,22,0.,041,*4A\r\n";
127  std::string extracted_str;
128 
130 
131  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
132  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
133  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
134  std::string remaining;
135 
136  extractor.ExtractCompleteMessages(sentence_str, nmea_sentences, novatel_sentences,
137  binary_messages, remaining);
138 
139  ASSERT_EQ(1, nmea_sentences.size());
140  ASSERT_EQ(0, binary_messages.size());
141  ASSERT_EQ(0, novatel_sentences.size());
142 
143  novatel_gps_driver::NmeaSentence sentence = nmea_sentences.front();
144 
145  ASSERT_EQ(parser.GetMessageName(), sentence.id);
146  ASSERT_FALSE(sentence.body.empty());
147 
148  novatel_gps_msgs::GpgsvPtr msg = parser.ParseAscii(sentence);
149 
150  ASSERT_NE(msg.get(), nullptr);
151 
152  ASSERT_EQ(3, msg->n_msgs);
153  ASSERT_EQ(3, msg->msg_number);
154  ASSERT_EQ(3, msg->satellites.size());
155  ASSERT_EQ(11, msg->n_satellites);
156  ASSERT_EQ(12, msg->satellites[0].prn);
157  ASSERT_EQ(7, msg->satellites[0].elevation);
158  ASSERT_EQ(0, msg->satellites[0].azimuth);
159  ASSERT_EQ(32, msg->satellites[0].snr);
160  ASSERT_EQ(13, msg->satellites[1].prn);
161  ASSERT_EQ(3, msg->satellites[1].elevation);
162  ASSERT_EQ(227, msg->satellites[1].azimuth);
163  ASSERT_EQ(36, msg->satellites[1].snr);
164  ASSERT_EQ(22, msg->satellites[2].prn);
165  ASSERT_EQ(0, msg->satellites[2].elevation);
166  ASSERT_EQ(41, msg->satellites[2].azimuth);
167  ASSERT_EQ(-1, msg->satellites[2].snr);
168 }
169 
170 TEST(ParserTestSuite, testInscovAsciiParsing)
171 {
173  std::string sentence_str = "#INSCOVA,COM1,0,66.5,FINESTEERING,1959,336623.000,00000000,"
174  "f078,13754;1959,336623.000000000,0.0211295047125775,-0.0018214277429204,-0.0016153828661881,"
175  "-0.0018214277429204,0.0174981375607521,0.0049878113409426,-0.0016153828661881,"
176  "0.0049878113409426,0.0285474196118174,0.0000332609098342,-0.0000003409117564,"
177  "0.0000018468158360,-0.0000003409117564,0.0000340563145112,-0.0000136598582783,"
178  "0.0000018468158360,-0.0000136598582783,0.1515644215075894,0.0000008850783906,"
179  "0.0000000006144488,-0.0000001633832672,0.0000000006144488,0.0000010749675168,"
180  "0.0000000004985751,-0.0000001633832672,0.0000000004985751,0.0000009343218169*bc5352ab\r\n";
181  std::string extracted_str;
182 
184 
185  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
186  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
187  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
188  std::string remaining;
189 
190  extractor.ExtractCompleteMessages(sentence_str, nmea_sentences, novatel_sentences,
191  binary_messages, remaining);
192 
193  ASSERT_EQ(0, nmea_sentences.size());
194  ASSERT_EQ(0, binary_messages.size());
195  ASSERT_EQ(1, novatel_sentences.size());
196 
197  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
198 
199  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
200 
201  novatel_gps_msgs::InscovPtr msg = parser.ParseAscii(sentence);
202 
203  ASSERT_NE(msg.get(), nullptr);
204 
205  ASSERT_EQ(1959, msg->week);
206  ASSERT_DOUBLE_EQ(336623.0, msg->seconds);
207  ASSERT_DOUBLE_EQ(0.0211295047125775, msg->position_covariance[0]);
208  ASSERT_DOUBLE_EQ(0.0000009343218169, msg->velocity_covariance[8]);
209 }
210 
211 TEST(ParserTestSuite, testInspvaAsciiParsing)
212 {
214  std::string sentence_str = "#INSPVAA,COM1,0,31.0,FINESTEERING,1264,144088.000,02040000,"
215  "5615,1541;1264,144088.002284950,51.116827527,-114.037738908,401.191547167,354.846489850,"
216  "108.429407241,-10.837482850,1.116219952,-3.476059035,7.372686190,INS_ALIGNMENT_COMPLETE*a2913d36\r\n";
217  std::string extracted_str;
218 
220 
221  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
222  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
223  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
224  std::string remaining;
225 
226  extractor.ExtractCompleteMessages(sentence_str, nmea_sentences, novatel_sentences,
227  binary_messages, remaining);
228 
229  ASSERT_EQ(0, nmea_sentences.size());
230  ASSERT_EQ(0, binary_messages.size());
231  ASSERT_EQ(1, novatel_sentences.size());
232 
233  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
234 
235  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
236 
237  novatel_gps_msgs::InspvaPtr msg = parser.ParseAscii(sentence);
238 
239  ASSERT_NE(msg.get(), nullptr);
240 
241  ASSERT_EQ(1264, msg->week);
242  ASSERT_DOUBLE_EQ(144088.002284950, msg->seconds);
243  ASSERT_DOUBLE_EQ(51.116827527, msg->latitude);
244  ASSERT_DOUBLE_EQ(-114.037738908, msg->longitude);
245  ASSERT_DOUBLE_EQ(401.191547167, msg->height);
246  ASSERT_DOUBLE_EQ(354.846489850, msg->north_velocity);
247  ASSERT_DOUBLE_EQ(108.429407241, msg->east_velocity);
248  ASSERT_DOUBLE_EQ(-10.837482850, msg->up_velocity);
249  ASSERT_DOUBLE_EQ(1.116219952, msg->roll);
250  ASSERT_DOUBLE_EQ(-3.476059035, msg->pitch);
251  ASSERT_DOUBLE_EQ(7.372686190, msg->azimuth);
252  ASSERT_EQ("INS_ALIGNMENT_COMPLETE", msg->status);
253 }
254 
255 TEST(ParserTestSuite, testInsstdevAsciiParsing)
256 {
258  std::string sentence_str = "#INSSTDEVA,COM1,0,78.0,FINESTEERING,1907,233990.000,02000020,"
259  "3e6d,32768;0.4372,0.3139,0.7547,0.0015,0.0015,0.0014,3.7503,3.7534,5.1857,26000005,"
260  "0,0,01ffd1bf,0*3deca7d2\r\n";
261  std::string extracted_str;
262 
264 
265  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
266  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
267  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
268  std::string remaining;
269 
270  extractor.ExtractCompleteMessages(sentence_str, nmea_sentences, novatel_sentences,
271  binary_messages, remaining);
272 
273  ASSERT_EQ(0, nmea_sentences.size());
274  ASSERT_EQ(0, binary_messages.size());
275  ASSERT_EQ(1, novatel_sentences.size());
276 
277  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
278 
279  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
280 
281  novatel_gps_msgs::InsstdevPtr msg = parser.ParseAscii(sentence);
282 
283  ASSERT_NE(msg.get(), nullptr);
284 
285  ASSERT_FLOAT_EQ(0.4372, msg->latitude_dev);
286  ASSERT_FLOAT_EQ(0.3139, msg->longitude_dev);
287  ASSERT_FLOAT_EQ(0.7547, msg->height_dev);
288  ASSERT_FLOAT_EQ(0.0015, msg->north_velocity_dev);
289  ASSERT_FLOAT_EQ(0.0015, msg->east_velocity_dev);
290  ASSERT_FLOAT_EQ(0.0014, msg->up_velocity_dev);
291  ASSERT_FLOAT_EQ(3.7503, msg->roll_dev);
292  ASSERT_FLOAT_EQ(3.7534, msg->pitch_dev);
293  ASSERT_FLOAT_EQ(5.1857, msg->azimuth_dev);
294  ASSERT_EQ(26000005, msg->extended_solution_status.original_mask);
295 }
296 
297 TEST(ParserTestSuite, testBestxyzAsciiParsing)
298 {
300  std::string bestxyz_str = "#BESTXYZA,COM1,0,55.0,FINESTEERING,1419,340033.000,02000040,d821,2724;"
301  "SOL_COMPUTED,NARROW_INT,-1634531.5683,-3664618.0326,4942496.3270,0.0099,"
302  "0.0219,0.0115,SOL_COMPUTED,NARROW_INT,0.0011,-0.0049,-0.0001,0.0199,0.0439,"
303  "0.0230,\"AAAA\",0.250,1.000,0.000,12,11,11,11,0,01,0,33*1fe2f509\r\n";
304 
305  std::string extracted_str;
306 
308 
309  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
310  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
311  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
312  std::string remaining;
313 
314  extractor.ExtractCompleteMessages(bestxyz_str, nmea_sentences, novatel_sentences,
315  binary_messages, remaining);
316 
317  ASSERT_EQ(0, nmea_sentences.size());
318  ASSERT_EQ(0, binary_messages.size());
319  ASSERT_EQ(1, novatel_sentences.size());
320 
321  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
322 
323  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
324 
325  novatel_gps_msgs::NovatelXYZPtr msg = parser.ParseAscii(sentence);
326 
327  ASSERT_NE(msg.get(), nullptr);
328 
329  ASSERT_EQ("SOL_COMPUTED", msg->solution_status);
330  ASSERT_EQ("NARROW_INT", msg->position_type);
331  ASSERT_DOUBLE_EQ(-1634531.5683, msg->x);
332  ASSERT_DOUBLE_EQ(-3664618.0326, msg->y);
333  ASSERT_DOUBLE_EQ(4942496.3270, msg->z);
334  ASSERT_FLOAT_EQ(0.0099, msg->x_sigma);
335  ASSERT_FLOAT_EQ(0.0219, msg->y_sigma);
336  ASSERT_FLOAT_EQ(0.0115, msg->z_sigma);
337  ASSERT_EQ("SOL_COMPUTED", msg->velocity_solution_status);
338  ASSERT_EQ("NARROW_INT", msg->velocity_type);
339  ASSERT_DOUBLE_EQ(0.0011, msg->x_vel);
340  ASSERT_DOUBLE_EQ(-0.0049, msg->y_vel);
341  ASSERT_DOUBLE_EQ(-0.0001, msg->z_vel);
342  ASSERT_FLOAT_EQ(0.0199, msg->x_vel_sigma);
343  ASSERT_FLOAT_EQ(0.0439, msg->y_vel_sigma);
344  ASSERT_FLOAT_EQ(0.0230, msg->z_vel_sigma);
345  ASSERT_EQ("\"AAAA\"", msg->base_station_id);
346  ASSERT_FLOAT_EQ(0.250, msg->velocity_latency);
347  ASSERT_FLOAT_EQ(1.000, msg->diff_age);
348  ASSERT_FLOAT_EQ(0.000, msg->solution_age);
349  ASSERT_EQ(12, msg->num_satellites_tracked);
350  ASSERT_EQ(11, msg->num_satellites_used_in_solution);
351  ASSERT_EQ(11, msg->num_gps_and_glonass_l1_used_in_solution);
352  ASSERT_EQ(11, msg->num_gps_and_glonass_l1_and_l2_used_in_solution);
353  ASSERT_EQ(1, msg->extended_solution_status.original_mask);
354 }
355 
356 TEST(ParserTestSuite, testHeading2AsciiParsing)
357 {
359  std::string heading2_str = "#HEADING2A,COM1,0,39.5,FINESTEERING,1622,422892.200,02040000,f9bf,6521;"
360  "SOL_COMPUTED,NARROW_INT,0.927607417,178.347869873,-1.3037414550,0,0.261901051,0.391376048,"
361  "\"R222\",\"AAAA\",18,17,17,16,0,01,0,33*8c48d77c\r\n";
362 
363  std::string extracted_str;
364 
366 
367  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
368  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
369  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
370  std::string remaining;
371 
372  extractor.ExtractCompleteMessages(heading2_str, nmea_sentences, novatel_sentences,
373  binary_messages, remaining);
374 
375  ASSERT_EQ(0, nmea_sentences.size());
376  ASSERT_EQ(0, binary_messages.size());
377  ASSERT_EQ(1, novatel_sentences.size());
378 
379  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
380 
381  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
382 
383  novatel_gps_msgs::NovatelHeading2Ptr msg = parser.ParseAscii(sentence);
384 
385  ASSERT_NE(msg.get(), nullptr);
386 
387  ASSERT_EQ("SOL_COMPUTED", msg->solution_status);
388  ASSERT_EQ("NARROW_INT", msg->position_type);
389  ASSERT_FLOAT_EQ(0.927607417, msg->baseline_length);
390  ASSERT_FLOAT_EQ(178.347869873, msg->heading);
391  ASSERT_FLOAT_EQ(-1.3037414550, msg->pitch);
392  ASSERT_FLOAT_EQ(0.261901051, msg->heading_sigma);
393  ASSERT_FLOAT_EQ(0.391376048, msg->pitch_sigma);
394  ASSERT_EQ("\"R222\"", msg->rover_station_id);
395  ASSERT_EQ("\"AAAA\"", msg->master_station_id);
396  ASSERT_EQ(18, msg->num_satellites_tracked);
397  ASSERT_EQ(17, msg->num_satellites_used_in_solution);
398  ASSERT_EQ(17, msg->num_satellites_above_elevation_mask_angle);
399  ASSERT_EQ(16, msg->num_satellites_above_elevation_mask_angle_l2);
400  ASSERT_EQ(0, msg->solution_source);
401  ASSERT_EQ(1, msg->extended_solution_status.original_mask);
402 }
403 
404 TEST(ParserTestSuite, testDualAntennaHeadingAsciiParsing)
405 {
407  std::string heading_str = "#DUALANTENNAHEADINGA,UNKNOWN,0,66.5,FINESTEERING,1949,575614.000,02000000,d426,32768;"
408  "SOL_COMPUTED,NARROW_INT,-1.000000000,255.538528442,0.006041416,0.0,0.043859947,0.052394450,"
409  "\"J56X\",24,18,18,17,04,01,00,33*1f082ec5\r\n";
410 
411  std::string extracted_str;
412 
414 
415  std::vector<novatel_gps_driver::NmeaSentence> nmea_sentences;
416  std::vector<novatel_gps_driver::NovatelSentence> novatel_sentences;
417  std::vector<novatel_gps_driver::BinaryMessage> binary_messages;
418  std::string remaining;
419 
420  extractor.ExtractCompleteMessages(heading_str, nmea_sentences, novatel_sentences,
421  binary_messages, remaining);
422 
423  ASSERT_EQ(0, nmea_sentences.size());
424  ASSERT_EQ(0, binary_messages.size());
425  ASSERT_EQ(1, novatel_sentences.size());
426 
427  novatel_gps_driver::NovatelSentence sentence = novatel_sentences.front();
428 
429  ASSERT_EQ(parser.GetMessageName() + "A", sentence.id);
430 
431  novatel_gps_msgs::NovatelDualAntennaHeadingPtr msg = parser.ParseAscii(sentence);
432 
433  ASSERT_NE(msg.get(), nullptr);
434 
435  ASSERT_EQ("SOL_COMPUTED", msg->solution_status);
436  ASSERT_EQ("NARROW_INT", msg->position_type);
437  ASSERT_FLOAT_EQ(-1.000000000, msg->baseline_length);
438  ASSERT_FLOAT_EQ(255.538528442, msg->heading);
439  ASSERT_FLOAT_EQ(0.006041416, msg->pitch);
440  ASSERT_FLOAT_EQ(0.043859947, msg->heading_sigma);
441  ASSERT_FLOAT_EQ(0.052394450, msg->pitch_sigma);
442  ASSERT_EQ("\"J56X\"", msg->station_id);
443  ASSERT_EQ(24, msg->num_satellites_tracked);
444  ASSERT_EQ(18, msg->num_satellites_used_in_solution);
445  ASSERT_EQ(18, msg->num_satellites_above_elevation_mask_angle);
446  ASSERT_EQ(17, msg->num_satellites_above_elevation_mask_angle_l2);
447  ASSERT_EQ(1, msg->solution_source);
448  ASSERT_EQ(1, msg->extended_solution_status.original_mask);
449 }
450 
451 int main(int argc, char **argv)
452 {
453  testing::InitGoogleTest(&argc, argv);
454 
455  return RUN_ALL_TESTS();
456 }
novatel_gps_msgs::InsstdevPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: insstdev.cpp:76
msg
const std::string GetMessageName() const override
Definition: gpgsv.cpp:40
const std::string GetMessageName() const override
Definition: bestxyz.cpp:45
const std::string GetMessageName() const override
Definition: heading2.cpp:45
const std::string GetMessageName() const override
Definition: inscov.cpp:41
novatel_gps_msgs::NovatelDualAntennaHeadingPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
novatel_gps_msgs::InspvaPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: inspva.cpp:120
TEST(ParserTestSuite, testBestposAsciiParsing)
novatel_gps_msgs::NovatelPositionPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: bestpos.cpp:110
const std::string GetMessageName() const override
Definition: insstdev.cpp:41
novatel_gps_msgs::InscovPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: inscov.cpp:79
const std::string GetMessageName() const override
Definition: corrimudata.cpp:41
novatel_gps_msgs::NovatelHeading2Ptr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: heading2.cpp:115
novatel_gps_msgs::GpgsvPtr ParseAscii(const NmeaSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: gpgsv.cpp:45
const std::string GetMessageName() const override
Definition: inspva.cpp:41
parser
int main(int argc, char **argv)
novatel_gps_msgs::NovatelCorrectedImuDataPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: corrimudata.cpp:73
bool ExtractCompleteMessages(const std::string input, std::vector< NmeaSentence > &nmea_sentences, std::vector< NovatelSentence > &novatel_sentences, std::vector< BinaryMessage > &binary_messages, std::string &remaining, bool keep_nmea_container=false)
Extracts messages from a buffer of NovAtel data.
novatel_gps_msgs::NovatelXYZPtr ParseAscii(const NovatelSentence &sentence) override
Converts sentence into a ROS message pointer and returns it.
Definition: bestxyz.cpp:137
const std::string GetMessageName() const override
Definition: bestpos.cpp:45
const std::string GetMessageName() const override


novatel_gps_driver
Author(s):
autogenerated on Wed Jul 3 2019 19:36:46