INSTINCT Code Coverage Report


Directory: src/
File: Nodes/DataProvider/IMU/FileReader/VectorNavFile.cpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 866 958 90.4%
Functions: 18 22 81.8%
Branches: 1418 2782 51.0%

Line Branch Exec Source
1 // This file is part of INSTINCT, the INS Toolkit for Integrated
2 // Navigation Concepts and Training by the Institute of Navigation of
3 // the University of Stuttgart, Germany.
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9 #include "VectorNavFile.hpp"
10
11 #include <exception>
12
13 #include "util/Logger.hpp"
14 #include "Navigation/Transformations/CoordinateFrames.hpp"
15
16 #include "internal/NodeManager.hpp"
17 namespace nm = NAV::NodeManager;
18 #include "internal/FlowManager.hpp"
19
20 #include "NodeData/IMU/VectorNavBinaryOutput.hpp"
21 #include "Nodes/DataProvider/IMU/Sensors/VectorNavSensor.hpp"
22
23 158 NAV::VectorNavFile::VectorNavFile()
24
3/6
✓ Branch 1 taken 158 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 158 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 158 times.
✗ Branch 9 not taken.
158 : Imu(typeStatic())
25 {
26 LOG_TRACE("{}: called", name);
27
28 158 _hasConfig = true;
29 158 _guiConfigDefaultWindowSize = { 630, 466 };
30
31
4/8
✓ Branch 1 taken 158 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 158 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 158 times.
✓ Branch 9 taken 158 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
474 nm::CreateOutputPin(this, "Binary Output", Pin::Type::Flow, { NAV::VectorNavBinaryOutput::type() }, &VectorNavFile::pollData);
32 316 }
33
34 408 NAV::VectorNavFile::~VectorNavFile()
35 {
36 LOG_TRACE("{}: called", nameId());
37 408 }
38
39 270 std::string NAV::VectorNavFile::typeStatic()
40 {
41
1/2
✓ Branch 1 taken 270 times.
✗ Branch 2 not taken.
540 return "VectorNavFile";
42 }
43
44 std::string NAV::VectorNavFile::type() const
45 {
46 return typeStatic();
47 }
48
49 112 std::string NAV::VectorNavFile::category()
50 {
51
1/2
✓ Branch 1 taken 112 times.
✗ Branch 2 not taken.
224 return "Data Provider";
52 }
53
54 void NAV::VectorNavFile::guiConfig()
55 {
56 if (auto res = FileReader::guiConfig("Supported types (*.csv *.vnb){.csv,.vnb},.*", { ".csv", ".vnb" }, size_t(id), nameId()))
57 {
58 LOG_DEBUG("{}: Path changed to {}", nameId(), _path);
59 flow::ApplyChanges();
60 if (res == FileReader::PATH_CHANGED)
61 {
62 doReinitialize();
63 }
64 else
65 {
66 doDeinitialize();
67 }
68 }
69
70 Imu::guiConfig();
71
72 // Header info
73 if (ImGui::BeginTable(fmt::format("##VectorNavHeaders ({})", id.AsPointer()).c_str(), 6,
74 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_NoHostExtendX | ImGuiTableFlags_SizingFixedFit))
75 {
76 ImGui::TableSetupColumn("Time", ImGuiTableColumnFlags_WidthFixed);
77 ImGui::TableSetupColumn("IMU", ImGuiTableColumnFlags_WidthFixed);
78 ImGui::TableSetupColumn("GNSS1", ImGuiTableColumnFlags_WidthFixed);
79 ImGui::TableSetupColumn("Attitude", ImGuiTableColumnFlags_WidthFixed);
80 ImGui::TableSetupColumn("INS", ImGuiTableColumnFlags_WidthFixed);
81 ImGui::TableSetupColumn("GNSS2", ImGuiTableColumnFlags_WidthFixed);
82 ImGui::TableHeadersRow();
83
84 auto TextColored = [](int index, const char* label, bool enabled) {
85 ImGui::TableSetColumnIndex(index);
86 if (enabled)
87 {
88 ImGui::TextUnformatted(label);
89 }
90 else
91 {
92 ImGui::TextDisabled("%s", label);
93 }
94 };
95
96 for (size_t i = 0; i < 16; i++)
97 {
98 if (i < std::max({ /* VectorNavSensor::_binaryGroupCommon.size(), */ VectorNavSensor::_binaryGroupTime.size(), VectorNavSensor::_binaryGroupIMU.size(),
99 VectorNavSensor::_binaryGroupGNSS.size(), VectorNavSensor::_binaryGroupAttitude.size(), VectorNavSensor::_binaryGroupINS.size() }))
100 {
101 ImGui::TableNextRow();
102 }
103 if (i < VectorNavSensor::_binaryGroupTime.size())
104 {
105 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupTime.at(i);
106 TextColored(0, binaryGroupItem.name, _binaryOutputRegister.timeField & binaryGroupItem.flagsValue);
107 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
108 {
109 ImGui::BeginTooltip();
110 binaryGroupItem.tooltip();
111 ImGui::EndTooltip();
112 }
113 }
114 if (i < VectorNavSensor::_binaryGroupIMU.size())
115 {
116 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupIMU.at(i);
117 TextColored(1, binaryGroupItem.name, _binaryOutputRegister.imuField & binaryGroupItem.flagsValue);
118 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
119 {
120 ImGui::BeginTooltip();
121 binaryGroupItem.tooltip();
122 ImGui::EndTooltip();
123 }
124 }
125 if (i < VectorNavSensor::_binaryGroupGNSS.size())
126 {
127 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupGNSS.at(i);
128 TextColored(2, binaryGroupItem.name, _binaryOutputRegister.gpsField & binaryGroupItem.flagsValue);
129 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
130 {
131 ImGui::BeginTooltip();
132 binaryGroupItem.tooltip();
133 ImGui::EndTooltip();
134 }
135 }
136 if (i < VectorNavSensor::_binaryGroupAttitude.size())
137 {
138 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupAttitude.at(i);
139 TextColored(3, binaryGroupItem.name, _binaryOutputRegister.attitudeField & binaryGroupItem.flagsValue);
140 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
141 {
142 ImGui::BeginTooltip();
143 binaryGroupItem.tooltip();
144 ImGui::EndTooltip();
145 }
146 }
147 if (i < VectorNavSensor::_binaryGroupINS.size())
148 {
149 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupINS.at(i);
150 TextColored(4, binaryGroupItem.name, _binaryOutputRegister.insField & binaryGroupItem.flagsValue);
151 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
152 {
153 ImGui::BeginTooltip();
154 binaryGroupItem.tooltip();
155 ImGui::EndTooltip();
156 }
157 }
158 if (i < VectorNavSensor::_binaryGroupGNSS.size())
159 {
160 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupGNSS.at(i);
161 TextColored(5, binaryGroupItem.name, _binaryOutputRegister.gps2Field & binaryGroupItem.flagsValue);
162 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
163 {
164 ImGui::BeginTooltip();
165 binaryGroupItem.tooltip();
166 ImGui::EndTooltip();
167 }
168 }
169 }
170
171 ImGui::EndTable();
172 }
173 }
174
175 [[nodiscard]] json NAV::VectorNavFile::save() const
176 {
177 LOG_TRACE("{}: called", nameId());
178
179 json j;
180
181 j["FileReader"] = FileReader::save();
182 j["Imu"] = Imu::save();
183
184 return j;
185 }
186
187 46 void NAV::VectorNavFile::restore(json const& j)
188 {
189 LOG_TRACE("{}: called", nameId());
190
191
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
46 if (j.contains("FileReader"))
192 {
193 46 FileReader::restore(j.at("FileReader"));
194 }
195
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
46 if (j.contains("Imu"))
196 {
197 46 Imu::restore(j.at("Imu"));
198 }
199 46 }
200
201 46 bool NAV::VectorNavFile::initialize()
202 {
203 LOG_TRACE("{}: called", nameId());
204
205 46 return FileReader::initialize();
206 }
207
208 46 void NAV::VectorNavFile::deinitialize()
209 {
210 LOG_TRACE("{}: called", nameId());
211
212 46 FileReader::deinitialize();
213 46 }
214
215 92 bool NAV::VectorNavFile::resetNode()
216 {
217 92 FileReader::resetReader();
218
219 92 _messageCount = 0;
220
221 92 return true;
222 }
223
224 46 NAV::FileReader::FileType NAV::VectorNavFile::determineFileType()
225 {
226 LOG_TRACE("called");
227
228
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
46 std::filesystem::path filepath = getFilepath();
229
230
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
46 auto filestreamHeader = std::ifstream(filepath);
231
2/4
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 46 times.
✗ Branch 4 not taken.
46 if (good())
232 {
233 46 std::array<char, std::string_view("GpsCycle,GpsWeek,GpsTow").length()> buffer{};
234
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
92 filestreamHeader.read(buffer.data(), buffer.size());
235
1/2
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
46 filestreamHeader.close();
236
237
3/4
✓ Branch 1 taken 46 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 41 times.
✓ Branch 6 taken 5 times.
138 if (std::string(buffer.data(), buffer.size()).starts_with("Time [s]"))
238 {
239 41 _hasTimeColumn = true;
240 41 return FileType::ASCII;
241 }
242
2/4
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 5 times.
15 if (std::string(buffer.data(), buffer.size()).starts_with("GpsCycle,GpsWeek,GpsTow"))
243 {
244 _hasTimeColumn = false;
245 return FileType::ASCII;
246 }
247
248 5 return FileType::BINARY;
249 }
250
251 LOG_ERROR("Could not open file {}", filepath);
252 return FileType::NONE;
253 46 }
254
255 46 void NAV::VectorNavFile::readHeader()
256 {
257
2/2
✓ Branch 0 taken 41 times.
✓ Branch 1 taken 5 times.
46 if (_fileType == FileType::ASCII)
258 {
259 41 _binaryOutputRegister.timeField = vn::protocol::uart::TimeGroup::TIMEGROUP_NONE;
260 41 _binaryOutputRegister.imuField = vn::protocol::uart::ImuGroup::IMUGROUP_NONE;
261 41 _binaryOutputRegister.gpsField = vn::protocol::uart::GpsGroup::GPSGROUP_NONE;
262 41 _binaryOutputRegister.attitudeField = vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE;
263 41 _binaryOutputRegister.insField = vn::protocol::uart::InsGroup::INSGROUP_NONE;
264 41 _binaryOutputRegister.gps2Field = vn::protocol::uart::GpsGroup::GPSGROUP_NONE;
265
266 // Read header line
267 41 std::string line;
268
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 getline(line);
269 // Remove any starting non text characters
270
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 41 times.
✗ Branch 8 not taken.
82 line.erase(line.begin(), std::ranges::find_if(line, [](int ch) { return std::isalnum(ch); }));
271 // Convert line into stream
272
1/2
✓ Branch 2 taken 41 times.
✗ Branch 3 not taken.
41 std::stringstream lineStream(line);
273 41 std::string cell;
274
275 41 int column = 0;
276 // Split line at comma
277
4/6
✓ Branch 1 taken 2455 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2456 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2414 times.
✓ Branch 7 taken 42 times.
2458 while (std::getline(lineStream, cell, ','))
278 {
279
3/4
✓ Branch 0 taken 2414 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2252 times.
✓ Branch 3 taken 162 times.
2414 if (column++ > (_hasTimeColumn ? 3 : 2))
280 {
281 // Remove any trailing non text characters
282
2/4
✓ Branch 3 taken 2255 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 2251 times.
✗ Branch 8 not taken.
50980 cell.erase(std::ranges::find_if(cell, [](int ch) { return std::iscntrl(ch); }), cell.end());
283
284
1/2
✓ Branch 2 taken 2248 times.
✗ Branch 3 not taken.
2251 std::string group = cell.substr(0, cell.find("::")); // Extract the group (Time::TimeUTC::year -> 'Time')
285
286
1/2
✓ Branch 2 taken 2250 times.
✗ Branch 3 not taken.
2248 cell = cell.substr(cell.find("::") + 2); // Remove the group -> 'TimeUTC::year'
287
2/2
✓ Branch 1 taken 1868 times.
✓ Branch 2 taken 377 times.
2246 if (cell.find("::") != std::string::npos)
288 {
289
1/2
✓ Branch 2 taken 1866 times.
✗ Branch 3 not taken.
1868 cell = cell.substr(0, cell.find("::")); // Remove subgroups ('TimeUTC::year' -> 'TimeUTC')
290 }
291
2/2
✓ Branch 1 taken 247 times.
✓ Branch 2 taken 2000 times.
2242 if (cell.find(' ') != std::string::npos)
292 {
293
1/2
✓ Branch 2 taken 247 times.
✗ Branch 3 not taken.
247 cell = cell.substr(0, cell.find(' ')); // Remove everything after a blank, which is the unit ('TimeStartup [ns]' -> 'TimeStartup')
294 }
295
296 2247 bool identified = false;
297
3/4
✓ Branch 1 taken 2248 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 285 times.
✓ Branch 4 taken 1963 times.
2247 if (group == "Time")
298 {
299
1/2
✓ Branch 0 taken 1808 times.
✗ Branch 1 not taken.
1805 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupTime)
300 {
301
3/4
✓ Branch 1 taken 1803 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 283 times.
✓ Branch 4 taken 1520 times.
1808 if (cell == binaryGroupItem.name)
302 {
303
1/2
✓ Branch 1 taken 283 times.
✗ Branch 2 not taken.
283 _binaryOutputRegister.timeField |= static_cast<vn::protocol::uart::TimeGroup>(binaryGroupItem.flagsValue);
304 283 identified = true;
305 283 break;
306 }
307 }
308 }
309
3/4
✓ Branch 1 taken 1966 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 540 times.
✓ Branch 4 taken 1426 times.
1963 else if (group == "IMU")
310 {
311
2/2
✓ Branch 0 taken 3462 times.
✓ Branch 1 taken 6 times.
3468 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupIMU)
312 {
313
3/4
✓ Branch 1 taken 3464 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 520 times.
✓ Branch 4 taken 2944 times.
3462 if (cell == binaryGroupItem.name)
314 {
315
1/2
✓ Branch 1 taken 520 times.
✗ Branch 2 not taken.
520 _binaryOutputRegister.imuField |= static_cast<vn::protocol::uart::ImuGroup>(binaryGroupItem.flagsValue);
316 520 identified = true;
317 520 break;
318 }
319
3/4
✓ Branch 1 taken 2948 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 20 times.
✓ Branch 4 taken 2928 times.
2944 if (cell == "DeltaTime")
320 {
321
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 _binaryOutputRegister.imuField |= vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA;
322 20 identified = true;
323 20 break;
324 }
325 }
326 }
327
3/4
✓ Branch 1 taken 1431 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 688 times.
✓ Branch 4 taken 743 times.
1426 else if (group == "GNSS1")
328 {
329
1/2
✓ Branch 0 taken 6605 times.
✗ Branch 1 not taken.
6604 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupGNSS)
330 {
331
3/4
✓ Branch 1 taken 6604 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 688 times.
✓ Branch 4 taken 5916 times.
6605 if (cell == binaryGroupItem.name)
332 {
333
1/2
✓ Branch 1 taken 688 times.
✗ Branch 2 not taken.
688 _binaryOutputRegister.gpsField |= static_cast<vn::protocol::uart::GpsGroup>(binaryGroupItem.flagsValue);
334 688 identified = true;
335 688 break;
336 }
337 }
338 }
339
3/4
✓ Branch 1 taken 743 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 159 times.
✓ Branch 4 taken 584 times.
743 else if (group == "Att")
340 {
341
1/2
✓ Branch 0 taken 615 times.
✗ Branch 1 not taken.
615 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupAttitude)
342 {
343
3/4
✓ Branch 1 taken 615 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 159 times.
✓ Branch 4 taken 456 times.
615 if (cell == binaryGroupItem.name)
344 {
345
1/2
✓ Branch 1 taken 159 times.
✗ Branch 2 not taken.
159 _binaryOutputRegister.attitudeField |= static_cast<vn::protocol::uart::AttitudeGroup>(binaryGroupItem.flagsValue);
346 159 identified = true;
347 159 break;
348 }
349 }
350 }
351
3/4
✓ Branch 1 taken 586 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 420 times.
✓ Branch 4 taken 166 times.
584 else if (group == "INS")
352 {
353
1/2
✓ Branch 0 taken 1675 times.
✗ Branch 1 not taken.
1674 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupINS)
354 {
355
3/4
✓ Branch 1 taken 1675 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 421 times.
✓ Branch 4 taken 1254 times.
1675 if (cell == binaryGroupItem.name)
356 {
357
1/2
✓ Branch 1 taken 421 times.
✗ Branch 2 not taken.
421 _binaryOutputRegister.insField |= static_cast<vn::protocol::uart::InsGroup>(binaryGroupItem.flagsValue);
358 421 identified = true;
359 421 break;
360 }
361 }
362 }
363
2/4
✓ Branch 1 taken 167 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 167 times.
✗ Branch 4 not taken.
166 else if (group == "GNSS2")
364 {
365
1/2
✓ Branch 0 taken 1405 times.
✗ Branch 1 not taken.
1403 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupGNSS)
366 {
367
3/4
✓ Branch 1 taken 1404 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 168 times.
✓ Branch 4 taken 1236 times.
1405 if (cell == binaryGroupItem.name)
368 {
369
1/2
✓ Branch 1 taken 168 times.
✗ Branch 2 not taken.
168 _binaryOutputRegister.gps2Field |= static_cast<vn::protocol::uart::GpsGroup>(binaryGroupItem.flagsValue);
370 168 identified = true;
371 168 break;
372 }
373 }
374 }
375 else
376 {
377 LOG_ERROR("{}: Could not identify the group in CSV header - {}::{}", nameId(), group, cell);
378 doDeinitialize();
379 break;
380 }
381
382
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2258 times.
2258 if (!identified)
383 {
384 LOG_ERROR("{}: Could not identify the field in CSV header - {}::{}", nameId(), group, cell);
385 doDeinitialize();
386 break;
387 }
388 2258 }
389 }
390 42 }
391 else // if (fileType == FileType::BINARY)
392 {
393 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.timeField), sizeof(vn::protocol::uart::TimeGroup));
394 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.imuField), sizeof(vn::protocol::uart::ImuGroup));
395 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.gpsField), sizeof(vn::protocol::uart::GpsGroup));
396 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.attitudeField), sizeof(vn::protocol::uart::AttitudeGroup));
397 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.insField), sizeof(vn::protocol::uart::InsGroup));
398 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.gps2Field), sizeof(vn::protocol::uart::GpsGroup));
399 }
400 46 }
401
402 28717 std::shared_ptr<const NAV::NodeData> NAV::VectorNavFile::pollData()
403 {
404
1/2
✓ Branch 1 taken 28715 times.
✗ Branch 2 not taken.
28717 auto obs = std::make_shared<VectorNavBinaryOutput>(_imuPos);
405
406
2/2
✓ Branch 0 taken 28583 times.
✓ Branch 1 taken 132 times.
28715 if (_fileType == FileType::ASCII)
407 {
408 // Read line
409 28583 std::string line;
410
1/2
✓ Branch 1 taken 28585 times.
✗ Branch 2 not taken.
28581 getline(line);
411 // Remove any starting non text characters
412
2/4
✓ Branch 1 taken 28585 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 28583 times.
✗ Branch 8 not taken.
57129 line.erase(line.begin(), std::ranges::find_if(line, [](int ch) { return std::isgraph(ch); }));
413
414
2/2
✓ Branch 1 taken 38 times.
✓ Branch 2 taken 28545 times.
28583 if (line.empty())
415 {
416
3/6
✓ Branch 1 taken 38 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 38 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 38 times.
✗ Branch 9 not taken.
38 LOG_DEBUG("{}: End of file reached after {} lines", nameId(), _messageCount);
417 38 return nullptr;
418 }
419
420 // Convert line into stream
421
1/2
✓ Branch 2 taken 28548 times.
✗ Branch 3 not taken.
28545 std::stringstream lineStream(line);
422 LOG_DATA("{}: Reading line {}: {}", nameId(), _messageCount + 2, line);
423
424 1263390 auto extractCell = [&lineStream]() {
425
3/6
✓ Branch 2 taken 1262963 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 1262950 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1262977 times.
✗ Branch 8 not taken.
1263390 if (std::string cell; std::getline(lineStream, cell, ','))
426 {
427 // Remove any trailing non text characters
428
2/4
✓ Branch 3 taken 1263531 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 1263072 times.
✗ Branch 8 not taken.
22774078 cell.erase(std::ranges::find_if(cell, [](int ch) { return std::iscntrl(ch); }), cell.end());
429
430
2/2
✓ Branch 1 taken 1262997 times.
✓ Branch 2 taken 233 times.
1263072 if (!cell.empty())
431 {
432 1262997 return cell;
433 }
434 1262789 }
435
1/2
✓ Branch 1 taken 206 times.
✗ Branch 2 not taken.
412 return std::string("");
436 28548 };
437 2896827 auto extractRemoveTillDelimiter = [](std::string& str, const std::string& delimiter) {
438 2896827 std::string extract;
439
1/2
✓ Branch 1 taken 2896827 times.
✗ Branch 2 not taken.
2896827 if (size_t pos = str.find(delimiter);
440 pos != std::string::npos)
441 {
442
1/2
✓ Branch 1 taken 2896827 times.
✗ Branch 2 not taken.
2896827 extract = str.substr(0, pos);
443
1/2
✓ Branch 1 taken 2896827 times.
✗ Branch 2 not taken.
2896827 str = str.substr(pos + 1);
444 }
445
446 2896827 return extract;
447 };
448
449 try
450 {
451
2/4
✓ Branch 0 taken 28548 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 28547 times.
✗ Branch 4 not taken.
28548 if (_hasTimeColumn) { extractCell(); } // Time [s]
452
1/2
✓ Branch 1 taken 28547 times.
✗ Branch 2 not taken.
28547 std::string gpsCycle = extractCell();
453
1/2
✓ Branch 1 taken 28546 times.
✗ Branch 2 not taken.
28547 std::string gpsWeek = extractCell();
454
1/2
✓ Branch 1 taken 28548 times.
✗ Branch 2 not taken.
28546 std::string gpsTow = extractCell();
455
6/8
✓ Branch 1 taken 28537 times.
✓ Branch 2 taken 10 times.
✓ Branch 4 taken 28537 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 28537 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 28537 times.
✓ Branch 10 taken 10 times.
28548 if (!gpsCycle.empty() && !gpsWeek.empty() && !gpsTow.empty())
456 {
457
4/8
✓ Branch 2 taken 28534 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 28530 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 28533 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 28530 times.
✗ Branch 12 not taken.
28537 obs->insTime = InsTime(std::stoi(gpsCycle), std::stoi(gpsWeek), std::stold(gpsTow));
458 }
459
460 // Group 2 (Time)
461
1/2
✓ Branch 0 taken 28539 times.
✗ Branch 1 not taken.
28536 if (_binaryOutputRegister.timeField != vn::protocol::uart::TimeGroup::TIMEGROUP_NONE)
462 {
463
1/2
✓ Branch 2 taken 28536 times.
✗ Branch 3 not taken.
28539 if (!obs->timeOutputs)
464 {
465
1/2
✓ Branch 1 taken 28536 times.
✗ Branch 2 not taken.
28536 obs->timeOutputs = std::make_shared<NAV::vendor::vectornav::TimeOutputs>();
466
1/2
✓ Branch 3 taken 28543 times.
✗ Branch 4 not taken.
28541 obs->timeOutputs->timeField |= _binaryOutputRegister.timeField;
467 }
468
469
3/4
✓ Branch 1 taken 28543 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28542 times.
✓ Branch 4 taken 1 times.
28542 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTARTUP)
470 {
471
2/4
✓ Branch 1 taken 28547 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28541 times.
✗ Branch 5 not taken.
28542 obs->timeOutputs->timeStartup = static_cast<uint64_t>(std::stoull(extractCell()));
472 }
473
3/4
✓ Branch 1 taken 28537 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 28496 times.
28538 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPS)
474 {
475
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->timeOutputs->timeGps = static_cast<uint64_t>(std::stoull(extractCell()));
476 }
477
2/4
✓ Branch 1 taken 28539 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28539 times.
✗ Branch 4 not taken.
28537 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
478 {
479
3/4
✓ Branch 1 taken 28541 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28543 times.
✓ Branch 5 taken 3 times.
28542 obs->timeOutputs->gpsTow = static_cast<uint64_t>(std::stoull(extractCell()));
480 }
481
2/4
✓ Branch 1 taken 28542 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28542 times.
✗ Branch 4 not taken.
28542 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK)
482 {
483
2/4
✓ Branch 1 taken 28539 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28540 times.
✗ Branch 5 not taken.
28542 obs->timeOutputs->gpsWeek = static_cast<uint16_t>(std::stoul(extractCell()));
484 }
485
3/4
✓ Branch 1 taken 28542 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 28501 times.
28542 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESYNCIN)
486 {
487
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->timeOutputs->timeSyncIn = static_cast<uint64_t>(std::stoull(extractCell()));
488 }
489
3/4
✓ Branch 1 taken 28541 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 28500 times.
28542 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPSPPS)
490 {
491
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->timeOutputs->timePPS = static_cast<uint64_t>(std::stoull(extractCell()));
492 }
493
3/4
✓ Branch 1 taken 28541 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 28452 times.
28541 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)
494 {
495
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.year = static_cast<int8_t>(std::stoi(extractCell()));
496
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.month = static_cast<uint8_t>(std::stoul(extractCell()));
497
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.day = static_cast<uint8_t>(std::stoul(extractCell()));
498
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.hour = static_cast<uint8_t>(std::stoul(extractCell()));
499
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.min = static_cast<uint8_t>(std::stoul(extractCell()));
500
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.sec = static_cast<uint8_t>(std::stoul(extractCell()));
501
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->timeOutputs->timeUtc.ms = static_cast<uint16_t>(std::stoul(extractCell()));
502 }
503
3/4
✓ Branch 1 taken 28541 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 28500 times.
28541 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCINCNT)
504 {
505
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->timeOutputs->syncInCnt = static_cast<uint32_t>(std::stoul(extractCell()));
506 }
507
3/4
✓ Branch 1 taken 28542 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 28501 times.
28541 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCOUTCNT)
508 {
509
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->timeOutputs->syncOutCnt = static_cast<uint32_t>(std::stoul(extractCell()));
510 }
511
2/4
✓ Branch 1 taken 28541 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28541 times.
✗ Branch 4 not taken.
28542 if (_binaryOutputRegister.timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
512 {
513
2/4
✓ Branch 1 taken 28543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28543 times.
✗ Branch 5 not taken.
28541 auto timeOk = static_cast<uint8_t>(std::stoul(extractCell()));
514
2/4
✓ Branch 1 taken 28539 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28542 times.
✗ Branch 5 not taken.
28542 auto dateOk = static_cast<uint8_t>(std::stoul(extractCell()));
515
2/4
✓ Branch 1 taken 28543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28541 times.
✗ Branch 5 not taken.
28541 auto utcTimeValid = static_cast<uint8_t>(std::stoul(extractCell()));
516 28544 obs->timeOutputs->timeStatus = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
517 }
518 }
519 // Group 3 (IMU)
520
2/2
✓ Branch 0 taken 25848 times.
✓ Branch 1 taken 2689 times.
28537 if (_binaryOutputRegister.imuField != vn::protocol::uart::ImuGroup::IMUGROUP_NONE)
521 {
522
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 if (!obs->imuOutputs)
523 {
524
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs = std::make_shared<NAV::vendor::vectornav::ImuOutputs>();
525
1/2
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 obs->imuOutputs->imuField |= _binaryOutputRegister.imuField;
526 }
527
528
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 25848 times.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_IMUSTATUS)
529 {
530 obs->imuOutputs->imuStatus = static_cast<uint16_t>(std::stoul(extractCell()));
531 }
532
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)
533 {
534
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
535
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
536
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
537
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->uncompMag = { vecX, vecY, vecZ };
538 }
539
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)
540 {
541
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
542
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
543
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
544
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->uncompAccel = { vecX, vecY, vecZ };
545 }
546
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)
547 {
548
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
549
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
550
2/4
✓ Branch 1 taken 25847 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
551
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->uncompGyro = { vecX, vecY, vecZ };
552 }
553
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)
554 {
555
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 obs->imuOutputs->temp = std::stof(extractCell());
556 }
557
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_PRES)
558 {
559
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 obs->imuOutputs->pres = std::stof(extractCell());
560 }
561
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)
562 {
563
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 obs->imuOutputs->deltaTime = std::stof(extractCell());
564
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
565
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
566
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
567
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->deltaTheta = { vecX, vecY, vecZ };
568 }
569
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)
570 {
571
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
572
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
573
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
574
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->deltaV = { vecX, vecY, vecZ };
575 }
576
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)
577 {
578
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
579
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
580
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
581
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->mag = { vecX, vecY, vecZ };
582 }
583
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)
584 {
585
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
586
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
587
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
588
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->accel = { vecX, vecY, vecZ };
589 }
590
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
25848 if (_binaryOutputRegister.imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)
591 {
592
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25847 times.
✗ Branch 5 not taken.
25848 float vecX = std::stof(extractCell());
593
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecY = std::stof(extractCell());
594
2/4
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 25848 times.
✗ Branch 5 not taken.
25848 float vecZ = std::stof(extractCell());
595
1/2
✓ Branch 1 taken 25848 times.
✗ Branch 2 not taken.
25848 obs->imuOutputs->angularRate = { vecX, vecY, vecZ };
596 }
597 }
598 // Group 4 (GNSS1)
599
1/2
✓ Branch 0 taken 28545 times.
✗ Branch 1 not taken.
28537 if (_binaryOutputRegister.gpsField != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
600 {
601
1/2
✓ Branch 2 taken 28545 times.
✗ Branch 3 not taken.
28545 if (!obs->gnss1Outputs)
602 {
603
1/2
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
28545 obs->gnss1Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
604
1/2
✓ Branch 3 taken 28543 times.
✗ Branch 4 not taken.
28545 obs->gnss1Outputs->gnssField |= _binaryOutputRegister.gpsField;
605 }
606
607
3/4
✓ Branch 1 taken 28543 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 28495 times.
28543 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
608 {
609
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.year = static_cast<int8_t>(std::stoi(extractCell()));
610
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.month = static_cast<uint8_t>(std::stoul(extractCell()));
611
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.day = static_cast<uint8_t>(std::stoul(extractCell()));
612
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.hour = static_cast<uint8_t>(std::stoul(extractCell()));
613
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.min = static_cast<uint8_t>(std::stoul(extractCell()));
614
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.sec = static_cast<uint8_t>(std::stoul(extractCell()));
615
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->timeUtc.ms = static_cast<uint16_t>(std::stoul(extractCell()));
616 }
617
3/4
✓ Branch 1 taken 28542 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28501 times.
✓ Branch 4 taken 41 times.
28543 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
618 {
619
2/4
✓ Branch 1 taken 28501 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28501 times.
✗ Branch 5 not taken.
28501 obs->gnss1Outputs->tow = static_cast<uint64_t>(std::stoull(extractCell()));
620 }
621
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28503 times.
✓ Branch 4 taken 42 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
622 {
623
2/4
✓ Branch 1 taken 28502 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28502 times.
✗ Branch 5 not taken.
28503 obs->gnss1Outputs->week = static_cast<uint16_t>(std::stoul(extractCell()));
624 }
625
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✓ Branch 4 taken 25848 times.
28546 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
626 {
627
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 obs->gnss1Outputs->numSats = static_cast<uint8_t>(std::stoul(extractCell()));
628 }
629
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✓ Branch 4 taken 25848 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
630 {
631
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 obs->gnss1Outputs->fix = static_cast<uint8_t>(std::stoul(extractCell()));
632 }
633
3/4
✓ Branch 1 taken 28544 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 25888 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
634 {
635
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 double vecX = std::stod(extractCell());
636
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 double vecY = std::stod(extractCell());
637
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 double vecZ = std::stod(extractCell());
638
1/2
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
2656 obs->gnss1Outputs->posLla = { vecX, vecY, vecZ };
639 }
640
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 28497 times.
28544 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
641 {
642
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecX = std::stod(extractCell());
643
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecY = std::stod(extractCell());
644
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecZ = std::stod(extractCell());
645
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss1Outputs->posEcef = { vecX, vecY, vecZ };
646 }
647
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 25889 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
648 {
649
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecX = std::stof(extractCell());
650
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecY = std::stof(extractCell());
651
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecZ = std::stof(extractCell());
652
1/2
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
2656 obs->gnss1Outputs->velNed = { vecX, vecY, vecZ };
653 }
654
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 28497 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
655 {
656
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecX = std::stof(extractCell());
657
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecY = std::stof(extractCell());
658
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecZ = std::stof(extractCell());
659
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss1Outputs->velEcef = { vecX, vecY, vecZ };
660 }
661
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 25889 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
662 {
663
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecX = std::stof(extractCell());
664
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecY = std::stof(extractCell());
665
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 float vecZ = std::stof(extractCell());
666
1/2
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
2656 obs->gnss1Outputs->posU = { vecX, vecY, vecZ };
667 }
668
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 25889 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
669 {
670
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 obs->gnss1Outputs->velU = std::stof(extractCell());
671 }
672
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 25889 times.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
673 {
674
2/4
✓ Branch 1 taken 2656 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2656 times.
✗ Branch 5 not taken.
2656 obs->gnss1Outputs->timeU = std::stof(extractCell());
675 }
676
2/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28545 times.
✗ Branch 4 not taken.
28545 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
677 {
678
2/4
✓ Branch 1 taken 28544 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28544 times.
✗ Branch 5 not taken.
28545 auto timeOk = static_cast<uint8_t>(std::stoul(extractCell()));
679
2/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28544 times.
✗ Branch 5 not taken.
28544 auto dateOk = static_cast<uint8_t>(std::stoul(extractCell()));
680
2/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28545 times.
✗ Branch 5 not taken.
28545 auto utcTimeValid = static_cast<uint8_t>(std::stoul(extractCell()));
681 28545 obs->gnss1Outputs->timeInfo.status = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
682
2/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 28545 times.
✗ Branch 5 not taken.
28545 obs->gnss1Outputs->timeInfo.leapSeconds = static_cast<int8_t>(std::stoi(extractCell()));
683 }
684
3/4
✓ Branch 1 taken 28544 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 28496 times.
28544 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
685 {
686
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.gDop = std::stof(extractCell());
687
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.pDop = std::stof(extractCell());
688
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.tDop = std::stof(extractCell());
689
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.vDop = std::stof(extractCell());
690
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.hDop = std::stof(extractCell());
691
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.nDop = std::stof(extractCell());
692
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss1Outputs->dop.eDop = std::stof(extractCell());
693 }
694
3/4
✓ Branch 1 taken 28544 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2649 times.
✓ Branch 4 taken 25895 times.
28544 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
695 {
696
2/4
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2649 times.
✗ Branch 5 not taken.
2649 obs->gnss1Outputs->satInfo.numSats = static_cast<uint8_t>(std::stoul(extractCell()));
697
1/2
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
2649 std::string satellites = extractCell();
698
2/2
✓ Branch 2 taken 68852 times.
✓ Branch 3 taken 2649 times.
71501 for (size_t i = 0; i < obs->gnss1Outputs->satInfo.numSats; i++)
699 {
700
1/2
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
68852 satellites = satellites.substr(1); // Remove leading '['
701
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto sys = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
702
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
703
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagHealthy = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
704
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagAlmanac = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
705
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagEphemeris = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
706
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagDifferentialCorrection = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
707
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagUsedForNavigation = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
708
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto flagAzimuthElevationValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
709
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
68852 auto flagUsedForRTK = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
710 68852 auto flags = static_cast<uint8_t>(flagHealthy << 0U
711 68852 | flagAlmanac << 1U
712 68852 | flagEphemeris << 2U
713 68852 | flagDifferentialCorrection << 3U
714 68852 | flagUsedForNavigation << 4U
715 68852 | flagAzimuthElevationValid << 5U
716 68852 | flagUsedForRTK << 6U);
717
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
718
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto qi = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
719
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
137704 auto el = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
720
3/6
✓ Branch 1 taken 68852 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68852 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68852 times.
✗ Branch 8 not taken.
68852 auto az = static_cast<int16_t>(std::stoi(extractRemoveTillDelimiter(satellites, "]")));
721
1/2
✓ Branch 3 taken 68852 times.
✗ Branch 4 not taken.
68852 obs->gnss1Outputs->satInfo.satellites.emplace_back(sys, svId, flags, cno, qi, el, az);
722 }
723 2649 }
724
3/4
✓ Branch 1 taken 28545 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2649 times.
✓ Branch 4 taken 25896 times.
28544 if (_binaryOutputRegister.gpsField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
725 {
726
2/4
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2649 times.
✗ Branch 5 not taken.
2649 obs->gnss1Outputs->raw.tow = std::stod(extractCell());
727
2/4
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2649 times.
✗ Branch 5 not taken.
2649 obs->gnss1Outputs->raw.week = static_cast<uint16_t>(std::stoul(extractCell()));
728
2/4
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2649 times.
✗ Branch 5 not taken.
2649 obs->gnss1Outputs->raw.numSats = static_cast<uint8_t>(std::stoul(extractCell()));
729
1/2
✓ Branch 1 taken 2649 times.
✗ Branch 2 not taken.
2649 std::string satellites = extractCell();
730
2/2
✓ Branch 2 taken 110175 times.
✓ Branch 3 taken 2649 times.
112824 for (size_t i = 0; i < obs->gnss1Outputs->raw.numSats; i++)
731 {
732
1/2
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
110175 satellites = satellites.substr(1); // Remove leading '['
733
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto sys = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
734
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
735
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto freq = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
736
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto chan = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
737
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto slot = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
738
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
739
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagSearching = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
740
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagTracking = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
741
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagTimeValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
742
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagCodeLock = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
743
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagPhaseLock = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
744
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagPhaseHalfAmbiguity = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
745
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagPhaseHalfSub = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
746
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto flagPhaseSlip = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
747
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
110175 auto flagPseudorangeSmoothed = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
748 110175 auto flags = static_cast<uint16_t>(flagSearching << 0U
749 110175 | flagTracking << 1U
750 110175 | flagTimeValid << 2U
751 110175 | flagCodeLock << 3U
752 110175 | flagPhaseLock << 4U
753 110175 | flagPhaseHalfAmbiguity << 5U
754 110175 | flagPhaseHalfSub << 6U
755 110175 | flagPhaseSlip << 7U
756 110175 | flagPseudorangeSmoothed << 8U);
757
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto pr = std::stod(extractRemoveTillDelimiter(satellites, "|"));
758
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
220350 auto cp = std::stod(extractRemoveTillDelimiter(satellites, "|"));
759
3/6
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 110175 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 110175 times.
✗ Branch 8 not taken.
110175 auto dp = std::stof(extractRemoveTillDelimiter(satellites, "]"));
760
1/2
✓ Branch 3 taken 110175 times.
✗ Branch 4 not taken.
110175 obs->gnss1Outputs->raw.satellites.emplace_back(sys, svId, freq, chan, slot, cno, flags, pr, cp, dp);
761 }
762 2649 }
763 }
764 // Group 5 (Attitude)
765
2/2
✓ Branch 0 taken 2769 times.
✓ Branch 1 taken 25768 times.
28537 if (_binaryOutputRegister.attitudeField != vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE)
766 {
767
1/2
✓ Branch 2 taken 2769 times.
✗ Branch 3 not taken.
2769 if (!obs->attitudeOutputs)
768 {
769
1/2
✓ Branch 1 taken 2768 times.
✗ Branch 2 not taken.
2769 obs->attitudeOutputs = std::make_shared<NAV::vendor::vectornav::AttitudeOutputs>();
770
1/2
✓ Branch 3 taken 2769 times.
✗ Branch 4 not taken.
2769 obs->attitudeOutputs->attitudeField |= _binaryOutputRegister.attitudeField;
771 }
772
773
2/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2769 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)
774 {
775 obs->attitudeOutputs->vpeStatus = static_cast<uint16_t>(std::stoul(extractCell()));
776 }
777
2/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2769 times.
✗ Branch 4 not taken.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)
778 {
779
2/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2769 times.
✗ Branch 5 not taken.
2769 float vecX = std::stof(extractCell());
780
2/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2769 times.
✗ Branch 5 not taken.
2769 float vecY = std::stof(extractCell());
781
2/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2769 times.
✗ Branch 5 not taken.
2769 float vecZ = std::stof(extractCell());
782
1/2
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
2769 obs->attitudeOutputs->ypr = { vecX, vecY, vecZ };
783 }
784
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 161 times.
✓ Branch 4 taken 2608 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)
785 {
786
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecW = std::stof(extractCell());
787
2/4
✓ Branch 1 taken 160 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecX = std::stof(extractCell());
788
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecY = std::stof(extractCell());
789
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecZ = std::stof(extractCell());
790
1/2
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
161 obs->attitudeOutputs->qtn = { vecW, vecX, vecY, vecZ };
791 }
792
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 2728 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)
793 {
794
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat00 = std::stof(extractCell());
795
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat01 = std::stof(extractCell());
796
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat02 = std::stof(extractCell());
797
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat10 = std::stof(extractCell());
798
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat11 = std::stof(extractCell());
799
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat12 = std::stof(extractCell());
800
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat20 = std::stof(extractCell());
801
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat21 = std::stof(extractCell());
802
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float mat22 = std::stof(extractCell());
803
3/6
✓ Branch 3 taken 41 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 41 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 41 times.
✗ Branch 10 not taken.
82 obs->attitudeOutputs->dcm << mat00, mat01, mat02,
804
3/6
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 41 times.
✗ Branch 8 not taken.
41 mat10, mat11, mat12,
805
3/6
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 41 times.
✗ Branch 8 not taken.
41 mat20, mat21, mat22;
806 }
807
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 2728 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)
808 {
809
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecX = std::stof(extractCell());
810
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecY = std::stof(extractCell());
811
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecZ = std::stof(extractCell());
812
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 obs->attitudeOutputs->magNed = { vecX, vecY, vecZ };
813 }
814
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 2728 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)
815 {
816
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecX = std::stof(extractCell());
817
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecY = std::stof(extractCell());
818
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecZ = std::stof(extractCell());
819
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 obs->attitudeOutputs->accelNed = { vecX, vecY, vecZ };
820 }
821
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 2728 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)
822 {
823
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecX = std::stof(extractCell());
824
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecY = std::stof(extractCell());
825
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecZ = std::stof(extractCell());
826
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 obs->attitudeOutputs->linearAccelBody = { vecX, vecY, vecZ };
827 }
828
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 2728 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)
829 {
830
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecX = std::stof(extractCell());
831
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecY = std::stof(extractCell());
832
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 float vecZ = std::stof(extractCell());
833
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 obs->attitudeOutputs->linearAccelNed = { vecX, vecY, vecZ };
834 }
835
3/4
✓ Branch 1 taken 2769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 161 times.
✓ Branch 4 taken 2608 times.
2769 if (_binaryOutputRegister.attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)
836 {
837
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecX = std::stof(extractCell());
838
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecY = std::stof(extractCell());
839
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 float vecZ = std::stof(extractCell());
840
1/2
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
161 obs->attitudeOutputs->yprU = { vecX, vecY, vecZ };
841 }
842 }
843 // Group 6 (INS)
844
2/2
✓ Branch 0 taken 2697 times.
✓ Branch 1 taken 25840 times.
28537 if (_binaryOutputRegister.insField != vn::protocol::uart::InsGroup::INSGROUP_NONE)
845 {
846
1/2
✓ Branch 2 taken 2697 times.
✗ Branch 3 not taken.
2697 if (!obs->insOutputs)
847 {
848
1/2
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
2697 obs->insOutputs = std::make_shared<NAV::vendor::vectornav::InsOutputs>();
849
1/2
✓ Branch 3 taken 2697 times.
✗ Branch 4 not taken.
2697 obs->insOutputs->insField |= _binaryOutputRegister.insField;
850 }
851
852
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✗ Branch 4 not taken.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)
853 {
854
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto mode = static_cast<uint8_t>(std::stoul(extractCell()));
855
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto gpsFix = static_cast<uint8_t>(std::stoul(extractCell()));
856
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto errorImu = static_cast<uint8_t>(std::stoul(extractCell()));
857
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto errorMagPres = static_cast<uint8_t>(std::stoul(extractCell()));
858
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto errorGnss = static_cast<uint8_t>(std::stoul(extractCell()));
859
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto gpsHeadingIns = static_cast<uint8_t>(std::stoul(extractCell()));
860
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 auto gpsCompass = static_cast<uint8_t>(std::stoul(extractCell()));
861 2697 obs->insOutputs->insStatus.status() = static_cast<uint16_t>(mode << 0U | gpsFix << 2U
862 2697 | errorImu << 4U | errorMagPres << 5U | errorGnss << 6U
863 2697 | gpsHeadingIns << 8U | gpsCompass << 9U);
864 }
865
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✗ Branch 4 not taken.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)
866 {
867
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 double vecX = std::stod(extractCell());
868
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 double vecY = std::stod(extractCell());
869
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 double vecZ = std::stod(extractCell());
870
1/2
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
2697 obs->insOutputs->posLla = { vecX, vecY, vecZ };
871 }
872
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)
873 {
874
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 double vecX = std::stod(extractCell());
875
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 double vecY = std::stod(extractCell());
876
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 double vecZ = std::stod(extractCell());
877
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->insOutputs->posEcef = { vecX, vecY, vecZ };
878 }
879
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)
880 {
881
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecX = std::stof(extractCell());
882
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecY = std::stof(extractCell());
883
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecZ = std::stof(extractCell());
884
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->insOutputs->velBody = { vecX, vecY, vecZ };
885 }
886
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✗ Branch 4 not taken.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)
887 {
888
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecX = std::stof(extractCell());
889
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecY = std::stof(extractCell());
890
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecZ = std::stof(extractCell());
891
1/2
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
2697 obs->insOutputs->velNed = { vecX, vecY, vecZ };
892 }
893
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)
894 {
895
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecX = std::stof(extractCell());
896
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecY = std::stof(extractCell());
897
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecZ = std::stof(extractCell());
898
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->insOutputs->velEcef = { vecX, vecY, vecZ };
899 }
900
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)
901 {
902
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecX = std::stof(extractCell());
903
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecY = std::stof(extractCell());
904
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecZ = std::stof(extractCell());
905
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->insOutputs->magEcef = { vecX, vecY, vecZ };
906 }
907
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)
908 {
909
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecX = std::stof(extractCell());
910
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecY = std::stof(extractCell());
911
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 float vecZ = std::stof(extractCell());
912
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->insOutputs->accelEcef = { vecX, vecY, vecZ };
913 }
914
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2697 times.
✗ Branch 4 not taken.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)
915 {
916
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecX = std::stof(extractCell());
917
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecY = std::stof(extractCell());
918
2/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2697 times.
✗ Branch 5 not taken.
2697 float vecZ = std::stof(extractCell());
919
1/2
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
2697 obs->insOutputs->linearAccelEcef = { vecX, vecY, vecZ };
920 }
921
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_POSU)
922 {
923
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->insOutputs->posU = std::stof(extractCell());
924 }
925
3/4
✓ Branch 1 taken 2697 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✓ Branch 4 taken 2608 times.
2697 if (_binaryOutputRegister.insField & vn::protocol::uart::InsGroup::INSGROUP_VELU)
926 {
927
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->insOutputs->velU = std::stof(extractCell());
928 }
929 }
930 // Group 7 (GNSS2)
931
2/2
✓ Branch 0 taken 89 times.
✓ Branch 1 taken 28448 times.
28537 if (_binaryOutputRegister.gps2Field != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
932 {
933
1/2
✓ Branch 2 taken 89 times.
✗ Branch 3 not taken.
89 if (!obs->gnss2Outputs)
934 {
935
1/2
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
89 obs->gnss2Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
936
1/2
✓ Branch 3 taken 89 times.
✗ Branch 4 not taken.
89 obs->gnss2Outputs->gnssField |= _binaryOutputRegister.gps2Field;
937 }
938
939
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
940 {
941
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.year = static_cast<int8_t>(std::stoi(extractCell()));
942
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.month = static_cast<uint8_t>(std::stoul(extractCell()));
943
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.day = static_cast<uint8_t>(std::stoul(extractCell()));
944
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.hour = static_cast<uint8_t>(std::stoul(extractCell()));
945
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.min = static_cast<uint8_t>(std::stoul(extractCell()));
946
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.sec = static_cast<uint8_t>(std::stoul(extractCell()));
947
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeUtc.ms = static_cast<uint16_t>(std::stoul(extractCell()));
948 }
949
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
950 {
951
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->tow = static_cast<uint64_t>(std::stoull(extractCell()));
952 }
953
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
954 {
955
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->week = static_cast<uint16_t>(std::stoul(extractCell()));
956 }
957
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✗ Branch 4 not taken.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
958 {
959
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->gnss2Outputs->numSats = static_cast<uint8_t>(std::stoul(extractCell()));
960 }
961
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✗ Branch 4 not taken.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
962 {
963
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->gnss2Outputs->fix = static_cast<uint8_t>(std::stoul(extractCell()));
964 }
965
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
966 {
967
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecX = std::stod(extractCell());
968
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecY = std::stod(extractCell());
969
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecZ = std::stod(extractCell());
970
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss2Outputs->posLla = { vecX, vecY, vecZ };
971 }
972
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
973 {
974
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecX = std::stod(extractCell());
975
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecY = std::stod(extractCell());
976
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 double vecZ = std::stod(extractCell());
977
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss2Outputs->posEcef = { vecX, vecY, vecZ };
978 }
979
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
980 {
981
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecX = std::stof(extractCell());
982
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecY = std::stof(extractCell());
983
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecZ = std::stof(extractCell());
984
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss2Outputs->velNed = { vecX, vecY, vecZ };
985 }
986
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
987 {
988
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecX = std::stof(extractCell());
989
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecY = std::stof(extractCell());
990
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecZ = std::stof(extractCell());
991
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss2Outputs->velEcef = { vecX, vecY, vecZ };
992 }
993
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
994 {
995
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecX = std::stof(extractCell());
996
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecY = std::stof(extractCell());
997
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 float vecZ = std::stof(extractCell());
998
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 obs->gnss2Outputs->posU = { vecX, vecY, vecZ };
999 }
1000
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
1001 {
1002
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->velU = std::stof(extractCell());
1003 }
1004
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
1005 {
1006
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->timeU = std::stof(extractCell());
1007 }
1008
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 89 times.
✗ Branch 4 not taken.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
1009 {
1010
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 auto timeOk = static_cast<uint8_t>(std::stoul(extractCell()));
1011
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 auto dateOk = static_cast<uint8_t>(std::stoul(extractCell()));
1012
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 auto utcTimeValid = static_cast<uint8_t>(std::stoul(extractCell()));
1013 89 obs->gnss2Outputs->timeInfo.status = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
1014
2/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 89 times.
✗ Branch 5 not taken.
89 obs->gnss2Outputs->timeInfo.leapSeconds = static_cast<int8_t>(std::stoi(extractCell()));
1015 }
1016
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 41 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
1017 {
1018
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.gDop = std::stof(extractCell());
1019
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.pDop = std::stof(extractCell());
1020
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.tDop = std::stof(extractCell());
1021
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.vDop = std::stof(extractCell());
1022
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.hDop = std::stof(extractCell());
1023
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.nDop = std::stof(extractCell());
1024
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
48 obs->gnss2Outputs->dop.eDop = std::stof(extractCell());
1025 }
1026
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 48 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
1027 {
1028
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->gnss2Outputs->satInfo.numSats = static_cast<uint8_t>(std::stoul(extractCell()));
1029
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 std::string satellites = extractCell();
1030
2/2
✓ Branch 2 taken 679 times.
✓ Branch 3 taken 41 times.
720 for (size_t i = 0; i < obs->gnss2Outputs->satInfo.numSats; i++)
1031 {
1032
1/2
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
679 satellites = satellites.substr(1); // Remove leading '['
1033
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto sys = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
1034
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1035
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagHealthy = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1036
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagAlmanac = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1037
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagEphemeris = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1038
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagDifferentialCorrection = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1039
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagUsedForNavigation = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1040
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto flagAzimuthElevationValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1041
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
679 auto flagUsedForRTK = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1042 679 auto flags = static_cast<uint8_t>(flagHealthy << 0U
1043 679 | flagAlmanac << 1U
1044 679 | flagEphemeris << 2U
1045 679 | flagDifferentialCorrection << 3U
1046 679 | flagUsedForNavigation << 4U
1047 679 | flagAzimuthElevationValid << 5U
1048 679 | flagUsedForRTK << 6U);
1049
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1050
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto qi = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1051
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
1358 auto el = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
1052
3/6
✓ Branch 1 taken 679 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 679 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 679 times.
✗ Branch 8 not taken.
679 auto az = static_cast<int16_t>(std::stoi(extractRemoveTillDelimiter(satellites, "]")));
1053
1/2
✓ Branch 3 taken 679 times.
✗ Branch 4 not taken.
679 obs->gnss2Outputs->satInfo.satellites.emplace_back(sys, svId, flags, cno, qi, el, az);
1054 }
1055 41 }
1056
3/4
✓ Branch 1 taken 89 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 41 times.
✓ Branch 4 taken 48 times.
89 if (_binaryOutputRegister.gps2Field & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
1057 {
1058
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->gnss2Outputs->raw.tow = std::stod(extractCell());
1059
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->gnss2Outputs->raw.week = static_cast<uint16_t>(std::stoul(extractCell()));
1060
2/4
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 41 times.
✗ Branch 5 not taken.
41 obs->gnss2Outputs->raw.numSats = static_cast<uint8_t>(std::stoul(extractCell()));
1061
1/2
✓ Branch 1 taken 41 times.
✗ Branch 2 not taken.
41 std::string satellites = extractCell();
1062
2/2
✓ Branch 2 taken 543 times.
✓ Branch 3 taken 41 times.
584 for (size_t i = 0; i < obs->gnss2Outputs->raw.numSats; i++)
1063 {
1064
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 satellites = satellites.substr(1); // Remove leading '['
1065
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto sys = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1066
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1067
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto freq = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1068
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto chan = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1069
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto slot = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
1070
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1071
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagSearching = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1072
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagTracking = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1073
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagTimeValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1074
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagCodeLock = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1075
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagPhaseLock = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1076
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagPhaseHalfAmbiguity = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1077
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagPhaseHalfSub = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1078
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto flagPhaseSlip = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1079
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
543 auto flagPseudorangeSmoothed = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1080 543 auto flags = static_cast<uint16_t>(flagSearching << 0U
1081 543 | flagTracking << 1U
1082 543 | flagTimeValid << 2U
1083 543 | flagCodeLock << 3U
1084 543 | flagPhaseLock << 4U
1085 543 | flagPhaseHalfAmbiguity << 5U
1086 543 | flagPhaseHalfSub << 6U
1087 543 | flagPhaseSlip << 7U
1088 543 | flagPseudorangeSmoothed << 8U);
1089
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto pr = std::stod(extractRemoveTillDelimiter(satellites, "|"));
1090
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
1086 auto cp = std::stod(extractRemoveTillDelimiter(satellites, "|"));
1091
3/6
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 543 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 543 times.
✗ Branch 8 not taken.
543 auto dp = std::stof(extractRemoveTillDelimiter(satellites, "]"));
1092
1/2
✓ Branch 3 taken 543 times.
✗ Branch 4 not taken.
543 obs->gnss2Outputs->raw.satellites.emplace_back(sys, svId, freq, chan, slot, cno, flags, pr, cp, dp);
1093 }
1094 41 }
1095 }
1096 28546 }
1097
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 catch (const std::exception& e)
1098 {
1099
3/6
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 3 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 3 times.
✗ Branch 10 not taken.
3 LOG_ERROR("{}: Could not read line {} completely: {}", nameId(), _messageCount + 2, e.what());
1100 3 return nullptr;
1101 3 }
1102 28589 }
1103 else // if (fileType == FileType::BINARY)
1104 {
1105 395 auto readFromFilestream = [&, this](char* __s, std::streamsize __n) {
1106 395 read(__s, __n);
1107
2/2
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 390 times.
395 if (!good())
1108 {
1109
1/2
✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
5 throw std::runtime_error("End of file reached");
1110 }
1111 390 };
1112
1113 try
1114 {
1115 132 int32_t gpsCycle = 0;
1116 132 int32_t gpsWeek = 0;
1117 132 double tow = 0.0;
1118
2/2
✓ Branch 1 taken 130 times.
✓ Branch 2 taken 5 times.
132 readFromFilestream(reinterpret_cast<char*>(&gpsCycle), sizeof(gpsCycle));
1119
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 readFromFilestream(reinterpret_cast<char*>(&gpsWeek), sizeof(gpsWeek));
1120
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 readFromFilestream(reinterpret_cast<char*>(&tow), sizeof(tow));
1121
3/4
✓ Branch 0 taken 39 times.
✓ Branch 1 taken 91 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 39 times.
130 if (gpsCycle || gpsWeek)
1122 {
1123
1/2
✓ Branch 2 taken 91 times.
✗ Branch 3 not taken.
91 obs->insTime = InsTime(gpsCycle, gpsWeek, tow);
1124 }
1125
1126 // Group 2 (Time)
1127
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.timeField != vn::protocol::uart::TimeGroup::TIMEGROUP_NONE)
1128 {
1129
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->timeOutputs)
1130 {
1131
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->timeOutputs = std::make_shared<NAV::vendor::vectornav::TimeOutputs>();
1132
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->timeOutputs->timeField |= _binaryOutputRegister.timeField;
1133 }
1134
1135
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTARTUP)
1136 {
1137
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->timeStartup), sizeof(obs->timeOutputs->timeStartup));
1138 }
1139
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPS)
1140 {
1141
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timeGps), sizeof(obs->timeOutputs->timeGps));
1142 }
1143
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
1144 {
1145
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->gpsTow), sizeof(obs->timeOutputs->gpsTow));
1146 }
1147
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK)
1148 {
1149
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->gpsWeek), sizeof(obs->timeOutputs->gpsWeek));
1150 }
1151
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESYNCIN)
1152 {
1153
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timeSyncIn), sizeof(obs->timeOutputs->timeSyncIn));
1154 }
1155
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPSPPS)
1156 {
1157
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timePPS), sizeof(obs->timeOutputs->timePPS));
1158 }
1159
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✓ Branch 6 taken 36 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)
1160 {
1161
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.year), sizeof(obs->timeOutputs->timeUtc.year));
1162
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.month), sizeof(obs->timeOutputs->timeUtc.month));
1163
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.day), sizeof(obs->timeOutputs->timeUtc.day));
1164
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.hour), sizeof(obs->timeOutputs->timeUtc.hour));
1165
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.min), sizeof(obs->timeOutputs->timeUtc.min));
1166
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.sec), sizeof(obs->timeOutputs->timeUtc.sec));
1167
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->timeOutputs->timeUtc.ms), sizeof(obs->timeOutputs->timeUtc.ms));
1168 }
1169
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCINCNT)
1170 {
1171
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->syncInCnt), sizeof(obs->timeOutputs->syncInCnt));
1172 }
1173
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCOUTCNT)
1174 {
1175
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->syncOutCnt), sizeof(obs->timeOutputs->syncOutCnt));
1176 }
1177
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
1178 {
1179
1/2
✓ Branch 4 taken 130 times.
✗ Branch 5 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->timeStatus.status()), sizeof(obs->timeOutputs->timeStatus.status()));
1180 }
1181 }
1182 // Group 3 (IMU)
1183
2/2
✓ Branch 0 taken 36 times.
✓ Branch 1 taken 94 times.
130 if (_binaryOutputRegister.imuField != vn::protocol::uart::ImuGroup::IMUGROUP_NONE)
1184 {
1185
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
36 if (!obs->imuOutputs)
1186 {
1187
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
36 obs->imuOutputs = std::make_shared<NAV::vendor::vectornav::ImuOutputs>();
1188
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 obs->imuOutputs->imuField |= _binaryOutputRegister.imuField;
1189 }
1190
1191
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 36 times.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_IMUSTATUS)
1192 {
1193 read(reinterpret_cast<char*>(&obs->imuOutputs->imuStatus), sizeof(obs->imuOutputs->imuStatus));
1194 }
1195
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)
1196 {
1197
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->uncompMag.data()), sizeof(obs->imuOutputs->uncompMag));
1198 }
1199
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)
1200 {
1201
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->uncompAccel.data()), sizeof(obs->imuOutputs->uncompAccel));
1202 }
1203
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)
1204 {
1205
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->uncompGyro.data()), sizeof(obs->imuOutputs->uncompGyro));
1206 }
1207
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)
1208 {
1209
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->temp), sizeof(obs->imuOutputs->temp));
1210 }
1211
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_PRES)
1212 {
1213
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->pres), sizeof(obs->imuOutputs->pres));
1214 }
1215
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)
1216 {
1217
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->deltaTime), sizeof(obs->imuOutputs->deltaTime));
1218
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->deltaTheta.data()), sizeof(obs->imuOutputs->deltaTheta));
1219 }
1220
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)
1221 {
1222
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->deltaV.data()), sizeof(obs->imuOutputs->deltaV));
1223 }
1224
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)
1225 {
1226
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->mag.data()), sizeof(obs->imuOutputs->mag));
1227 }
1228
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)
1229 {
1230
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->accel.data()), sizeof(obs->imuOutputs->accel));
1231 }
1232
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 36 times.
✗ Branch 6 not taken.
36 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)
1233 {
1234
2/4
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 36 times.
✗ Branch 7 not taken.
36 read(reinterpret_cast<char*>(obs->imuOutputs->angularRate.data()), sizeof(obs->imuOutputs->angularRate));
1235 }
1236 }
1237 // Group 4 (GNSS1)
1238
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.gpsField != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
1239 {
1240
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->gnss1Outputs)
1241 {
1242
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->gnss1Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
1243
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->gnss1Outputs->gnssField |= _binaryOutputRegister.gpsField;
1244 }
1245
1246
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
1247 {
1248
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.year), sizeof(obs->gnss1Outputs->timeUtc.year));
1249
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.month), sizeof(obs->gnss1Outputs->timeUtc.month));
1250
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.day), sizeof(obs->gnss1Outputs->timeUtc.day));
1251
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.hour), sizeof(obs->gnss1Outputs->timeUtc.hour));
1252
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.min), sizeof(obs->gnss1Outputs->timeUtc.min));
1253
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.sec), sizeof(obs->gnss1Outputs->timeUtc.sec));
1254
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeUtc.ms), sizeof(obs->gnss1Outputs->timeUtc.ms));
1255 }
1256
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 60 times.
✓ Branch 6 taken 70 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
1257 {
1258
1/2
✓ Branch 3 taken 60 times.
✗ Branch 4 not taken.
60 read(reinterpret_cast<char*>(&obs->gnss1Outputs->tow), sizeof(obs->gnss1Outputs->tow));
1259 }
1260
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 60 times.
✓ Branch 6 taken 70 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
1261 {
1262
1/2
✓ Branch 3 taken 60 times.
✗ Branch 4 not taken.
60 read(reinterpret_cast<char*>(&obs->gnss1Outputs->week), sizeof(obs->gnss1Outputs->week));
1263 }
1264
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✓ Branch 6 taken 36 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
1265 {
1266
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss1Outputs->numSats), sizeof(obs->gnss1Outputs->numSats));
1267 }
1268
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✓ Branch 6 taken 36 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
1269 {
1270
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss1Outputs->fix), sizeof(obs->gnss1Outputs->fix));
1271 }
1272
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
1273 {
1274
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss1Outputs->posLla.data()), sizeof(obs->gnss1Outputs->posLla));
1275 }
1276
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
1277 {
1278
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss1Outputs->posEcef.data()), sizeof(obs->gnss1Outputs->posEcef));
1279 }
1280
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
1281 {
1282
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss1Outputs->velNed.data()), sizeof(obs->gnss1Outputs->velNed));
1283 }
1284
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
1285 {
1286
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss1Outputs->velEcef.data()), sizeof(obs->gnss1Outputs->velEcef));
1287 }
1288
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
1289 {
1290
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss1Outputs->posU.data()), sizeof(obs->gnss1Outputs->posU));
1291 }
1292
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
1293 {
1294
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->velU), sizeof(obs->gnss1Outputs->velU));
1295 }
1296
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
1297 {
1298
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeU), sizeof(obs->gnss1Outputs->timeU));
1299 }
1300
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
1301 {
1302
1/2
✓ Branch 4 taken 130 times.
✗ Branch 5 not taken.
130 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeInfo.status.status()), sizeof(obs->gnss1Outputs->timeInfo.status.status()));
1303
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeInfo.leapSeconds), sizeof(obs->gnss1Outputs->timeInfo.leapSeconds));
1304 }
1305
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 106 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
1306 {
1307
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.gDop), sizeof(obs->gnss1Outputs->dop.gDop));
1308
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.pDop), sizeof(obs->gnss1Outputs->dop.pDop));
1309
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.tDop), sizeof(obs->gnss1Outputs->dop.tDop));
1310
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.vDop), sizeof(obs->gnss1Outputs->dop.vDop));
1311
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.hDop), sizeof(obs->gnss1Outputs->dop.hDop));
1312
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.nDop), sizeof(obs->gnss1Outputs->dop.nDop));
1313
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->dop.eDop), sizeof(obs->gnss1Outputs->dop.eDop));
1314 }
1315
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
1316 {
1317
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss1Outputs->satInfo.numSats), sizeof(obs->gnss1Outputs->satInfo.numSats));
1318
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss1Outputs->satInfo.satellites.resize(obs->gnss1Outputs->satInfo.numSats);
1319
1320
2/2
✓ Branch 7 taken 1121 times.
✓ Branch 8 taken 70 times.
1191 for (auto& satellite : obs->gnss1Outputs->satInfo.satellites)
1321 {
1322
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1323
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1324
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1325
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1326
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.qi), sizeof(satellite.qi));
1327
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.el), sizeof(satellite.el));
1328
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.az), sizeof(satellite.az));
1329 }
1330 }
1331
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
1332 {
1333
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss1Outputs->raw.tow), sizeof(obs->gnss1Outputs->raw.tow));
1334
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss1Outputs->raw.week), sizeof(obs->gnss1Outputs->raw.week));
1335
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss1Outputs->raw.numSats), sizeof(obs->gnss1Outputs->raw.numSats));
1336
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss1Outputs->raw.satellites.resize(obs->gnss1Outputs->raw.numSats);
1337
1338
2/2
✓ Branch 7 taken 655 times.
✓ Branch 8 taken 70 times.
725 for (auto& satellite : obs->gnss1Outputs->raw.satellites)
1339 {
1340
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1341
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1342
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.freq), sizeof(satellite.freq));
1343
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.chan), sizeof(satellite.chan));
1344
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.slot), sizeof(satellite.slot));
1345
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1346
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1347
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.pr), sizeof(satellite.pr));
1348
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.cp), sizeof(satellite.cp));
1349
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.dp), sizeof(satellite.dp));
1350 }
1351 }
1352 }
1353 // Group 5 (Attitude)
1354
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.attitudeField != vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE)
1355 {
1356
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->attitudeOutputs)
1357 {
1358
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->attitudeOutputs = std::make_shared<NAV::vendor::vectornav::AttitudeOutputs>();
1359
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->attitudeOutputs->attitudeField |= _binaryOutputRegister.attitudeField;
1360 }
1361
1362
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 130 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)
1363 {
1364 read(reinterpret_cast<char*>(&obs->attitudeOutputs->vpeStatus.status()), sizeof(obs->attitudeOutputs->vpeStatus.status()));
1365 }
1366
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)
1367 {
1368
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 130 times.
✗ Branch 7 not taken.
130 read(reinterpret_cast<char*>(obs->attitudeOutputs->ypr.data()), sizeof(obs->attitudeOutputs->ypr));
1369 }
1370
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)
1371 {
1372
2/4
✓ Branch 4 taken 130 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 130 times.
✗ Branch 8 not taken.
130 read(reinterpret_cast<char*>(obs->attitudeOutputs->qtn.coeffs().data()), sizeof(obs->attitudeOutputs->qtn));
1373 }
1374
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)
1375 {
1376
2/4
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 70 times.
✗ Branch 7 not taken.
70 read(reinterpret_cast<char*>(obs->attitudeOutputs->dcm.data()), sizeof(obs->attitudeOutputs->dcm));
1377 }
1378
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)
1379 {
1380
2/4
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 70 times.
✗ Branch 7 not taken.
70 read(reinterpret_cast<char*>(obs->attitudeOutputs->magNed.data()), sizeof(obs->attitudeOutputs->magNed));
1381 }
1382
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)
1383 {
1384
2/4
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 70 times.
✗ Branch 7 not taken.
70 read(reinterpret_cast<char*>(obs->attitudeOutputs->accelNed.data()), sizeof(obs->attitudeOutputs->accelNed));
1385 }
1386
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)
1387 {
1388
2/4
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 70 times.
✗ Branch 7 not taken.
70 read(reinterpret_cast<char*>(obs->attitudeOutputs->linearAccelBody.data()), sizeof(obs->attitudeOutputs->linearAccelBody));
1389 }
1390
3/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 60 times.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)
1391 {
1392
2/4
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 70 times.
✗ Branch 7 not taken.
70 read(reinterpret_cast<char*>(obs->attitudeOutputs->linearAccelNed.data()), sizeof(obs->attitudeOutputs->linearAccelNed));
1393 }
1394
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 130 times.
✗ Branch 6 not taken.
130 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)
1395 {
1396
2/4
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 130 times.
✗ Branch 7 not taken.
130 read(reinterpret_cast<char*>(obs->attitudeOutputs->yprU.data()), sizeof(obs->attitudeOutputs->yprU));
1397 }
1398 }
1399 // Group 6 (INS)
1400
2/2
✓ Branch 0 taken 94 times.
✓ Branch 1 taken 36 times.
130 if (_binaryOutputRegister.insField != vn::protocol::uart::InsGroup::INSGROUP_NONE)
1401 {
1402
1/2
✓ Branch 2 taken 94 times.
✗ Branch 3 not taken.
94 if (!obs->insOutputs)
1403 {
1404
1/2
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
94 obs->insOutputs = std::make_shared<NAV::vendor::vectornav::InsOutputs>();
1405
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 obs->insOutputs->insField |= _binaryOutputRegister.insField;
1406 }
1407
1408
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)
1409 {
1410
1/2
✓ Branch 4 taken 94 times.
✗ Branch 5 not taken.
94 read(reinterpret_cast<char*>(&obs->insOutputs->insStatus.status()), sizeof(obs->insOutputs->insStatus.status()));
1411 }
1412
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)
1413 {
1414
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->posLla.data()), sizeof(obs->insOutputs->posLla));
1415 }
1416
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)
1417 {
1418
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->posEcef.data()), sizeof(obs->insOutputs->posEcef));
1419 }
1420
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)
1421 {
1422
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->velBody.data()), sizeof(obs->insOutputs->velBody));
1423 }
1424
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)
1425 {
1426
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->velNed.data()), sizeof(obs->insOutputs->velNed));
1427 }
1428
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)
1429 {
1430
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->velEcef.data()), sizeof(obs->insOutputs->velEcef));
1431 }
1432
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)
1433 {
1434
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->magEcef.data()), sizeof(obs->insOutputs->magEcef));
1435 }
1436
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)
1437 {
1438
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->accelEcef.data()), sizeof(obs->insOutputs->accelEcef));
1439 }
1440
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)
1441 {
1442
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 94 times.
✗ Branch 7 not taken.
94 read(reinterpret_cast<char*>(obs->insOutputs->linearAccelEcef.data()), sizeof(obs->insOutputs->linearAccelEcef));
1443 }
1444
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSU)
1445 {
1446
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->insOutputs->posU), sizeof(obs->insOutputs->posU));
1447 }
1448
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELU)
1449 {
1450
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->insOutputs->velU), sizeof(obs->insOutputs->velU));
1451 }
1452 }
1453 // Group 7 (GNSS2)
1454
2/2
✓ Branch 0 taken 94 times.
✓ Branch 1 taken 36 times.
130 if (_binaryOutputRegister.gps2Field != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
1455 {
1456
1/2
✓ Branch 2 taken 94 times.
✗ Branch 3 not taken.
94 if (!obs->gnss2Outputs)
1457 {
1458
1/2
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
94 obs->gnss2Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
1459
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 obs->gnss2Outputs->gnssField |= _binaryOutputRegister.gps2Field;
1460 }
1461
1462
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
1463 {
1464
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.year), sizeof(obs->gnss2Outputs->timeUtc.year));
1465
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.month), sizeof(obs->gnss2Outputs->timeUtc.month));
1466
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.day), sizeof(obs->gnss2Outputs->timeUtc.day));
1467
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.hour), sizeof(obs->gnss2Outputs->timeUtc.hour));
1468
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.min), sizeof(obs->gnss2Outputs->timeUtc.min));
1469
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.sec), sizeof(obs->gnss2Outputs->timeUtc.sec));
1470
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeUtc.ms), sizeof(obs->gnss2Outputs->timeUtc.ms));
1471 }
1472
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
1473 {
1474
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->tow), sizeof(obs->gnss2Outputs->tow));
1475 }
1476
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
1477 {
1478
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->week), sizeof(obs->gnss2Outputs->week));
1479 }
1480
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
1481 {
1482
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->numSats), sizeof(obs->gnss2Outputs->numSats));
1483 }
1484
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
1485 {
1486
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->fix), sizeof(obs->gnss2Outputs->fix));
1487 }
1488
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
1489 {
1490
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss2Outputs->posLla.data()), sizeof(obs->gnss2Outputs->posLla));
1491 }
1492
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
1493 {
1494
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss2Outputs->posEcef.data()), sizeof(obs->gnss2Outputs->posEcef));
1495 }
1496
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
1497 {
1498
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss2Outputs->velNed.data()), sizeof(obs->gnss2Outputs->velNed));
1499 }
1500
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
1501 {
1502
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss2Outputs->velEcef.data()), sizeof(obs->gnss2Outputs->velEcef));
1503 }
1504
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
1505 {
1506
2/4
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 24 times.
✗ Branch 7 not taken.
24 read(reinterpret_cast<char*>(obs->gnss2Outputs->posU.data()), sizeof(obs->gnss2Outputs->posU));
1507 }
1508
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
1509 {
1510
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->velU), sizeof(obs->gnss2Outputs->velU));
1511 }
1512
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
1513 {
1514
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeU), sizeof(obs->gnss2Outputs->timeU));
1515 }
1516
2/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 94 times.
✗ Branch 6 not taken.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
1517 {
1518
1/2
✓ Branch 4 taken 94 times.
✗ Branch 5 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeInfo.status.status()), sizeof(obs->gnss2Outputs->timeInfo.status.status()));
1519
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeInfo.leapSeconds), sizeof(obs->gnss2Outputs->timeInfo.leapSeconds));
1520 }
1521
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 24 times.
✓ Branch 6 taken 70 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
1522 {
1523
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.gDop), sizeof(obs->gnss2Outputs->dop.gDop));
1524
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.pDop), sizeof(obs->gnss2Outputs->dop.pDop));
1525
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.tDop), sizeof(obs->gnss2Outputs->dop.tDop));
1526
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.vDop), sizeof(obs->gnss2Outputs->dop.vDop));
1527
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.hDop), sizeof(obs->gnss2Outputs->dop.hDop));
1528
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.nDop), sizeof(obs->gnss2Outputs->dop.nDop));
1529
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->dop.eDop), sizeof(obs->gnss2Outputs->dop.eDop));
1530 }
1531
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 24 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
1532 {
1533
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss2Outputs->satInfo.numSats), sizeof(obs->gnss2Outputs->satInfo.numSats));
1534
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss2Outputs->satInfo.satellites.resize(obs->gnss2Outputs->satInfo.numSats);
1535
1536
2/2
✓ Branch 7 taken 1146 times.
✓ Branch 8 taken 70 times.
1216 for (auto& satellite : obs->gnss2Outputs->satInfo.satellites)
1537 {
1538
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1539
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1540
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1541
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1542
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.qi), sizeof(satellite.qi));
1543
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.el), sizeof(satellite.el));
1544
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.az), sizeof(satellite.az));
1545 }
1546 }
1547
3/4
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 70 times.
✓ Branch 6 taken 24 times.
94 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
1548 {
1549
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss2Outputs->raw.tow), sizeof(obs->gnss2Outputs->raw.tow));
1550
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss2Outputs->raw.week), sizeof(obs->gnss2Outputs->raw.week));
1551
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->gnss2Outputs->raw.numSats), sizeof(obs->gnss2Outputs->raw.numSats));
1552
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss2Outputs->raw.satellites.resize(obs->gnss2Outputs->raw.numSats);
1553
1554
2/2
✓ Branch 7 taken 543 times.
✓ Branch 8 taken 70 times.
613 for (auto& satellite : obs->gnss2Outputs->raw.satellites)
1555 {
1556
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1557
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1558
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.freq), sizeof(satellite.freq));
1559
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.chan), sizeof(satellite.chan));
1560
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.slot), sizeof(satellite.slot));
1561
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1562
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1563
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.pr), sizeof(satellite.pr));
1564
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.cp), sizeof(satellite.cp));
1565
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.dp), sizeof(satellite.dp));
1566 }
1567 }
1568 }
1569 }
1570
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 catch (const std::exception& e)
1571 {
1572
3/6
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 5 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 5 times.
✗ Branch 10 not taken.
5 LOG_DEBUG("{}: {} after {} messages", nameId(), e.what(), _messageCount);
1573 5 return nullptr;
1574 5 }
1575 }
1576
1577 28675 _messageCount++;
1578
1579
1/2
✓ Branch 2 taken 28674 times.
✗ Branch 3 not taken.
28675 invokeCallbacks(OUTPUT_PORT_INDEX_VECTORNAV_BINARY_OUTPUT, obs);
1580 28674 return obs;
1581 28720 }
1582