INSTINCT Code Coverage Report


Directory: src/
File: Nodes/DataProvider/IMU/FileReader/VectorNavFile.cpp
Date: 2025-11-25 23:34:18
Exec Total Coverage
Lines: 958 1153 83.1%
Functions: 65 73 89.0%
Branches: 1275 2496 51.1%

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 <cstdint>
12 #include <exception>
13 #include <limits>
14 #include "Navigation/GNSS/Core/SatelliteIdentifier.hpp"
15 #include "Navigation/GNSS/Core/SatelliteSystem.hpp"
16 #include "util/Vendor/VectorNav/VectorNavTypes.hpp"
17 #include <vn/types.h>
18
19 #include "util/Logger.hpp"
20 #include "util/Assert.h"
21 #include "util/StringUtil.hpp"
22 #include "Navigation/Transformations/CoordinateFrames.hpp"
23
24 #include "internal/FlowManager.hpp"
25
26 #include "NodeData/IMU/VectorNavBinaryOutput.hpp"
27 #include "Nodes/DataProvider/IMU/Sensors/VectorNavSensor.hpp"
28
29 161 NAV::VectorNavFile::VectorNavFile()
30
3/6
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 161 times.
✗ Branch 9 not taken.
161 : Imu(typeStatic())
31 {
32 LOG_TRACE("{}: called", name);
33
34 161 _hasConfig = true;
35 161 _guiConfigDefaultWindowSize = { 630, 466 };
36
37
4/8
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 161 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 161 times.
✓ Branch 9 taken 161 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
483 CreateOutputPin("Binary Output", Pin::Type::Flow, { NAV::VectorNavBinaryOutput::type() }, &VectorNavFile::pollData);
38 322 }
39
40 416 NAV::VectorNavFile::~VectorNavFile()
41 {
42 LOG_TRACE("{}: called", nameId());
43 416 }
44
45 275 std::string NAV::VectorNavFile::typeStatic()
46 {
47
1/2
✓ Branch 1 taken 275 times.
✗ Branch 2 not taken.
550 return "VectorNavFile";
48 }
49
50 std::string NAV::VectorNavFile::type() const
51 {
52 return typeStatic();
53 }
54
55 114 std::string NAV::VectorNavFile::category()
56 {
57
1/2
✓ Branch 1 taken 114 times.
✗ Branch 2 not taken.
228 return "Data Provider";
58 }
59
60 void NAV::VectorNavFile::guiConfig()
61 {
62 if (auto res = FileReader::guiConfig("Supported types (*.csv *.vnb){.csv,.vnb},.*", { ".csv", ".vnb" }, size_t(id), nameId()))
63 {
64 LOG_DEBUG("{}: Path changed to {}", nameId(), _path);
65 flow::ApplyChanges();
66 if (res == FileReader::PATH_CHANGED)
67 {
68 doReinitialize();
69 }
70 else
71 {
72 doDeinitialize();
73 }
74 }
75
76 Imu::guiConfig();
77
78 // Header info
79 if (ImGui::BeginTable(fmt::format("##VectorNavHeaders ({})", id.AsPointer()).c_str(), 6,
80 ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_NoHostExtendX | ImGuiTableFlags_SizingFixedFit))
81 {
82 ImGui::TableSetupColumn("Time", ImGuiTableColumnFlags_WidthFixed);
83 ImGui::TableSetupColumn("IMU", ImGuiTableColumnFlags_WidthFixed);
84 ImGui::TableSetupColumn("GNSS1", ImGuiTableColumnFlags_WidthFixed);
85 ImGui::TableSetupColumn("Attitude", ImGuiTableColumnFlags_WidthFixed);
86 ImGui::TableSetupColumn("INS", ImGuiTableColumnFlags_WidthFixed);
87 ImGui::TableSetupColumn("GNSS2", ImGuiTableColumnFlags_WidthFixed);
88 ImGui::TableHeadersRow();
89
90 auto TextColored = [](int index, const char* label, bool enabled) {
91 ImGui::TableSetColumnIndex(index);
92 if (enabled)
93 {
94 ImGui::TextUnformatted(label);
95 }
96 else
97 {
98 ImGui::TextDisabled("%s", label);
99 }
100 };
101
102 for (size_t i = 0; i < 16; i++)
103 {
104 if (i < std::max({ /* VectorNavSensor::_binaryGroupCommon.size(), */ VectorNavSensor::_binaryGroupTime.size(), VectorNavSensor::_binaryGroupIMU.size(),
105 VectorNavSensor::_binaryGroupGNSS.size(), VectorNavSensor::_binaryGroupAttitude.size(), VectorNavSensor::_binaryGroupINS.size() }))
106 {
107 ImGui::TableNextRow();
108 }
109 if (i < VectorNavSensor::_binaryGroupTime.size())
110 {
111 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupTime.at(i);
112 TextColored(0, binaryGroupItem.name, _binaryOutputRegister.timeField & binaryGroupItem.flagsValue);
113 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
114 {
115 ImGui::BeginTooltip();
116 binaryGroupItem.tooltip();
117 ImGui::EndTooltip();
118 }
119 }
120 if (i < VectorNavSensor::_binaryGroupIMU.size())
121 {
122 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupIMU.at(i);
123 TextColored(1, binaryGroupItem.name, _binaryOutputRegister.imuField & binaryGroupItem.flagsValue);
124 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
125 {
126 ImGui::BeginTooltip();
127 binaryGroupItem.tooltip();
128 ImGui::EndTooltip();
129 }
130 }
131 if (i < VectorNavSensor::_binaryGroupGNSS.size())
132 {
133 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupGNSS.at(i);
134 TextColored(2, binaryGroupItem.name, _binaryOutputRegister.gpsField & binaryGroupItem.flagsValue);
135 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
136 {
137 ImGui::BeginTooltip();
138 binaryGroupItem.tooltip();
139 ImGui::EndTooltip();
140 }
141 }
142 if (i < VectorNavSensor::_binaryGroupAttitude.size())
143 {
144 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupAttitude.at(i);
145 TextColored(3, binaryGroupItem.name, _binaryOutputRegister.attitudeField & binaryGroupItem.flagsValue);
146 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
147 {
148 ImGui::BeginTooltip();
149 binaryGroupItem.tooltip();
150 ImGui::EndTooltip();
151 }
152 }
153 if (i < VectorNavSensor::_binaryGroupINS.size())
154 {
155 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupINS.at(i);
156 TextColored(4, binaryGroupItem.name, _binaryOutputRegister.insField & binaryGroupItem.flagsValue);
157 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
158 {
159 ImGui::BeginTooltip();
160 binaryGroupItem.tooltip();
161 ImGui::EndTooltip();
162 }
163 }
164 if (i < VectorNavSensor::_binaryGroupGNSS.size())
165 {
166 const auto& binaryGroupItem = VectorNavSensor::_binaryGroupGNSS.at(i);
167 TextColored(5, binaryGroupItem.name, _binaryOutputRegister.gps2Field & binaryGroupItem.flagsValue);
168 if (ImGui::IsItemHovered() && binaryGroupItem.tooltip != nullptr)
169 {
170 ImGui::BeginTooltip();
171 binaryGroupItem.tooltip();
172 ImGui::EndTooltip();
173 }
174 }
175 }
176
177 ImGui::EndTable();
178 }
179 }
180
181 [[nodiscard]] json NAV::VectorNavFile::save() const
182 {
183 LOG_TRACE("{}: called", nameId());
184
185 json j;
186
187 j["FileReader"] = FileReader::save();
188 j["Imu"] = Imu::save();
189
190 return j;
191 }
192
193 47 void NAV::VectorNavFile::restore(json const& j)
194 {
195 LOG_TRACE("{}: called", nameId());
196
197
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
47 if (j.contains("FileReader"))
198 {
199 47 FileReader::restore(j.at("FileReader"));
200 }
201
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
47 if (j.contains("Imu"))
202 {
203 47 Imu::restore(j.at("Imu"));
204 }
205 47 }
206
207 47 bool NAV::VectorNavFile::initialize()
208 {
209 LOG_TRACE("{}: called", nameId());
210
211 47 return FileReader::initialize();
212 }
213
214 47 void NAV::VectorNavFile::deinitialize()
215 {
216 LOG_TRACE("{}: called", nameId());
217
218 47 FileReader::deinitialize();
219 47 }
220
221 94 bool NAV::VectorNavFile::resetNode()
222 {
223 94 FileReader::resetReader();
224
225 94 _messageCount = 0;
226
227 94 return true;
228 }
229
230 46 NAV::FileReader::FileType NAV::VectorNavFile::determineFileType()
231 {
232 LOG_TRACE("called");
233
234
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
46 std::filesystem::path filepath = getFilepath();
235
236
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
47 auto filestreamHeader = std::ifstream(filepath);
237
2/4
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 47 times.
✗ Branch 4 not taken.
47 if (good())
238 {
239 47 std::array<char, std::string_view("GpsCycle,GpsWeek,GpsTow").length()> buffer{};
240
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
94 filestreamHeader.read(buffer.data(), buffer.size());
241
1/2
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
47 filestreamHeader.close();
242
243
3/4
✓ Branch 1 taken 47 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 40 times.
✓ Branch 6 taken 5 times.
139 if (std::string(buffer.data(), buffer.size()).starts_with("Time [s]"))
244 {
245 40 _hasTimeColumn = true;
246 40 return FileType::ASCII;
247 }
248
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"))
249 {
250 _hasTimeColumn = false;
251 return FileType::ASCII;
252 }
253
254 5 return FileType::BINARY;
255 }
256
257 LOG_ERROR("Could not open file {}", filepath);
258 return FileType::NONE;
259 45 }
260
261 46 void NAV::VectorNavFile::readHeader()
262 {
263
2/2
✓ Branch 0 taken 41 times.
✓ Branch 1 taken 5 times.
46 if (_fileType == FileType::ASCII)
264 {
265 41 _binaryOutputRegister.timeField = vn::protocol::uart::TimeGroup::TIMEGROUP_NONE;
266 41 _binaryOutputRegister.imuField = vn::protocol::uart::ImuGroup::IMUGROUP_NONE;
267 41 _binaryOutputRegister.gpsField = vn::protocol::uart::GpsGroup::GPSGROUP_NONE;
268 41 _binaryOutputRegister.attitudeField = vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE;
269 41 _binaryOutputRegister.insField = vn::protocol::uart::InsGroup::INSGROUP_NONE;
270 41 _binaryOutputRegister.gps2Field = vn::protocol::uart::GpsGroup::GPSGROUP_NONE;
271
272 // Read header line
273 41 std::string line;
274
1/2
✓ Branch 1 taken 42 times.
✗ Branch 2 not taken.
42 getline(line);
275 // Remove any starting non text characters
276
2/4
✓ Branch 1 taken 38 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 41 times.
✗ Branch 8 not taken.
78 line.erase(line.begin(), std::ranges::find_if(line, [](int ch) { return std::isalnum(ch); }));
277 // Convert line into stream
278
1/2
✓ Branch 2 taken 40 times.
✗ Branch 3 not taken.
41 std::stringstream lineStream(line);
279 40 std::string cell;
280
281 41 int column = 0;
282 // Split line at comma
283 LOG_DATA("{}: Reading CSV header", nameId());
284
4/6
✓ Branch 1 taken 3235 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3235 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 3193 times.
✓ Branch 7 taken 42 times.
3234 while (std::getline(lineStream, cell, ','))
285 {
286 // Remove any trailing non text characters
287
2/4
✓ Branch 3 taken 3206 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 3194 times.
✗ Branch 8 not taken.
78824 cell.erase(std::ranges::find_if(cell, [](int ch) { return std::iscntrl(ch); }), cell.end());
288
289 LOG_DATA("{}: {}", nameId(), cell);
290
1/2
✓ Branch 1 taken 3192 times.
✗ Branch 2 not taken.
3194 _headerColumns.push_back(cell);
291
3/4
✓ Branch 0 taken 3193 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 3029 times.
✓ Branch 3 taken 163 times.
3192 if (column++ > (_hasTimeColumn ? 3 : 2))
292 {
293
1/2
✓ Branch 2 taken 3018 times.
✗ Branch 3 not taken.
3029 std::string group = cell.substr(0, cell.find("::")); // Extract the group (Time::TimeUTC::year -> 'Time')
294
295
1/2
✓ Branch 2 taken 3029 times.
✗ Branch 3 not taken.
3018 cell = cell.substr(cell.find("::") + 2); // Remove the group -> 'TimeUTC::year'
296
2/2
✓ Branch 1 taken 2637 times.
✓ Branch 2 taken 394 times.
3026 if (cell.find("::") != std::string::npos)
297 {
298
1/2
✓ Branch 2 taken 2636 times.
✗ Branch 3 not taken.
2637 cell = cell.substr(0, cell.find("::")); // Remove subgroups ('TimeUTC::year' -> 'TimeUTC')
299 }
300
2/2
✓ Branch 1 taken 251 times.
✓ Branch 2 taken 2778 times.
3032 if (cell.find(' ') != std::string::npos)
301 {
302
1/2
✓ Branch 2 taken 251 times.
✗ Branch 3 not taken.
251 cell = cell.substr(0, cell.find(' ')); // Remove everything after a blank, which is the unit ('TimeStartup [ns]' -> 'TimeStartup')
303 }
304
305 3027 bool identified = false;
306
3/4
✓ Branch 1 taken 3022 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 287 times.
✓ Branch 4 taken 2735 times.
3027 if (group == "Time")
307 {
308
1/2
✓ Branch 0 taken 1808 times.
✗ Branch 1 not taken.
1806 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupTime)
309 {
310
3/4
✓ Branch 1 taken 1802 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 283 times.
✓ Branch 4 taken 1519 times.
1808 if (cell == binaryGroupItem.name)
311 {
312
1/2
✓ Branch 1 taken 288 times.
✗ Branch 2 not taken.
283 _binaryOutputRegister.timeField |= static_cast<vn::protocol::uart::TimeGroup>(binaryGroupItem.flagsValue);
313 288 identified = true;
314 288 break;
315 }
316 }
317 }
318
3/4
✓ Branch 1 taken 2734 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 540 times.
✓ Branch 4 taken 2194 times.
2735 else if (group == "IMU")
319 {
320
2/2
✓ Branch 0 taken 3478 times.
✓ Branch 1 taken 1 times.
3479 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupIMU)
321 {
322
3/4
✓ Branch 1 taken 3477 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 520 times.
✓ Branch 4 taken 2957 times.
3478 if (cell == binaryGroupItem.name)
323 {
324
1/2
✓ Branch 1 taken 520 times.
✗ Branch 2 not taken.
520 _binaryOutputRegister.imuField |= static_cast<vn::protocol::uart::ImuGroup>(binaryGroupItem.flagsValue);
325 520 identified = true;
326 520 break;
327 }
328
3/4
✓ Branch 1 taken 2959 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 20 times.
✓ Branch 4 taken 2939 times.
2957 if (cell == "DeltaTime")
329 {
330
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 _binaryOutputRegister.imuField |= vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA;
331 20 identified = true;
332 20 break;
333 }
334 }
335 }
336
3/4
✓ Branch 1 taken 2206 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1440 times.
✓ Branch 4 taken 766 times.
2194 else if (group == "GNSS1")
337 {
338
1/2
✓ Branch 0 taken 18169 times.
✗ Branch 1 not taken.
18167 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupGNSS)
339 {
340
3/4
✓ Branch 1 taken 18167 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1440 times.
✓ Branch 4 taken 16727 times.
18169 if (cell == binaryGroupItem.name)
341 {
342
1/2
✓ Branch 1 taken 1440 times.
✗ Branch 2 not taken.
1440 _binaryOutputRegister.gpsField |= static_cast<vn::protocol::uart::GpsGroup>(binaryGroupItem.flagsValue);
343 1440 identified = true;
344 1440 break;
345 }
346 }
347 }
348
3/4
✓ Branch 1 taken 769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 165 times.
✓ Branch 4 taken 604 times.
766 else if (group == "Att")
349 {
350
1/2
✓ Branch 0 taken 648 times.
✗ Branch 1 not taken.
648 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupAttitude)
351 {
352
3/4
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 165 times.
✓ Branch 4 taken 483 times.
648 if (cell == binaryGroupItem.name)
353 {
354
1/2
✓ Branch 1 taken 165 times.
✗ Branch 2 not taken.
165 _binaryOutputRegister.attitudeField |= static_cast<vn::protocol::uart::AttitudeGroup>(binaryGroupItem.flagsValue);
355 165 identified = true;
356 165 break;
357 }
358 }
359 }
360
3/4
✓ Branch 1 taken 604 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 436 times.
✓ Branch 4 taken 168 times.
604 else if (group == "INS")
361 {
362
1/2
✓ Branch 0 taken 1735 times.
✗ Branch 1 not taken.
1735 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupINS)
363 {
364
3/4
✓ Branch 1 taken 1735 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 436 times.
✓ Branch 4 taken 1299 times.
1735 if (cell == binaryGroupItem.name)
365 {
366
1/2
✓ Branch 1 taken 436 times.
✗ Branch 2 not taken.
436 _binaryOutputRegister.insField |= static_cast<vn::protocol::uart::InsGroup>(binaryGroupItem.flagsValue);
367 436 identified = true;
368 436 break;
369 }
370 }
371 }
372
2/4
✓ Branch 1 taken 168 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 168 times.
✗ Branch 4 not taken.
168 else if (group == "GNSS2")
373 {
374
1/2
✓ Branch 0 taken 1411 times.
✗ Branch 1 not taken.
1411 for (const auto& binaryGroupItem : VectorNavSensor::_binaryGroupGNSS)
375 {
376
3/4
✓ Branch 1 taken 1411 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 168 times.
✓ Branch 4 taken 1243 times.
1411 if (cell == binaryGroupItem.name)
377 {
378
1/2
✓ Branch 1 taken 168 times.
✗ Branch 2 not taken.
168 _binaryOutputRegister.gps2Field |= static_cast<vn::protocol::uart::GpsGroup>(binaryGroupItem.flagsValue);
379 168 identified = true;
380 168 break;
381 }
382 }
383 }
384 else
385 {
386 LOG_ERROR("{}: Could not identify the group in CSV header - {}::{}", nameId(), group, cell);
387 doDeinitialize();
388 break;
389 }
390
391
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3034 times.
3034 if (!identified)
392 {
393 LOG_ERROR("{}: Could not identify the field in CSV header - {}::{}", nameId(), group, cell);
394 doDeinitialize();
395 break;
396 }
397 3034 }
398 }
399 42 }
400 else // if (fileType == FileType::BINARY)
401 {
402 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.timeField), sizeof(vn::protocol::uart::TimeGroup));
403 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.imuField), sizeof(vn::protocol::uart::ImuGroup));
404 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.gpsField), sizeof(vn::protocol::uart::GpsGroup));
405 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.attitudeField), sizeof(vn::protocol::uart::AttitudeGroup));
406 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.insField), sizeof(vn::protocol::uart::InsGroup));
407 5 read(reinterpret_cast<char*>(&_binaryOutputRegister.gps2Field), sizeof(vn::protocol::uart::GpsGroup));
408 }
409 47 }
410
411 28725 std::shared_ptr<const NAV::NodeData> NAV::VectorNavFile::pollData()
412 {
413
1/2
✓ Branch 1 taken 28723 times.
✗ Branch 2 not taken.
28725 auto obs = std::make_shared<VectorNavBinaryOutput>(_imuPos);
414
415
2/2
✓ Branch 0 taken 28590 times.
✓ Branch 1 taken 133 times.
28723 if (_fileType == FileType::ASCII)
416 {
417 // Read line
418 28590 std::string line;
419
1/2
✓ Branch 1 taken 28594 times.
✗ Branch 2 not taken.
28585 getline(line);
420 28594 _messageCount++;
421 // Remove any starting non text characters
422
2/4
✓ Branch 1 taken 28593 times.
✗ Branch 2 not taken.
✓ Branch 7 taken 28593 times.
✗ Branch 8 not taken.
57148 line.erase(line.begin(), std::ranges::find_if(line, [](int ch) { return std::isgraph(ch); }));
423 LOG_DATA("{}: Reading line {}: {}", nameId(), _messageCount + 1, line);
424
425
2/2
✓ Branch 1 taken 39 times.
✓ Branch 2 taken 28552 times.
28593 if (line.empty())
426 {
427
3/6
✓ Branch 1 taken 39 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 39 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 39 times.
✗ Branch 9 not taken.
39 LOG_DEBUG("{}: End of file reached after {} lines", nameId(), _messageCount);
428 39 return nullptr;
429 }
430
431 // Convert line into stream
432
1/2
✓ Branch 2 taken 28555 times.
✗ Branch 3 not taken.
28552 std::stringstream lineStream(line);
433
434 28555 size_t col = 0;
435 1268026 auto extractCell = [&lineStream, &col]() {
436
2/2
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 1268049 times.
1268026 if (lineStream.eof())
437 {
438
1/2
✓ Branch 2 taken 3 times.
✗ Branch 3 not taken.
3 throw std::runtime_error("End of file");
439 }
440 1268049 col++;
441
3/6
✓ Branch 2 taken 1267134 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 1267315 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1267331 times.
✗ Branch 8 not taken.
1268049 if (std::string cell; std::getline(lineStream, cell, ','))
442 {
443 // Remove any trailing non text characters
444
2/4
✓ Branch 3 taken 1267760 times.
✗ Branch 4 not taken.
✓ Branch 7 taken 1267475 times.
✗ Branch 8 not taken.
22618048 cell.erase(std::ranges::find_if(cell, [](int ch) { return std::iscntrl(ch); }), cell.end());
445
446 // LOG_DEBUG(" extractCell: {}", cell);
447 1267475 return cell;
448 1267105 }
449
1/2
✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
12 return std::string("");
450 28555 };
451 2895794 auto extractRemoveTillDelimiter = [](std::string& str, const std::string& delimiter) {
452 2895794 std::string extract;
453
1/2
✓ Branch 1 taken 2895794 times.
✗ Branch 2 not taken.
2895794 if (size_t pos = str.find(delimiter);
454 pos != std::string::npos)
455 {
456
1/2
✓ Branch 1 taken 2895794 times.
✗ Branch 2 not taken.
2895794 extract = str.substr(0, pos);
457
1/2
✓ Branch 1 taken 2895794 times.
✗ Branch 2 not taken.
2895794 str = str.substr(pos + 1);
458 }
459
460 2895794 return extract;
461 };
462
463 2308072 auto extractSingleValue = [&](auto& field, auto flag, auto& out) {
464 static_assert(std::is_same_v<bool&, decltype(out)> || std::is_same_v<uint8_t&, decltype(out)> || std::is_same_v<uint16_t&, decltype(out)> || std::is_same_v<uint32_t&, decltype(out)> || std::is_same_v<uint64_t&, decltype(out)>
465 || std::is_same_v<int8_t&, decltype(out)> || std::is_same_v<int16_t&, decltype(out)> || std::is_same_v<int32_t&, decltype(out)>
466 || std::is_same_v<float&, decltype(out)> || std::is_same_v<double&, decltype(out)>
467 || std::is_same_v<std::string&, decltype(out)>);
468
469
2/2
✓ Branch 1 taken 1154027 times.
✓ Branch 2 taken 3 times.
2308072 auto cell = extractCell();
470 LOG_DATA("{}: Extracting {}: {}", nameId(), vn::protocol::uart::to_string(flag), cell);
471
472
2/2
✓ Branch 1 taken 2190 times.
✓ Branch 2 taken 1151843 times.
2308054 if (cell.empty()) { return; }
473
474
1/2
✓ Branch 1 taken 1151853 times.
✗ Branch 2 not taken.
2303686 field |= flag; // set the flag
475 if constexpr (std::is_same_v<bool&, decltype(out)>
476 || std::is_same_v<uint8_t&, decltype(out)>
477 || std::is_same_v<uint16_t&, decltype(out)>
478 || std::is_same_v<uint32_t&, decltype(out)>)
479 {
480
1/2
✓ Branch 1 taken 264188 times.
✗ Branch 2 not taken.
528362 out = static_cast<std::remove_reference_t<decltype(out)>>(std::stoul(cell));
481 }
482 else if constexpr (std::is_same_v<uint64_t&, decltype(out)>)
483 {
484
1/2
✓ Branch 1 taken 85723 times.
✗ Branch 2 not taken.
171466 out = static_cast<std::remove_reference_t<decltype(out)>>(std::stoull(cell));
485 }
486 else if constexpr (std::is_same_v<int8_t&, decltype(out)>
487 || std::is_same_v<int16_t&, decltype(out)>
488 || std::is_same_v<int32_t&, decltype(out)>)
489 {
490
1/2
✓ Branch 1 taken 29126 times.
✗ Branch 2 not taken.
58252 out = static_cast<std::remove_reference_t<decltype(out)>>(std::stoi(cell));
491 }
492 else if constexpr (std::is_same_v<float&, decltype(out)>)
493 {
494
1/2
✓ Branch 1 taken 747909 times.
✗ Branch 2 not taken.
1495816 out = static_cast<std::remove_reference_t<decltype(out)>>(std::stof(cell));
495 }
496 else if constexpr (std::is_same_v<double&, decltype(out)>)
497 {
498
1/2
✓ Branch 1 taken 19573 times.
✗ Branch 2 not taken.
39146 out = static_cast<std::remove_reference_t<decltype(out)>>(std::stod(cell));
499 }
500 else if constexpr (std::is_same_v<std::string&, decltype(out)>)
501 {
502
1/2
✓ Branch 1 taken 5332 times.
✗ Branch 2 not taken.
10664 out = cell;
503 }
504
2/2
✓ Branch 1 taken 1151835 times.
✓ Branch 2 taken 2189 times.
2336637 };
505
506 1018136 auto extractValue = [&](auto& field, auto flag, auto&... out) {
507 1018136 (extractSingleValue(field, flag, out), ...);
508 1046697 };
509
510 try
511 {
512
3/4
✓ Branch 0 taken 28554 times.
✓ Branch 1 taken 1 times.
✓ Branch 3 taken 28554 times.
✗ Branch 4 not taken.
28555 if (_hasTimeColumn) { extractCell(); } // Time [s]
513
1/2
✓ Branch 1 taken 28554 times.
✗ Branch 2 not taken.
28556 std::string gpsCycle = extractCell();
514
1/2
✓ Branch 1 taken 28555 times.
✗ Branch 2 not taken.
28554 std::string gpsWeek = extractCell();
515
1/2
✓ Branch 1 taken 28553 times.
✗ Branch 2 not taken.
28555 std::string gpsTow = extractCell();
516
6/8
✓ Branch 1 taken 28544 times.
✓ Branch 2 taken 10 times.
✓ Branch 4 taken 28544 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 28545 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 28545 times.
✓ Branch 10 taken 10 times.
28553 if (!gpsCycle.empty() && !gpsWeek.empty() && !gpsTow.empty())
517 {
518
4/8
✓ Branch 2 taken 28543 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 28540 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 28543 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 28544 times.
✗ Branch 12 not taken.
28545 obs->insTime = InsTime(std::stoi(gpsCycle), std::stoi(gpsWeek), std::stold(gpsTow));
519 }
520 else
521 {
522 LOG_DATA("{}: Skipping message {}, as no InsTime set.", nameId(), _messageCount + 1);
523 10 return obs;
524 }
525
526
2/2
✓ Branch 1 taken 509247 times.
✓ Branch 2 taken 28519 times.
537796 for (; col < _headerColumns.size();)
527 {
528
1/2
✓ Branch 1 taken 509235 times.
✗ Branch 2 not taken.
509247 const auto& column = _headerColumns.at(col);
529 // Group 2 (Time)
530
1/2
✓ Branch 0 taken 509243 times.
✗ Branch 1 not taken.
509235 if (_binaryOutputRegister.timeField != vn::protocol::uart::TimeGroup::TIMEGROUP_NONE)
531 {
532
3/4
✓ Branch 2 taken 28538 times.
✓ Branch 3 taken 480646 times.
✓ Branch 5 taken 28541 times.
✗ Branch 6 not taken.
509243 if (!obs->timeOutputs) { obs->timeOutputs = std::make_shared<NAV::vendor::vectornav::TimeOutputs>(); }
533
534
3/4
✓ Branch 1 taken 509071 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28539 times.
✓ Branch 4 taken 480532 times.
509185 if (column == "Time::TimeStartup [ns]")
535 {
536
1/2
✓ Branch 5 taken 28541 times.
✗ Branch 6 not taken.
28539 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTARTUP, obs->timeOutputs->timeStartup);
537 28541 continue;
538 }
539
3/4
✓ Branch 1 taken 480561 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 480530 times.
480532 if (column == "Time::TimeGps [ns]")
540 {
541
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPS, obs->timeOutputs->timeGps);
542 31 continue;
543 }
544
3/4
✓ Branch 1 taken 480511 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28539 times.
✓ Branch 4 taken 451972 times.
480530 if (column == "Time::GpsTow [ns]")
545 {
546
2/2
✓ Branch 5 taken 28538 times.
✓ Branch 6 taken 3 times.
28539 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW, obs->timeOutputs->gpsTow);
547 28538 continue;
548 }
549
3/4
✓ Branch 1 taken 451981 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28538 times.
✓ Branch 4 taken 423443 times.
451972 if (column == "Time::GpsWeek")
550 {
551
1/2
✓ Branch 5 taken 28536 times.
✗ Branch 6 not taken.
28538 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK, obs->timeOutputs->gpsWeek);
552 28536 continue;
553 }
554
3/4
✓ Branch 1 taken 423500 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 423469 times.
423443 if (column == "Time::TimeSyncIn [ns]")
555 {
556
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESYNCIN, obs->timeOutputs->timeSyncIn);
557 31 continue;
558 }
559
3/4
✓ Branch 1 taken 423486 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 423455 times.
423469 if (column == "Time::TimeGpsPps [ns]")
560 {
561
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPSPPS, obs->timeOutputs->timePPS);
562 31 continue;
563 }
564
3/4
✓ Branch 1 taken 423461 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 423382 times.
423455 if (column == "Time::TimeUTC::year")
565 {
566
1/2
✓ Branch 2 taken 79 times.
✗ Branch 3 not taken.
79 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC,
567 79 obs->timeOutputs->timeUtc.year, obs->timeOutputs->timeUtc.month, obs->timeOutputs->timeUtc.day,
568 79 obs->timeOutputs->timeUtc.hour, obs->timeOutputs->timeUtc.min, obs->timeOutputs->timeUtc.sec, obs->timeOutputs->timeUtc.ms);
569 79 continue;
570 }
571
3/4
✓ Branch 1 taken 423398 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 423367 times.
423382 if (column == "Time::SyncInCnt")
572 {
573
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCINCNT, obs->timeOutputs->syncInCnt);
574 31 continue;
575 }
576
3/4
✓ Branch 1 taken 423355 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 38 times.
✓ Branch 4 taken 423317 times.
423367 if (column == "Time::SyncOutCnt")
577 {
578
1/2
✓ Branch 5 taken 38 times.
✗ Branch 6 not taken.
38 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCOUTCNT, obs->timeOutputs->syncOutCnt);
579 38 continue;
580 }
581
3/4
✓ Branch 1 taken 423309 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28537 times.
✓ Branch 4 taken 394772 times.
423317 if (column == "Time::TimeStatus::timeOk") // "Time::TimeStatus::dateOk", "Time::TimeStatus::utcTimeValid"
582 {
583 28537 uint8_t timeOk{};
584 28537 uint8_t dateOk{};
585 28537 uint8_t utcTimeValid{};
586
1/2
✓ Branch 3 taken 28539 times.
✗ Branch 4 not taken.
28537 extractValue(obs->timeOutputs->timeField, vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS, timeOk, dateOk, utcTimeValid);
587 28539 obs->timeOutputs->timeStatus = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
588 28537 continue;
589 28537 }
590 }
591 // Group 3 (IMU)
592
2/2
✓ Branch 0 taken 336240 times.
✓ Branch 1 taken 58524 times.
394764 if (_binaryOutputRegister.imuField != vn::protocol::uart::ImuGroup::IMUGROUP_NONE)
593 {
594
3/4
✓ Branch 2 taken 25848 times.
✓ Branch 3 taken 310392 times.
✓ Branch 5 taken 25848 times.
✗ Branch 6 not taken.
336240 if (!obs->imuOutputs) { obs->imuOutputs = std::make_shared<NAV::vendor::vectornav::ImuOutputs>(); }
595
596
2/4
✓ Branch 1 taken 336240 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 336240 times.
336240 if (column == "IMU::ImuStatus")
597 {
598 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_IMUSTATUS, obs->imuOutputs->imuStatus);
599 continue;
600 }
601
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 310391 times.
336240 if (column.starts_with("IMU::UncompMag::X")) // "IMU::UncompMag::Y [Gauss]", "IMU::UncompMag::Z [Gauss]"
602 {
603
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG,
604
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->uncompMag.x(), obs->imuOutputs->uncompMag.y(), obs->imuOutputs->uncompMag.z());
605 25848 continue;
606 }
607
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 284543 times.
310391 if (column.starts_with("IMU::UncompAccel::X")) // "IMU::UncompAccel::Y [m/s^2]", "IMU::UncompAccel::Z [m/s^2]"
608 {
609
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL,
610
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->uncompAccel.x(), obs->imuOutputs->uncompAccel.y(), obs->imuOutputs->uncompAccel.z());
611 25848 continue;
612 }
613
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 258696 times.
284543 if (column.starts_with("IMU::UncompGyro::X")) // "IMU::UncompGyro::Y [rad/s]", "IMU::UncompGyro::Z [rad/s]"
614 {
615
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO,
616
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->uncompGyro.x(), obs->imuOutputs->uncompGyro.y(), obs->imuOutputs->uncompGyro.z());
617 25848 continue;
618 }
619
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 232848 times.
258696 if (column.starts_with("IMU::Temp"))
620 {
621
1/2
✓ Branch 5 taken 25848 times.
✗ Branch 6 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_TEMP, obs->imuOutputs->temp);
622 25848 continue;
623 }
624
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 207000 times.
232848 if (column.starts_with("IMU::Pres"))
625 {
626
1/2
✓ Branch 5 taken 25848 times.
✗ Branch 6 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_PRES, obs->imuOutputs->pres);
627 25848 continue;
628 }
629
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 181152 times.
207000 if (column.starts_with("IMU::DeltaTime")) // "IMU::DeltaTheta::X [deg]", "IMU::DeltaTheta::Y [deg]", "IMU::DeltaTheta::Z [deg]"
630 {
631
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA,
632
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->deltaTime, obs->imuOutputs->deltaTheta.x(), obs->imuOutputs->deltaTheta.y(), obs->imuOutputs->deltaTheta.z());
633 25848 continue;
634 }
635
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 155304 times.
181152 if (column.starts_with("IMU::DeltaVel::X")) // "IMU::DeltaVel::Y [m/s]", "IMU::DeltaVel::Z [m/s]"
636 {
637
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL,
638
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->deltaV.x(), obs->imuOutputs->deltaV.y(), obs->imuOutputs->deltaV.z());
639 25848 continue;
640 }
641
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 129456 times.
155304 if (column.starts_with("IMU::Mag::X")) // "IMU::Mag::Y [Gauss]", "IMU::Mag::Z [Gauss]"
642 {
643
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_MAG,
644
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->mag.x(), obs->imuOutputs->mag.y(), obs->imuOutputs->mag.z());
645 25848 continue;
646 }
647
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 103608 times.
129456 if (column.starts_with("IMU::Accel::X")) // "IMU::Accel::Y [m/s^2]", "IMU::Accel::Z [m/s^2]"
648 {
649
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL,
650
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->accel.x(), obs->imuOutputs->accel.y(), obs->imuOutputs->accel.z());
651 25848 continue;
652 }
653
2/2
✓ Branch 1 taken 25848 times.
✓ Branch 2 taken 77760 times.
103608 if (column.starts_with("IMU::AngularRate::X")) // "IMU::AngularRate::Y [rad/s]", "IMU::AngularRate::Z [rad/s]"
654 {
655
1/2
✓ Branch 2 taken 25848 times.
✗ Branch 3 not taken.
25848 extractValue(obs->imuOutputs->imuField, vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE,
656
3/6
✓ Branch 3 taken 25848 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 25848 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 25848 times.
✗ Branch 14 not taken.
25848 obs->imuOutputs->angularRate.x(), obs->imuOutputs->angularRate.y(), obs->imuOutputs->angularRate.z());
657 25848 continue;
658 }
659 }
660 // Group 4 (GNSS1)
661
1/2
✓ Branch 0 taken 136494 times.
✗ Branch 1 not taken.
136284 if (_binaryOutputRegister.gpsField != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
662 {
663
3/4
✓ Branch 2 taken 28542 times.
✓ Branch 3 taken 107934 times.
✓ Branch 5 taken 28540 times.
✗ Branch 6 not taken.
136494 if (!obs->gnss1Outputs) { obs->gnss1Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>(); }
664
665
3/4
✓ Branch 1 taken 136457 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 136409 times.
136475 if (column == "GNSS1::UTC::year") // "GNSS1::UTC::month", "GNSS1::UTC::day", "GNSS1::UTC::hour", "GNSS1::UTC::min", "GNSS1::UTC::sec", "GNSS1::UTC::ms"
666 {
667
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_UTC,
668 48 obs->gnss1Outputs->timeUtc.year, obs->gnss1Outputs->timeUtc.month, obs->gnss1Outputs->timeUtc.day,
669 48 obs->gnss1Outputs->timeUtc.hour, obs->gnss1Outputs->timeUtc.min, obs->gnss1Outputs->timeUtc.sec, obs->gnss1Outputs->timeUtc.ms);
670 48 continue;
671 }
672
3/4
✓ Branch 1 taken 136405 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28507 times.
✓ Branch 4 taken 107898 times.
136409 if (column == "GNSS1::Tow [ns]")
673 {
674
1/2
✓ Branch 5 taken 28511 times.
✗ Branch 6 not taken.
28507 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TOW, obs->gnss1Outputs->tow);
675 28511 continue;
676 }
677
3/4
✓ Branch 1 taken 107906 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28510 times.
✓ Branch 4 taken 79396 times.
107898 if (column == "GNSS1::Week")
678 {
679
1/2
✓ Branch 5 taken 28510 times.
✗ Branch 6 not taken.
28510 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_WEEK, obs->gnss1Outputs->week);
680 28510 continue;
681 }
682
3/4
✓ Branch 1 taken 79415 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2687 times.
✓ Branch 4 taken 76728 times.
79396 if (column == "GNSS1::NumSats")
683 {
684
1/2
✓ Branch 5 taken 2687 times.
✗ Branch 6 not taken.
2687 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS, obs->gnss1Outputs->numSats);
685 2687 continue;
686 }
687
3/4
✓ Branch 1 taken 76726 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2694 times.
✓ Branch 4 taken 74032 times.
76728 if (column == "GNSS1::Fix")
688 {
689
1/2
✓ Branch 5 taken 2694 times.
✗ Branch 6 not taken.
2694 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_FIX, obs->gnss1Outputs->fix);
690 2694 continue;
691 }
692
3/4
✓ Branch 1 taken 74033 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2663 times.
✓ Branch 4 taken 71370 times.
74032 if (column == "GNSS1::PosLla::latitude [deg]") // "GNSS1::PosLla::longitude [deg]", "GNSS1::PosLla::altitude [m]"
693 {
694
1/2
✓ Branch 2 taken 2663 times.
✗ Branch 3 not taken.
2663 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA,
695
3/6
✓ Branch 3 taken 2663 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2663 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2663 times.
✗ Branch 14 not taken.
2663 obs->gnss1Outputs->posLla.x(), obs->gnss1Outputs->posLla.y(), obs->gnss1Outputs->posLla.z());
696 2663 continue;
697 }
698
3/4
✓ Branch 1 taken 71372 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 71324 times.
71370 if (column == "GNSS1::PosEcef::X [m]") // "GNSS1::PosEcef::Y [m]", "GNSS1::PosEcef::Z [m]"
699 {
700
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF,
701
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss1Outputs->posEcef.x(), obs->gnss1Outputs->posEcef.y(), obs->gnss1Outputs->posEcef.z());
702 48 continue;
703 }
704
3/4
✓ Branch 1 taken 71321 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2656 times.
✓ Branch 4 taken 68665 times.
71324 if (column == "GNSS1::VelNed::N [m/s]") // "GNSS1::VelNed::E [m/s]", "GNSS1::VelNed::D [m/s]"
705 {
706
1/2
✓ Branch 2 taken 2656 times.
✗ Branch 3 not taken.
2656 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELNED,
707
3/6
✓ Branch 3 taken 2656 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2656 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2656 times.
✗ Branch 14 not taken.
2656 obs->gnss1Outputs->velNed.x(), obs->gnss1Outputs->velNed.y(), obs->gnss1Outputs->velNed.z());
708 2656 continue;
709 }
710
3/4
✓ Branch 1 taken 68664 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 55 times.
✓ Branch 4 taken 68609 times.
68665 if (column == "GNSS1::VelEcef::X [m/s]") // "GNSS1::VelEcef::Y [m/s]", "GNSS1::VelEcef::Z [m/s]"
711 {
712
1/2
✓ Branch 2 taken 55 times.
✗ Branch 3 not taken.
55 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF,
713
3/6
✓ Branch 3 taken 55 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 55 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 55 times.
✗ Branch 14 not taken.
55 obs->gnss1Outputs->velEcef.x(), obs->gnss1Outputs->velEcef.y(), obs->gnss1Outputs->velEcef.z());
714 55 continue;
715 }
716
3/4
✓ Branch 1 taken 68577 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2663 times.
✓ Branch 4 taken 65914 times.
68609 if (column == "GNSS1::PosU::N [m]") // "GNSS1::PosU::E [m]", "GNSS1::PosU::D [m]"
717 {
718
1/2
✓ Branch 2 taken 2663 times.
✗ Branch 3 not taken.
2663 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSU,
719
3/6
✓ Branch 3 taken 2663 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2663 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2663 times.
✗ Branch 14 not taken.
2663 obs->gnss1Outputs->posU.x(), obs->gnss1Outputs->posU.y(), obs->gnss1Outputs->posU.z());
720 2663 continue;
721 }
722
3/4
✓ Branch 1 taken 65949 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2663 times.
✓ Branch 4 taken 63286 times.
65914 if (column == "GNSS1::VelU [m/s]")
723 {
724
1/2
✓ Branch 5 taken 2663 times.
✗ Branch 6 not taken.
2663 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELU, obs->gnss1Outputs->velU);
725 2663 continue;
726 }
727
3/4
✓ Branch 1 taken 63289 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2663 times.
✓ Branch 4 taken 60626 times.
63286 if (column == "GNSS1::TimeU [s]")
728 {
729
1/2
✓ Branch 5 taken 2663 times.
✗ Branch 6 not taken.
2663 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU, obs->gnss1Outputs->timeU);
730 2663 continue;
731 }
732
3/4
✓ Branch 1 taken 60619 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 28542 times.
✓ Branch 4 taken 32077 times.
60626 if (column == "GNSS1::TimeInfo::Status::timeOk") // "GNSS1::TimeInfo::Status::dateOk", "GNSS1::TimeInfo::Status::utcTimeValid", "GNSS1::TimeInfo::LeapSeconds"
733 {
734 28542 uint8_t timeOk{};
735 28542 uint8_t dateOk{};
736 28542 uint8_t utcTimeValid{};
737
1/2
✓ Branch 5 taken 28542 times.
✗ Branch 6 not taken.
28542 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO, timeOk, dateOk, utcTimeValid, obs->gnss1Outputs->timeInfo.leapSeconds);
738 28542 obs->gnss1Outputs->timeInfo.status = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
739 28542 continue;
740 28542 }
741
3/4
✓ Branch 1 taken 32092 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 32044 times.
32077 if (column == "GNSS1::DOP::g") // "GNSS1::DOP::p","GNSS1::DOP::t","GNSS1::DOP::v","GNSS1::DOP::h","GNSS1::DOP::n","GNSS1::DOP::e"
742 {
743
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_DOP,
744 48 obs->gnss1Outputs->dop.gDop, obs->gnss1Outputs->dop.pDop, obs->gnss1Outputs->dop.tDop, obs->gnss1Outputs->dop.vDop,
745 48 obs->gnss1Outputs->dop.hDop, obs->gnss1Outputs->dop.nDop, obs->gnss1Outputs->dop.eDop);
746 48 continue;
747 }
748
3/4
✓ Branch 1 taken 32044 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2646 times.
✓ Branch 4 taken 29398 times.
32044 if (column == "GNSS1::SatInfo::NumSats")
749 {
750
1/2
✓ Branch 5 taken 2646 times.
✗ Branch 6 not taken.
2646 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO, obs->gnss1Outputs->satInfo.numSats);
751 2646 continue;
752 }
753
3/4
✓ Branch 1 taken 29396 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2639 times.
✓ Branch 4 taken 26757 times.
29398 if (column == "GNSS1::SatInfo::Satellites")
754 {
755 2639 std::string satellites;
756
1/2
✓ Branch 3 taken 2639 times.
✗ Branch 4 not taken.
2639 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO, satellites);
757
758
2/2
✓ Branch 2 taken 68775 times.
✓ Branch 3 taken 2639 times.
71414 for (size_t i = 0; i < obs->gnss1Outputs->satInfo.numSats; i++)
759 {
760
1/2
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
68775 satellites = satellites.substr(1); // Remove leading '['
761
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto sys = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
762
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
763
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagHealthy = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
764
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagAlmanac = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
765
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagEphemeris = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
766
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagDifferentialCorrection = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
767
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagUsedForNavigation = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
768
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto flagAzimuthElevationValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
769
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
68775 auto flagUsedForRTK = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
770 68775 auto flags = static_cast<uint8_t>(flagHealthy << 0U
771 68775 | flagAlmanac << 1U
772 68775 | flagEphemeris << 2U
773 68775 | flagDifferentialCorrection << 3U
774 68775 | flagUsedForNavigation << 4U
775 68775 | flagAzimuthElevationValid << 5U
776 68775 | flagUsedForRTK << 6U);
777
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
778
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto qi = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
779
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
137550 auto el = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
780
3/6
✓ Branch 1 taken 68775 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 68775 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 68775 times.
✗ Branch 8 not taken.
68775 auto az = static_cast<int16_t>(std::stoi(extractRemoveTillDelimiter(satellites, "]")));
781
1/2
✓ Branch 3 taken 68775 times.
✗ Branch 4 not taken.
68775 obs->gnss1Outputs->satInfo.satellites.emplace_back(sys, svId, flags, cno, qi, el, az);
782 }
783 2639 continue;
784 2639 }
785
5/6
✓ Branch 1 taken 224 times.
✓ Branch 2 taken 26534 times.
✓ Branch 4 taken 224 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 224 times.
✓ Branch 7 taken 26534 times.
26757 if (column.starts_with("GNSS1::SatInfo::") && column.ends_with(" - flag Healthy"))
786 {
787
1/2
✓ Branch 1 taken 224 times.
✗ Branch 2 not taken.
224 std::string columnText = column.substr(16);
788
3/6
✓ Branch 1 taken 224 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 224 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 224 times.
✗ Branch 8 not taken.
224 SatId satId(extractRemoveTillDelimiter(columnText, " -"));
789 LOG_DATA("{}: SatInfo {}", nameId(), satId);
790 224 bool flagHealthy{};
791 224 bool flagAlmanac{};
792 224 bool flagEphemeris{};
793 224 bool flagDifferentialCorrection{};
794 224 bool flagUsedForNavigation{};
795 224 bool flagAzimuthElevationValid{};
796 224 bool flagUsedForRTK{};
797 224 auto cno = std::numeric_limits<uint8_t>::max();
798 224 uint8_t qi{};
799 224 int8_t el{};
800 224 int16_t az{};
801
1/2
✓ Branch 3 taken 224 times.
✗ Branch 4 not taken.
224 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO,
802 flagHealthy, flagAlmanac, flagEphemeris, flagDifferentialCorrection,
803 flagUsedForNavigation, flagAzimuthElevationValid, flagUsedForRTK,
804 cno, qi, el, az);
805
2/2
✓ Branch 1 taken 98 times.
✓ Branch 2 taken 126 times.
224 if (cno == std::numeric_limits<uint8_t>::max())
806 {
807 LOG_DATA("{}: Skipping {} as empty", nameId(), satId);
808 98 continue;
809 }
810 126 auto flags = static_cast<uint8_t>(flagHealthy << 0U
811 126 | flagAlmanac << 1U
812 126 | flagEphemeris << 2U
813 126 | flagDifferentialCorrection << 3U
814 126 | flagUsedForNavigation << 4U
815 126 | flagAzimuthElevationValid << 5U
816 126 | flagUsedForRTK << 6U);
817
1/2
✓ Branch 3 taken 126 times.
✗ Branch 4 not taken.
252 obs->gnss1Outputs->satInfo.satellites.emplace_back(static_cast<uint8_t>(vendor::vectornav::fromSatelliteSystem(satId.satSys)),
818
1/2
✓ Branch 1 taken 126 times.
✗ Branch 2 not taken.
126 static_cast<uint8_t>(satId.satNum), flags, cno, qi, el, az);
819 126 continue;
820 224 }
821
3/4
✓ Branch 1 taken 26534 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2646 times.
✓ Branch 4 taken 23888 times.
26534 if (column == "GNSS1::RawMeas::Tow [s]")
822 {
823
1/2
✓ Branch 5 taken 2646 times.
✗ Branch 6 not taken.
2646 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss1Outputs->raw.tow);
824 2646 continue;
825 }
826
3/4
✓ Branch 1 taken 23888 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2646 times.
✓ Branch 4 taken 21242 times.
23888 if (column == "GNSS1::RawMeas::Week")
827 {
828
1/2
✓ Branch 5 taken 2646 times.
✗ Branch 6 not taken.
2646 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss1Outputs->raw.week);
829 2646 continue;
830 }
831
3/4
✓ Branch 1 taken 21242 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2646 times.
✓ Branch 4 taken 18596 times.
21242 if (column == "GNSS1::RawMeas::NumSats")
832 {
833
1/2
✓ Branch 5 taken 2646 times.
✗ Branch 6 not taken.
2646 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss1Outputs->raw.numSats);
834 2646 continue;
835 }
836
3/4
✓ Branch 1 taken 18597 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2639 times.
✓ Branch 4 taken 15958 times.
18596 if (column == "GNSS1::RawMeas::Satellites")
837 {
838 2639 std::string satellites;
839
1/2
✓ Branch 3 taken 2639 times.
✗ Branch 4 not taken.
2639 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, satellites);
840
841
2/2
✓ Branch 2 taken 110175 times.
✓ Branch 3 taken 2639 times.
112814 for (size_t i = 0; i < obs->gnss1Outputs->raw.numSats; i++)
842 {
843
1/2
✓ Branch 1 taken 110175 times.
✗ Branch 2 not taken.
110175 satellites = satellites.substr(1); // Remove leading '['
844
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, "|")));
845
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, "|")));
846
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, "|")));
847
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, "|")));
848
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, "|")));
849
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, "|")));
850
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, "|")));
851
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, "|")));
852
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, "|")));
853
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, "|")));
854
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, "|")));
855
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, "|")));
856
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, "|")));
857
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, "|")));
858
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, "|")));
859 110175 auto flags = static_cast<uint16_t>(flagSearching << 0U
860 110175 | flagTracking << 1U
861 110175 | flagTimeValid << 2U
862 110175 | flagCodeLock << 3U
863 110175 | flagPhaseLock << 4U
864 110175 | flagPhaseHalfAmbiguity << 5U
865 110175 | flagPhaseHalfSub << 6U
866 110175 | flagPhaseSlip << 7U
867 110175 | flagPseudorangeSmoothed << 8U);
868
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, "|"));
869
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, "|"));
870
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, "]"));
871
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);
872 }
873 2639 continue;
874 2639 }
875
6/6
✓ Branch 1 taken 442 times.
✓ Branch 2 taken 15514 times.
✓ Branch 4 taken 147 times.
✓ Branch 5 taken 294 times.
✓ Branch 6 taken 147 times.
✓ Branch 7 taken 15808 times.
15958 if (column.starts_with("GNSS1::RawMeas::") && column.ends_with(" - freq"))
876 {
877
1/2
✓ Branch 1 taken 147 times.
✗ Branch 2 not taken.
147 std::string columnText = column.substr(16);
878
2/4
✓ Branch 1 taken 147 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 147 times.
✗ Branch 5 not taken.
147 auto identifier = extractRemoveTillDelimiter(columnText, " - freq");
879 LOG_DATA("{}: RawMeas {}", nameId(), identifier);
880 147 SatelliteSystem satSys;
881 147 uint16_t satNum{};
882
2/2
✓ Branch 1 taken 7 times.
✓ Branch 2 taken 140 times.
147 if (identifier.length() == 6)
883 {
884
1/2
✓ Branch 1 taken 7 times.
✗ Branch 2 not taken.
7 SatSigId satSigId(identifier);
885
1/2
✓ Branch 1 taken 7 times.
✗ Branch 2 not taken.
7 satSys = satSigId.toSatId().satSys;
886 7 satNum = satSigId.satNum;
887 }
888 else
889 {
890
1/2
✓ Branch 1 taken 140 times.
✗ Branch 2 not taken.
140 SatId satId(identifier);
891 140 satSys = satId.satSys;
892 140 satNum = satId.satNum;
893 }
894 147 auto freq = std::numeric_limits<uint8_t>::max();
895 147 uint8_t chan{};
896 147 int8_t slot{};
897 147 uint8_t cno{};
898 147 uint8_t flagSearching{};
899 147 uint8_t flagTracking{};
900 147 uint8_t flagTimeValid{};
901 147 uint8_t flagCodeLock{};
902 147 uint8_t flagPhaseLock{};
903 147 uint8_t flagPhaseHalfAmbiguity{};
904 147 uint8_t flagPhaseHalfSub{};
905 147 uint8_t flagPhaseSlip{};
906 147 uint8_t flagPseudorangeSmoothed{};
907 147 double pr{};
908 147 double cp{};
909 147 float dp{};
910
1/2
✓ Branch 3 taken 147 times.
✗ Branch 4 not taken.
147 extractValue(obs->gnss1Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS,
911 freq, chan, slot, cno,
912 flagSearching, flagTracking, flagTimeValid, flagCodeLock, flagPhaseLock,
913 flagPhaseHalfAmbiguity, flagPhaseHalfSub, flagPhaseSlip, flagPseudorangeSmoothed,
914 pr, cp, dp);
915
2/2
✓ Branch 1 taken 69 times.
✓ Branch 2 taken 78 times.
147 if (freq == std::numeric_limits<uint8_t>::max())
916 {
917 LOG_DATA("{}: Skipping {} as empty", nameId(), identifier);
918 69 continue;
919 }
920 78 auto flags = static_cast<uint16_t>(flagSearching << 0U
921 78 | flagTracking << 1U
922 78 | flagTimeValid << 2U
923 78 | flagCodeLock << 3U
924 78 | flagPhaseLock << 4U
925 78 | flagPhaseHalfAmbiguity << 5U
926 78 | flagPhaseHalfSub << 6U
927 78 | flagPhaseSlip << 7U
928 78 | flagPseudorangeSmoothed << 8U);
929
1/2
✓ Branch 3 taken 78 times.
✗ Branch 4 not taken.
156 obs->gnss1Outputs->raw.satellites.emplace_back(static_cast<uint8_t>(vendor::vectornav::fromSatelliteSystem(satSys)),
930
1/2
✓ Branch 1 taken 78 times.
✗ Branch 2 not taken.
78 static_cast<uint8_t>(satNum), freq, chan, slot, cno, flags, pr, cp, dp);
931
3/6
✓ Branch 4 taken 78 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 78 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 78 times.
78 if (obs->gnss1Outputs->raw.satellites.back().toCode() == Code::None)
932 {
933 LOG_ERROR("{}: Line {}: Could not convert to valid Code. Skipping item. (sys {}, freq {}, chan {})", nameId(), _messageCount + 1,
934 obs->gnss1Outputs->raw.satellites.back().sys, obs->gnss1Outputs->raw.satellites.back().freq, obs->gnss1Outputs->raw.satellites.back().chan);
935 obs->gnss1Outputs->raw.satellites.pop_back();
936 }
937
7/12
✓ Branch 1 taken 7 times.
✓ Branch 2 taken 71 times.
✓ Branch 7 taken 7 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 7 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 7 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 7 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 78 times.
78 if (identifier.length() == 6 && SatSigId(identifier) != obs->gnss1Outputs->raw.satellites.back().toSatSigId())
938 {
939 LOG_ERROR("{}: Line {}: Could not convert to valid SatSigId. Skipping item. (sys {}, freq {}, chan {} = [{}], column was [{}])", nameId(), _messageCount + 1,
940 obs->gnss1Outputs->raw.satellites.back().sys, obs->gnss1Outputs->raw.satellites.back().freq, obs->gnss1Outputs->raw.satellites.back().chan,
941 obs->gnss1Outputs->raw.satellites.back().toSatSigId(), identifier);
942 obs->gnss1Outputs->raw.satellites.pop_back();
943 }
944 78 continue;
945 147 }
946 }
947 // Group 5 (Attitude)
948
1/2
✓ Branch 0 taken 15808 times.
✗ Branch 1 not taken.
15598 if (_binaryOutputRegister.attitudeField != vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE)
949 {
950
3/4
✓ Branch 2 taken 2766 times.
✓ Branch 3 taken 13042 times.
✓ Branch 5 taken 2766 times.
✗ Branch 6 not taken.
15808 if (!obs->attitudeOutputs) { obs->attitudeOutputs = std::make_shared<NAV::vendor::vectornav::AttitudeOutputs>(); }
951
952
2/4
✓ Branch 1 taken 15808 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 15808 times.
15808 if (column == "Att::VpeStatus::AttitudeQuality") // "Att::VpeStatus::GyroSaturation", "Att::VpeStatus::GyroSaturationRecovery", "Att::VpeStatus::MagDisturbance", "Att::VpeStatus::MagSaturation", "Att::VpeStatus::AccDisturbance", "Att::VpeStatus::AccSaturation", "Att::VpeStatus::KnownMagDisturbance", "Att::VpeStatus::KnownAccelDisturbance"
953 {
954 uint8_t attitudeQuality{}; // return ((_status & (1U << 0U | 1U << 1U)) >> 0U);
955 uint8_t gyroSaturation{}; // return ((_status & (1U << 2U)) >> 2U);
956 uint8_t gyroSaturationRecovery{}; // return ((_status & (1U << 3U)) >> 3U);
957 uint8_t magDisturbance{}; // return ((_status & (1U << 4U | 1U << 5U)) >> 4U);
958 uint8_t magSaturation{}; // return ((_status & (1U << 6U)) >> 6U);
959 uint8_t accDisturbance{}; // return ((_status & (1U << 7U | 1U << 8U)) >> 7U);
960 uint8_t accSaturation{}; // return ((_status & (1U << 9U)) >> 9U);
961 uint8_t knownMagDisturbance{}; // return ((_status & (1U << 11U)) >> 11U);
962 uint8_t knownAccelDisturbance{}; // return ((_status & (1U << 12U)) >> 12U);
963 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS,
964 attitudeQuality, gyroSaturation, gyroSaturationRecovery, magDisturbance, magSaturation, accDisturbance, accSaturation, knownMagDisturbance, knownAccelDisturbance);
965 obs->attitudeOutputs->vpeStatus = static_cast<uint16_t>(attitudeQuality << 0U
966 | gyroSaturation << 2U
967 | gyroSaturationRecovery << 3U
968 | magDisturbance << 4U
969 | magSaturation << 6U
970 | accDisturbance << 7U
971 | accSaturation << 9U
972 | knownMagDisturbance << 11U
973 | knownAccelDisturbance << 12U);
974 continue;
975 }
976
3/4
✓ Branch 1 taken 15808 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2766 times.
✓ Branch 4 taken 13042 times.
15808 if (column == "Att::YawPitchRoll::Y [deg]") // "Att::YawPitchRoll::P [deg]", "Att::YawPitchRoll::R [deg]"
977 {
978
1/2
✓ Branch 2 taken 2766 times.
✗ Branch 3 not taken.
2766 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL,
979
3/6
✓ Branch 3 taken 2766 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2766 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2766 times.
✗ Branch 14 not taken.
2766 obs->attitudeOutputs->ypr.x(), obs->attitudeOutputs->ypr.y(), obs->attitudeOutputs->ypr.z());
980 2766 continue;
981 }
982
3/4
✓ Branch 1 taken 13044 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 151 times.
✓ Branch 4 taken 12893 times.
13042 if (column == "Att::Quaternion::w") // "Att::Quaternion::x", "Att::Quaternion::y", "Att::Quaternion::z"
983 {
984
1/2
✓ Branch 2 taken 151 times.
✗ Branch 3 not taken.
151 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION,
985
4/8
✓ Branch 3 taken 151 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 151 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 151 times.
✗ Branch 14 not taken.
✓ Branch 18 taken 151 times.
✗ Branch 19 not taken.
151 obs->attitudeOutputs->qtn.w(), obs->attitudeOutputs->qtn.x(), obs->attitudeOutputs->qtn.y(), obs->attitudeOutputs->qtn.z());
986 151 continue;
987 }
988
3/4
✓ Branch 1 taken 12894 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 12863 times.
12893 if (column == "Att::DCM::0-0") // "Att::DCM::0-1", "Att::DCM::0-2", "Att::DCM::1-0", "Att::DCM::1-1", "Att::DCM::1-2", "Att::DCM::2-0", "Att::DCM::2-1", "Att::DCM::2-2"
989 {
990
1/2
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
31 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM,
991
3/6
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 31 times.
✗ Branch 8 not taken.
✓ Branch 12 taken 31 times.
✗ Branch 13 not taken.
31 obs->attitudeOutputs->dcm(0, 0), obs->attitudeOutputs->dcm(0, 1), obs->attitudeOutputs->dcm(0, 2),
992
3/6
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 31 times.
✗ Branch 8 not taken.
✓ Branch 12 taken 31 times.
✗ Branch 13 not taken.
31 obs->attitudeOutputs->dcm(1, 0), obs->attitudeOutputs->dcm(1, 1), obs->attitudeOutputs->dcm(1, 2),
993
3/6
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 31 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 31 times.
✗ Branch 14 not taken.
31 obs->attitudeOutputs->dcm(2, 0), obs->attitudeOutputs->dcm(2, 1), obs->attitudeOutputs->dcm(2, 2));
994 31 continue;
995 }
996
3/4
✓ Branch 1 taken 12862 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 12831 times.
12863 if (column == "Att::MagNed::N [Gauss]") // "Att::MagNed::E [Gauss]", "Att::MagNed::D [Gauss]"
997 {
998
1/2
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
31 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED,
999
3/6
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 31 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 31 times.
✗ Branch 14 not taken.
31 obs->attitudeOutputs->magNed.x(), obs->attitudeOutputs->magNed.y(), obs->attitudeOutputs->magNed.z());
1000 31 continue;
1001 }
1002
3/4
✓ Branch 1 taken 12831 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 12800 times.
12831 if (column == "Att::AccelNed::N [m/s^2]") // "Att::AccelNed::E [m/s^2]", "Att::AccelNed::D [m/s^2]"
1003 {
1004
1/2
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
31 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED,
1005
3/6
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 31 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 31 times.
✗ Branch 14 not taken.
31 obs->attitudeOutputs->accelNed.x(), obs->attitudeOutputs->accelNed.y(), obs->attitudeOutputs->accelNed.z());
1006 31 continue;
1007 }
1008
3/4
✓ Branch 1 taken 12801 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 12770 times.
12800 if (column == "Att::LinearAccelBody::X [m/s^2]") // "Att::LinearAccelBody::Y [m/s^2]", "Att::LinearAccelBody::Z [m/s^2]"
1009 {
1010
1/2
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
31 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY,
1011
3/6
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 31 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 31 times.
✗ Branch 14 not taken.
31 obs->attitudeOutputs->linearAccelBody.x(), obs->attitudeOutputs->linearAccelBody.y(), obs->attitudeOutputs->linearAccelBody.z());
1012 31 continue;
1013 }
1014
3/4
✓ Branch 1 taken 12769 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 12738 times.
12770 if (column == "Att::LinearAccelNed::N [m/s^2]") // "Att::LinearAccelNed::E [m/s^2]", "Att::LinearAccelNed::D [m/s^2]"
1015 {
1016
1/2
✓ Branch 2 taken 31 times.
✗ Branch 3 not taken.
31 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED,
1017
3/6
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 31 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 31 times.
✗ Branch 14 not taken.
31 obs->attitudeOutputs->linearAccelNed.x(), obs->attitudeOutputs->linearAccelNed.y(), obs->attitudeOutputs->linearAccelNed.z());
1018 31 continue;
1019 }
1020
3/4
✓ Branch 1 taken 12738 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 158 times.
✓ Branch 4 taken 12580 times.
12738 if (column == "Att::YprU::Y [deg]") // "Att::YprU::P [deg]", "Att::YprU::R [deg]"
1021 {
1022
1/2
✓ Branch 2 taken 158 times.
✗ Branch 3 not taken.
158 extractValue(obs->attitudeOutputs->attitudeField, vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU,
1023
3/6
✓ Branch 3 taken 158 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 158 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 158 times.
✗ Branch 14 not taken.
158 obs->attitudeOutputs->yprU.x(), obs->attitudeOutputs->yprU.y(), obs->attitudeOutputs->yprU.z());
1024 158 continue;
1025 }
1026 }
1027 // Group 6 (INS)
1028
1/2
✓ Branch 0 taken 12580 times.
✗ Branch 1 not taken.
12370 if (_binaryOutputRegister.insField != vn::protocol::uart::InsGroup::INSGROUP_NONE)
1029 {
1030
3/4
✓ Branch 2 taken 2694 times.
✓ Branch 3 taken 9886 times.
✓ Branch 5 taken 2694 times.
✗ Branch 6 not taken.
12580 if (!obs->insOutputs) { obs->insOutputs = std::make_shared<NAV::vendor::vectornav::InsOutputs>(); }
1031
1032
3/4
✓ Branch 1 taken 12579 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2694 times.
✓ Branch 4 taken 9885 times.
12580 if (column == "INS::InsStatus::Mode") // "INS::InsStatus::GpsFix", "INS::InsStatus::Error::IMU", "INS::InsStatus::Error::MagPres", "INS::InsStatus::Error::GNSS", "INS::InsStatus::GpsHeadingIns", "INS::InsStatus::GpsCompass"
1033 {
1034 2694 uint8_t mode{};
1035 2694 uint8_t gpsFix{};
1036 2694 uint8_t errorImu{};
1037 2694 uint8_t errorMagPres{};
1038 2694 uint8_t errorGnss{};
1039 2694 uint8_t gpsHeadingIns{};
1040 2694 uint8_t gpsCompass{};
1041
1/2
✓ Branch 3 taken 2694 times.
✗ Branch 4 not taken.
2694 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS,
1042 mode, gpsFix, errorImu, errorMagPres, errorGnss, gpsHeadingIns, gpsCompass);
1043 2694 obs->insOutputs->insStatus.status() = static_cast<uint16_t>(mode << 0U | gpsFix << 2U
1044 2694 | errorImu << 4U | errorMagPres << 5U | errorGnss << 6U
1045 2694 | gpsHeadingIns << 8U | gpsCompass << 9U);
1046 2694 continue;
1047 2694 }
1048
3/4
✓ Branch 1 taken 9886 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2687 times.
✓ Branch 4 taken 7199 times.
9885 if (column == "INS::PosLla::latitude [deg]") // "INS::PosLla::longitude [deg]", "INS::PosLla::altitude [m]"
1049 {
1050
1/2
✓ Branch 2 taken 2687 times.
✗ Branch 3 not taken.
2687 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_POSLLA,
1051
3/6
✓ Branch 3 taken 2687 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2687 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2687 times.
✗ Branch 14 not taken.
2687 obs->insOutputs->posLla.x(), obs->insOutputs->posLla.y(), obs->insOutputs->posLla.z());
1052 2687 continue;
1053 }
1054
3/4
✓ Branch 1 taken 7199 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 86 times.
✓ Branch 4 taken 7113 times.
7199 if (column == "INS::PosEcef::X [m]") // "INS::PosEcef::Y [m]", "INS::PosEcef::Z [m]"
1055 {
1056
1/2
✓ Branch 2 taken 86 times.
✗ Branch 3 not taken.
86 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_POSECEF,
1057
3/6
✓ Branch 3 taken 86 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 86 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 86 times.
✗ Branch 14 not taken.
86 obs->insOutputs->posEcef.x(), obs->insOutputs->posEcef.y(), obs->insOutputs->posEcef.z());
1058 86 continue;
1059 }
1060
3/4
✓ Branch 1 taken 7114 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 7035 times.
7113 if (column == "INS::VelBody::X [m/s]") // "INS::VelBody::Y [m/s]", "INS::VelBody::Z [m/s]"
1061 {
1062
1/2
✓ Branch 2 taken 79 times.
✗ Branch 3 not taken.
79 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_VELBODY,
1063
3/6
✓ Branch 3 taken 79 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 79 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 79 times.
✗ Branch 14 not taken.
79 obs->insOutputs->velBody.x(), obs->insOutputs->velBody.y(), obs->insOutputs->velBody.z());
1064 79 continue;
1065 }
1066
3/4
✓ Branch 1 taken 7035 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2687 times.
✓ Branch 4 taken 4348 times.
7035 if (column == "INS::VelNed::N [m/s]") // "INS::VelNed::E [m/s]", "INS::VelNed::D [m/s]"
1067 {
1068
1/2
✓ Branch 2 taken 2687 times.
✗ Branch 3 not taken.
2687 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_VELNED,
1069
3/6
✓ Branch 3 taken 2687 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2687 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2687 times.
✗ Branch 14 not taken.
2687 obs->insOutputs->velNed.x(), obs->insOutputs->velNed.y(), obs->insOutputs->velNed.z());
1070 2687 continue;
1071 }
1072
3/4
✓ Branch 1 taken 4348 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 86 times.
✓ Branch 4 taken 4262 times.
4348 if (column == "INS::VelEcef::X [m/s]") // "INS::VelEcef::Y [m/s]", "INS::VelEcef::Z [m/s]"
1073 {
1074
1/2
✓ Branch 2 taken 86 times.
✗ Branch 3 not taken.
86 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_VELECEF,
1075
3/6
✓ Branch 3 taken 86 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 86 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 86 times.
✗ Branch 14 not taken.
86 obs->insOutputs->velEcef.x(), obs->insOutputs->velEcef.y(), obs->insOutputs->velEcef.z());
1076 86 continue;
1077 }
1078
3/4
✓ Branch 1 taken 4262 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 4183 times.
4262 if (column == "INS::MagEcef::X [Gauss]") // "INS::MagEcef::Y [Gauss]", "INS::MagEcef::Z [Gauss]"
1079 {
1080
1/2
✓ Branch 2 taken 79 times.
✗ Branch 3 not taken.
79 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_MAGECEF,
1081
3/6
✓ Branch 3 taken 79 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 79 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 79 times.
✗ Branch 14 not taken.
79 obs->insOutputs->magEcef.x(), obs->insOutputs->magEcef.y(), obs->insOutputs->magEcef.z());
1082 79 continue;
1083 }
1084
3/4
✓ Branch 1 taken 4183 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 4104 times.
4183 if (column == "INS::AccelEcef::X [m/s^2]") // "INS::AccelEcef::Y [m/s^2]", "INS::AccelEcef::Z [m/s^2]"
1085 {
1086
1/2
✓ Branch 2 taken 79 times.
✗ Branch 3 not taken.
79 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF,
1087
3/6
✓ Branch 3 taken 79 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 79 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 79 times.
✗ Branch 14 not taken.
79 obs->insOutputs->accelEcef.x(), obs->insOutputs->accelEcef.y(), obs->insOutputs->accelEcef.z());
1088 79 continue;
1089 }
1090
3/4
✓ Branch 1 taken 4104 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2687 times.
✓ Branch 4 taken 1417 times.
4104 if (column == "INS::LinearAccelEcef::X [m/s^2]") // "INS::LinearAccelEcef::Y [m/s^2]", "INS::LinearAccelEcef::Z [m/s^2]"
1091 {
1092
1/2
✓ Branch 2 taken 2687 times.
✗ Branch 3 not taken.
2687 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF,
1093
3/6
✓ Branch 3 taken 2687 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 2687 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 2687 times.
✗ Branch 14 not taken.
2687 obs->insOutputs->linearAccelEcef.x(), obs->insOutputs->linearAccelEcef.y(), obs->insOutputs->linearAccelEcef.z());
1094 2687 continue;
1095 }
1096
3/4
✓ Branch 1 taken 1417 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 86 times.
✓ Branch 4 taken 1331 times.
1417 if (column == "INS::PosU [m]")
1097 {
1098
1/2
✓ Branch 5 taken 86 times.
✗ Branch 6 not taken.
86 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_POSU, obs->insOutputs->posU);
1099 86 continue;
1100 }
1101
3/4
✓ Branch 1 taken 1331 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 86 times.
✓ Branch 4 taken 1245 times.
1331 if (column == "INS::VelU [m/s]")
1102 {
1103
1/2
✓ Branch 5 taken 86 times.
✗ Branch 6 not taken.
86 extractValue(obs->insOutputs->insField, vn::protocol::uart::InsGroup::INSGROUP_VELU, obs->insOutputs->velU);
1104 86 continue;
1105 }
1106 }
1107 // Group 7 (GNSS2)
1108
2/2
✓ Branch 0 taken 951 times.
✓ Branch 1 taken 84 times.
1035 if (_binaryOutputRegister.gps2Field != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
1109 {
1110
3/4
✓ Branch 2 taken 79 times.
✓ Branch 3 taken 872 times.
✓ Branch 5 taken 79 times.
✗ Branch 6 not taken.
951 if (!obs->gnss2Outputs) { obs->gnss2Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>(); }
1111
1112
3/4
✓ Branch 1 taken 951 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 903 times.
951 if (column == "GNSS2::UTC::year") // "GNSS2::UTC::month", "GNSS2::UTC::day", "GNSS2::UTC::hour", "GNSS2::UTC::min", "GNSS2::UTC::sec", "GNSS2::UTC::ms"
1113 {
1114
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_UTC,
1115 48 obs->gnss2Outputs->timeUtc.year, obs->gnss2Outputs->timeUtc.month, obs->gnss2Outputs->timeUtc.day,
1116 48 obs->gnss2Outputs->timeUtc.hour, obs->gnss2Outputs->timeUtc.min, obs->gnss2Outputs->timeUtc.sec, obs->gnss2Outputs->timeUtc.ms);
1117 48 continue;
1118 }
1119
3/4
✓ Branch 1 taken 903 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 855 times.
903 if (column == "GNSS2::Tow [ns]")
1120 {
1121
1/2
✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TOW, obs->gnss2Outputs->tow);
1122 48 continue;
1123 }
1124
3/4
✓ Branch 1 taken 855 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 807 times.
855 if (column == "GNSS2::Week")
1125 {
1126
1/2
✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_WEEK, obs->gnss2Outputs->week);
1127 48 continue;
1128 }
1129
3/4
✓ Branch 1 taken 807 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 728 times.
807 if (column == "GNSS2::NumSats")
1130 {
1131
1/2
✓ Branch 5 taken 79 times.
✗ Branch 6 not taken.
79 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS, obs->gnss2Outputs->numSats);
1132 79 continue;
1133 }
1134
3/4
✓ Branch 1 taken 728 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 649 times.
728 if (column == "GNSS2::Fix")
1135 {
1136
1/2
✓ Branch 5 taken 79 times.
✗ Branch 6 not taken.
79 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_FIX, obs->gnss2Outputs->fix);
1137 79 continue;
1138 }
1139
3/4
✓ Branch 1 taken 649 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 601 times.
649 if (column == "GNSS2::PosLla::latitude [deg]") // "GNSS2::PosLla::longitude [deg]", "GNSS2::PosLla::altitude [m]"
1140 {
1141
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA,
1142
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss2Outputs->posLla.x(), obs->gnss2Outputs->posLla.y(), obs->gnss2Outputs->posLla.z());
1143 48 continue;
1144 }
1145
3/4
✓ Branch 1 taken 601 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 553 times.
601 if (column == "GNSS2::PosEcef::X [m]") // "GNSS2::PosEcef::Y [m]", "GNSS2::PosEcef::Z [m]"
1146 {
1147
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF,
1148
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss2Outputs->posEcef.x(), obs->gnss2Outputs->posEcef.y(), obs->gnss2Outputs->posEcef.z());
1149 48 continue;
1150 }
1151
3/4
✓ Branch 1 taken 553 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 505 times.
553 if (column == "GNSS2::VelNed::N [m/s]") // "GNSS2::VelNed::E [m/s]", "GNSS2::VelNed::D [m/s]"
1152 {
1153
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELNED,
1154
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss2Outputs->velNed.x(), obs->gnss2Outputs->velNed.y(), obs->gnss2Outputs->velNed.z());
1155 48 continue;
1156 }
1157
3/4
✓ Branch 1 taken 505 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 457 times.
505 if (column == "GNSS2::VelEcef::X [m/s]") // "GNSS2::VelEcef::Y [m/s]", "GNSS2::VelEcef::Z [m/s]"
1158 {
1159
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF,
1160
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss2Outputs->velEcef.x(), obs->gnss2Outputs->velEcef.y(), obs->gnss2Outputs->velEcef.z());
1161 48 continue;
1162 }
1163
3/4
✓ Branch 1 taken 457 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 409 times.
457 if (column == "GNSS2::PosU::N [m]") // "GNSS2::PosU::E [m]", "GNSS2::PosU::D [m]"
1164 {
1165
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_POSU,
1166
3/6
✓ Branch 3 taken 48 times.
✗ Branch 4 not taken.
✓ Branch 8 taken 48 times.
✗ Branch 9 not taken.
✓ Branch 13 taken 48 times.
✗ Branch 14 not taken.
48 obs->gnss2Outputs->posU.x(), obs->gnss2Outputs->posU.y(), obs->gnss2Outputs->posU.z());
1167 48 continue;
1168 }
1169
3/4
✓ Branch 1 taken 409 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 361 times.
409 if (column == "GNSS2::VelU [m/s]")
1170 {
1171
1/2
✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_VELU, obs->gnss2Outputs->velU);
1172 48 continue;
1173 }
1174
3/4
✓ Branch 1 taken 361 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 313 times.
361 if (column == "GNSS2::TimeU [s]")
1175 {
1176
1/2
✓ Branch 5 taken 48 times.
✗ Branch 6 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU, obs->gnss2Outputs->timeU);
1177 48 continue;
1178 }
1179
3/4
✓ Branch 1 taken 313 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 79 times.
✓ Branch 4 taken 234 times.
313 if (column == "GNSS2::TimeInfo::Status::timeOk") // "GNSS2::TimeInfo::Status::dateOk", "GNSS2::TimeInfo::Status::utcTimeValid", "GNSS2::TimeInfo::LeapSeconds"
1180 {
1181 79 uint8_t timeOk{};
1182 79 uint8_t dateOk{};
1183 79 uint8_t utcTimeValid{};
1184
1/2
✓ Branch 5 taken 79 times.
✗ Branch 6 not taken.
79 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO, timeOk, dateOk, utcTimeValid, obs->gnss2Outputs->timeInfo.leapSeconds);
1185 79 obs->gnss2Outputs->timeInfo.status = static_cast<uint8_t>(timeOk << 0U | dateOk << 1U | utcTimeValid << 2U);
1186 79 continue;
1187 79 }
1188
3/4
✓ Branch 1 taken 234 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 48 times.
✓ Branch 4 taken 186 times.
234 if (column == "GNSS2::DOP::g") // "GNSS2::DOP::p","GNSS2::DOP::t","GNSS2::DOP::v","GNSS2::DOP::h","GNSS2::DOP::n","GNSS2::DOP::e"
1189 {
1190
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_DOP,
1191 48 obs->gnss2Outputs->dop.gDop, obs->gnss2Outputs->dop.pDop, obs->gnss2Outputs->dop.tDop, obs->gnss2Outputs->dop.vDop,
1192 48 obs->gnss2Outputs->dop.hDop, obs->gnss2Outputs->dop.nDop, obs->gnss2Outputs->dop.eDop);
1193 48 continue;
1194 }
1195
3/4
✓ Branch 1 taken 186 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 155 times.
186 if (column == "GNSS2::SatInfo::NumSats")
1196 {
1197
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO, obs->gnss2Outputs->satInfo.numSats);
1198 31 continue;
1199 }
1200
3/4
✓ Branch 1 taken 155 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 124 times.
155 if (column == "GNSS2::SatInfo::Satellites")
1201 {
1202 31 std::string satellites;
1203
1/2
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO, satellites);
1204
1205
2/2
✓ Branch 2 taken 648 times.
✓ Branch 3 taken 31 times.
679 for (size_t i = 0; i < obs->gnss2Outputs->satInfo.numSats; i++)
1206 {
1207
1/2
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
648 satellites = satellites.substr(1); // Remove leading '['
1208
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto sys = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
1209
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto svId = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1210
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagHealthy = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1211
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagAlmanac = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1212
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagEphemeris = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1213
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagDifferentialCorrection = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1214
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagUsedForNavigation = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1215
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto flagAzimuthElevationValid = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1216
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
648 auto flagUsedForRTK = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1217 648 auto flags = static_cast<uint8_t>(flagHealthy << 0U
1218 648 | flagAlmanac << 1U
1219 648 | flagEphemeris << 2U
1220 648 | flagDifferentialCorrection << 3U
1221 648 | flagUsedForNavigation << 4U
1222 648 | flagAzimuthElevationValid << 5U
1223 648 | flagUsedForRTK << 6U);
1224
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto cno = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1225
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto qi = static_cast<uint8_t>(std::stoul(extractRemoveTillDelimiter(satellites, "|")));
1226
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
1296 auto el = static_cast<int8_t>(std::stoi(extractRemoveTillDelimiter(satellites, "|")));
1227
3/6
✓ Branch 1 taken 648 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 648 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 648 times.
✗ Branch 8 not taken.
648 auto az = static_cast<int16_t>(std::stoi(extractRemoveTillDelimiter(satellites, "]")));
1228
1/2
✓ Branch 3 taken 648 times.
✗ Branch 4 not taken.
648 obs->gnss2Outputs->satInfo.satellites.emplace_back(sys, svId, flags, cno, qi, el, az);
1229 }
1230 31 continue;
1231 31 }
1232
2/6
✗ Branch 1 not taken.
✓ Branch 2 taken 124 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 124 times.
124 if (column.starts_with("GNSS2::SatInfo::") && column.ends_with(" - flag Healthy"))
1233 {
1234 std::string columnText = column.substr(16);
1235 SatId satId(extractRemoveTillDelimiter(columnText, " -"));
1236 LOG_DATA("{}: SatInfo {}", nameId(), satId);
1237 bool flagHealthy{};
1238 bool flagAlmanac{};
1239 bool flagEphemeris{};
1240 bool flagDifferentialCorrection{};
1241 bool flagUsedForNavigation{};
1242 bool flagAzimuthElevationValid{};
1243 bool flagUsedForRTK{};
1244 auto cno = std::numeric_limits<uint8_t>::max();
1245 uint8_t qi{};
1246 int8_t el{};
1247 int16_t az{};
1248 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO,
1249 flagHealthy, flagAlmanac, flagEphemeris, flagDifferentialCorrection,
1250 flagUsedForNavigation, flagAzimuthElevationValid, flagUsedForRTK,
1251 cno, qi, el, az);
1252 if (cno == std::numeric_limits<uint8_t>::max())
1253 {
1254 LOG_DATA("{}: Skipping {} as empty", nameId(), satId);
1255 continue;
1256 }
1257 auto flags = static_cast<uint8_t>(flagHealthy << 0U
1258 | flagAlmanac << 1U
1259 | flagEphemeris << 2U
1260 | flagDifferentialCorrection << 3U
1261 | flagUsedForNavigation << 4U
1262 | flagAzimuthElevationValid << 5U
1263 | flagUsedForRTK << 6U);
1264 obs->gnss2Outputs->satInfo.satellites.emplace_back(static_cast<uint8_t>(vendor::vectornav::fromSatelliteSystem(satId.satSys)),
1265 static_cast<uint8_t>(satId.satNum), flags, cno, qi, el, az);
1266 continue;
1267 }
1268
3/4
✓ Branch 1 taken 124 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 93 times.
124 if (column == "GNSS2::RawMeas::Tow [s]")
1269 {
1270
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss2Outputs->raw.tow);
1271 31 continue;
1272 }
1273
3/4
✓ Branch 1 taken 93 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 62 times.
93 if (column == "GNSS2::RawMeas::Week")
1274 {
1275
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss2Outputs->raw.week);
1276 31 continue;
1277 }
1278
3/4
✓ Branch 1 taken 62 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✓ Branch 4 taken 31 times.
62 if (column == "GNSS2::RawMeas::NumSats")
1279 {
1280
1/2
✓ Branch 5 taken 31 times.
✗ Branch 6 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, obs->gnss2Outputs->raw.numSats);
1281 LOG_DATA("{}: GNSS2::NumSats: {}", nameId(), obs->gnss2Outputs->raw.numSats); // HACK
1282 31 continue;
1283 }
1284
2/4
✓ Branch 1 taken 31 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
31 if (column == "GNSS2::RawMeas::Satellites")
1285 {
1286 31 std::string satellites;
1287
1/2
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
31 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS, satellites);
1288 LOG_DATA("{}: numSats: {}", nameId(), obs->gnss2Outputs->raw.numSats); // HACK
1289 LOG_DATA("{}: satellites: {}", nameId(), satellites); // HACK
1290
1291
2/2
✓ Branch 2 taken 543 times.
✓ Branch 3 taken 31 times.
574 for (size_t i = 0; i < obs->gnss2Outputs->raw.numSats; i++)
1292 {
1293
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 satellites = satellites.substr(1); // Remove leading '['
1294
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, "|")));
1295
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, "|")));
1296
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, "|")));
1297
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, "|")));
1298
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, "|")));
1299
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, "|")));
1300
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, "|")));
1301
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, "|")));
1302
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, "|")));
1303
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, "|")));
1304
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, "|")));
1305
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, "|")));
1306
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, "|")));
1307
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, "|")));
1308
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, "|")));
1309 543 auto flags = static_cast<uint16_t>(flagSearching << 0U
1310 543 | flagTracking << 1U
1311 543 | flagTimeValid << 2U
1312 543 | flagCodeLock << 3U
1313 543 | flagPhaseLock << 4U
1314 543 | flagPhaseHalfAmbiguity << 5U
1315 543 | flagPhaseHalfSub << 6U
1316 543 | flagPhaseSlip << 7U
1317 543 | flagPseudorangeSmoothed << 8U);
1318
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, "|"));
1319
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, "|"));
1320
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, "]"));
1321
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);
1322 }
1323 31 continue;
1324 31 }
1325 if (column.starts_with("GNSS2::RawMeas::") && column.ends_with(" - freq"))
1326 {
1327 std::string columnText = column.substr(16);
1328 auto identifier = extractRemoveTillDelimiter(columnText, " - freq");
1329 LOG_DATA("{}: RawMeas {}", nameId(), identifier);
1330 SatelliteSystem satSys;
1331 uint16_t satNum{};
1332 if (identifier.length() == 6)
1333 {
1334 SatSigId satSigId(identifier);
1335 satSys = satSigId.toSatId().satSys;
1336 satNum = satSigId.satNum;
1337 }
1338 else
1339 {
1340 SatId satId(identifier);
1341 satSys = satId.satSys;
1342 satNum = satId.satNum;
1343 }
1344 auto freq = std::numeric_limits<uint8_t>::max();
1345 uint8_t chan{};
1346 int8_t slot{};
1347 uint8_t cno{};
1348 uint8_t flagSearching{};
1349 uint8_t flagTracking{};
1350 uint8_t flagTimeValid{};
1351 uint8_t flagCodeLock{};
1352 uint8_t flagPhaseLock{};
1353 uint8_t flagPhaseHalfAmbiguity{};
1354 uint8_t flagPhaseHalfSub{};
1355 uint8_t flagPhaseSlip{};
1356 uint8_t flagPseudorangeSmoothed{};
1357 double pr{};
1358 double cp{};
1359 float dp{};
1360 extractValue(obs->gnss2Outputs->gnssField, vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS,
1361 freq, chan, slot, cno,
1362 flagSearching, flagTracking, flagTimeValid, flagCodeLock, flagPhaseLock,
1363 flagPhaseHalfAmbiguity, flagPhaseHalfSub, flagPhaseSlip, flagPseudorangeSmoothed,
1364 pr, cp, dp);
1365 if (freq == std::numeric_limits<uint8_t>::max())
1366 {
1367 LOG_DATA("{}: Skipping {} as empty", nameId(), identifier);
1368 continue;
1369 }
1370 auto flags = static_cast<uint16_t>(flagSearching << 0U
1371 | flagTracking << 1U
1372 | flagTimeValid << 2U
1373 | flagCodeLock << 3U
1374 | flagPhaseLock << 4U
1375 | flagPhaseHalfAmbiguity << 5U
1376 | flagPhaseHalfSub << 6U
1377 | flagPhaseSlip << 7U
1378 | flagPseudorangeSmoothed << 8U);
1379 obs->gnss2Outputs->raw.satellites.emplace_back(static_cast<uint8_t>(vendor::vectornav::fromSatelliteSystem(satSys)),
1380 static_cast<uint8_t>(satNum), freq, chan, slot, cno, flags, pr, cp, dp);
1381 if (obs->gnss2Outputs->raw.satellites.back().toCode() == Code::None)
1382 {
1383 LOG_ERROR("{}: Line {}: Could not convert to valid Code. Skipping item. (sys {}, freq {}, chan {})", nameId(), _messageCount + 1,
1384 obs->gnss2Outputs->raw.satellites.back().sys, obs->gnss2Outputs->raw.satellites.back().freq, obs->gnss2Outputs->raw.satellites.back().chan);
1385 obs->gnss2Outputs->raw.satellites.pop_back();
1386 }
1387 if (identifier.length() == 6 && SatSigId(identifier) != obs->gnss2Outputs->raw.satellites.back().toSatSigId())
1388 {
1389 LOG_ERROR("{}: Line {}: Could not convert to valid SatSigId. Skipping item. (sys {}, freq {}, chan {} = [{}], column was [{}])", nameId(), _messageCount + 1,
1390 obs->gnss2Outputs->raw.satellites.back().sys, obs->gnss2Outputs->raw.satellites.back().freq, obs->gnss2Outputs->raw.satellites.back().chan,
1391 obs->gnss2Outputs->raw.satellites.back().toSatSigId(), identifier);
1392 obs->gnss2Outputs->raw.satellites.pop_back();
1393 }
1394 continue;
1395 }
1396 }
1397
1398
1/2
✓ Branch 1 taken 294 times.
✗ Branch 2 not taken.
84 extractCell();
1399 }
1400
1/2
✓ Branch 2 taken 28542 times.
✗ Branch 3 not taken.
28519 if (obs->gnss1Outputs) { obs->gnss1Outputs->raw.numSats = static_cast<uint8_t>(obs->gnss1Outputs->raw.satellites.size()); }
1401
2/2
✓ Branch 2 taken 79 times.
✓ Branch 3 taken 28462 times.
28541 if (obs->gnss2Outputs) { obs->gnss2Outputs->raw.numSats = static_cast<uint8_t>(obs->gnss2Outputs->raw.satellites.size()); }
1402 28580 }
1403
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 catch (const std::exception& e)
1404 {
1405
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 + 1, e.what());
1406 3 return nullptr;
1407 3 }
1408 28607 }
1409 else // if (fileType == FileType::BINARY)
1410 {
1411 395 auto readFromFilestream = [&, this](char* __s, std::streamsize __n) {
1412 395 read(__s, __n);
1413
2/2
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 390 times.
395 if (!good())
1414 {
1415
1/2
✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
5 throw std::runtime_error("End of file reached");
1416 }
1417 390 };
1418
1419 try
1420 {
1421 133 _messageCount++;
1422 LOG_DATA("{}: Reading message {}", nameId(), _messageCount);
1423 133 int32_t gpsCycle = 0;
1424 133 int32_t gpsWeek = 0;
1425 133 double tow = 0.0;
1426
2/2
✓ Branch 1 taken 130 times.
✓ Branch 2 taken 5 times.
133 readFromFilestream(reinterpret_cast<char*>(&gpsCycle), sizeof(gpsCycle));
1427
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 readFromFilestream(reinterpret_cast<char*>(&gpsWeek), sizeof(gpsWeek));
1428
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 readFromFilestream(reinterpret_cast<char*>(&tow), sizeof(tow));
1429
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)
1430 {
1431
1/2
✓ Branch 2 taken 91 times.
✗ Branch 3 not taken.
91 obs->insTime = InsTime(gpsCycle, gpsWeek, tow);
1432 }
1433
1434 // Group 2 (Time)
1435
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.timeField != vn::protocol::uart::TimeGroup::TIMEGROUP_NONE)
1436 {
1437
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->timeOutputs)
1438 {
1439
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->timeOutputs = std::make_shared<NAV::vendor::vectornav::TimeOutputs>();
1440
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->timeOutputs->timeField |= _binaryOutputRegister.timeField;
1441 }
1442
1443
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)
1444 {
1445
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->timeStartup), sizeof(obs->timeOutputs->timeStartup));
1446 }
1447
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)
1448 {
1449
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timeGps), sizeof(obs->timeOutputs->timeGps));
1450 }
1451
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)
1452 {
1453
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->gpsTow), sizeof(obs->timeOutputs->gpsTow));
1454 }
1455
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)
1456 {
1457
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 read(reinterpret_cast<char*>(&obs->timeOutputs->gpsWeek), sizeof(obs->timeOutputs->gpsWeek));
1458 }
1459
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)
1460 {
1461
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timeSyncIn), sizeof(obs->timeOutputs->timeSyncIn));
1462 }
1463
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)
1464 {
1465
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->timePPS), sizeof(obs->timeOutputs->timePPS));
1466 }
1467
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)
1468 {
1469
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));
1470
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));
1471
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));
1472
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));
1473
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));
1474
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));
1475
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));
1476 }
1477
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)
1478 {
1479
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->syncInCnt), sizeof(obs->timeOutputs->syncInCnt));
1480 }
1481
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)
1482 {
1483
1/2
✓ Branch 3 taken 70 times.
✗ Branch 4 not taken.
70 read(reinterpret_cast<char*>(&obs->timeOutputs->syncOutCnt), sizeof(obs->timeOutputs->syncOutCnt));
1484 }
1485
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)
1486 {
1487
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()));
1488 }
1489 }
1490 // Group 3 (IMU)
1491
2/2
✓ Branch 0 taken 36 times.
✓ Branch 1 taken 94 times.
130 if (_binaryOutputRegister.imuField != vn::protocol::uart::ImuGroup::IMUGROUP_NONE)
1492 {
1493
1/2
✓ Branch 2 taken 36 times.
✗ Branch 3 not taken.
36 if (!obs->imuOutputs)
1494 {
1495
1/2
✓ Branch 1 taken 36 times.
✗ Branch 2 not taken.
36 obs->imuOutputs = std::make_shared<NAV::vendor::vectornav::ImuOutputs>();
1496
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 obs->imuOutputs->imuField |= _binaryOutputRegister.imuField;
1497 }
1498
1499
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)
1500 {
1501 read(reinterpret_cast<char*>(&obs->imuOutputs->imuStatus), sizeof(obs->imuOutputs->imuStatus));
1502 }
1503
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)
1504 {
1505
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));
1506 }
1507
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)
1508 {
1509
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));
1510 }
1511
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)
1512 {
1513
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));
1514 }
1515
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)
1516 {
1517
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->temp), sizeof(obs->imuOutputs->temp));
1518 }
1519
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)
1520 {
1521
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->pres), sizeof(obs->imuOutputs->pres));
1522 }
1523
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)
1524 {
1525
1/2
✓ Branch 3 taken 36 times.
✗ Branch 4 not taken.
36 read(reinterpret_cast<char*>(&obs->imuOutputs->deltaTime), sizeof(obs->imuOutputs->deltaTime));
1526
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));
1527 }
1528
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)
1529 {
1530
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));
1531 }
1532
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)
1533 {
1534
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));
1535 }
1536
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)
1537 {
1538
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));
1539 }
1540
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)
1541 {
1542
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));
1543 }
1544 }
1545 // Group 4 (GNSS1)
1546
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.gpsField != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
1547 {
1548
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->gnss1Outputs)
1549 {
1550
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->gnss1Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
1551
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->gnss1Outputs->gnssField |= _binaryOutputRegister.gpsField;
1552 }
1553
1554
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)
1555 {
1556
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));
1557
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));
1558
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));
1559
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));
1560
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));
1561
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));
1562
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));
1563 }
1564
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)
1565 {
1566
1/2
✓ Branch 3 taken 60 times.
✗ Branch 4 not taken.
60 read(reinterpret_cast<char*>(&obs->gnss1Outputs->tow), sizeof(obs->gnss1Outputs->tow));
1567 }
1568
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)
1569 {
1570
1/2
✓ Branch 3 taken 60 times.
✗ Branch 4 not taken.
60 read(reinterpret_cast<char*>(&obs->gnss1Outputs->week), sizeof(obs->gnss1Outputs->week));
1571 }
1572
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)
1573 {
1574
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss1Outputs->numSats), sizeof(obs->gnss1Outputs->numSats));
1575 }
1576
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)
1577 {
1578
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss1Outputs->fix), sizeof(obs->gnss1Outputs->fix));
1579 }
1580
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)
1581 {
1582
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));
1583 }
1584
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)
1585 {
1586
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));
1587 }
1588
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)
1589 {
1590
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));
1591 }
1592
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)
1593 {
1594
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));
1595 }
1596
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)
1597 {
1598
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));
1599 }
1600
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)
1601 {
1602
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->velU), sizeof(obs->gnss1Outputs->velU));
1603 }
1604
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)
1605 {
1606
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss1Outputs->timeU), sizeof(obs->gnss1Outputs->timeU));
1607 }
1608
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)
1609 {
1610
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()));
1611
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));
1612 }
1613
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)
1614 {
1615
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));
1616
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));
1617
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));
1618
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));
1619
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));
1620
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));
1621
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));
1622 }
1623
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)
1624 {
1625
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));
1626
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss1Outputs->satInfo.satellites.resize(obs->gnss1Outputs->satInfo.numSats);
1627
1628
2/2
✓ Branch 7 taken 1121 times.
✓ Branch 8 taken 70 times.
1191 for (auto& satellite : obs->gnss1Outputs->satInfo.satellites)
1629 {
1630
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1631
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1632
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1633
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1634
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.qi), sizeof(satellite.qi));
1635
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.el), sizeof(satellite.el));
1636
1/2
✓ Branch 1 taken 1121 times.
✗ Branch 2 not taken.
1121 read(reinterpret_cast<char*>(&satellite.az), sizeof(satellite.az));
1637 }
1638 }
1639
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)
1640 {
1641
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));
1642
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));
1643
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));
1644
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss1Outputs->raw.satellites.resize(obs->gnss1Outputs->raw.numSats);
1645
1646
2/2
✓ Branch 7 taken 655 times.
✓ Branch 8 taken 70 times.
725 for (auto& satellite : obs->gnss1Outputs->raw.satellites)
1647 {
1648
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1649
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1650
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.freq), sizeof(satellite.freq));
1651
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.chan), sizeof(satellite.chan));
1652
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.slot), sizeof(satellite.slot));
1653
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1654
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1655
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.pr), sizeof(satellite.pr));
1656
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.cp), sizeof(satellite.cp));
1657
1/2
✓ Branch 1 taken 655 times.
✗ Branch 2 not taken.
655 read(reinterpret_cast<char*>(&satellite.dp), sizeof(satellite.dp));
1658 }
1659 }
1660 }
1661 // Group 5 (Attitude)
1662
1/2
✓ Branch 0 taken 130 times.
✗ Branch 1 not taken.
130 if (_binaryOutputRegister.attitudeField != vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_NONE)
1663 {
1664
1/2
✓ Branch 2 taken 130 times.
✗ Branch 3 not taken.
130 if (!obs->attitudeOutputs)
1665 {
1666
1/2
✓ Branch 1 taken 130 times.
✗ Branch 2 not taken.
130 obs->attitudeOutputs = std::make_shared<NAV::vendor::vectornav::AttitudeOutputs>();
1667
1/2
✓ Branch 3 taken 130 times.
✗ Branch 4 not taken.
130 obs->attitudeOutputs->attitudeField |= _binaryOutputRegister.attitudeField;
1668 }
1669
1670
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)
1671 {
1672 read(reinterpret_cast<char*>(&obs->attitudeOutputs->vpeStatus.status()), sizeof(obs->attitudeOutputs->vpeStatus.status()));
1673 }
1674
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)
1675 {
1676
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));
1677 }
1678
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)
1679 {
1680
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));
1681 }
1682
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)
1683 {
1684
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));
1685 }
1686
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)
1687 {
1688
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));
1689 }
1690
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)
1691 {
1692
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));
1693 }
1694
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)
1695 {
1696
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));
1697 }
1698
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)
1699 {
1700
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));
1701 }
1702
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)
1703 {
1704
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));
1705 }
1706 }
1707 // Group 6 (INS)
1708
2/2
✓ Branch 0 taken 94 times.
✓ Branch 1 taken 36 times.
130 if (_binaryOutputRegister.insField != vn::protocol::uart::InsGroup::INSGROUP_NONE)
1709 {
1710
1/2
✓ Branch 2 taken 94 times.
✗ Branch 3 not taken.
94 if (!obs->insOutputs)
1711 {
1712
1/2
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
94 obs->insOutputs = std::make_shared<NAV::vendor::vectornav::InsOutputs>();
1713
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 obs->insOutputs->insField |= _binaryOutputRegister.insField;
1714 }
1715
1716
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)
1717 {
1718
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()));
1719 }
1720
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)
1721 {
1722
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));
1723 }
1724
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)
1725 {
1726
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));
1727 }
1728
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)
1729 {
1730
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));
1731 }
1732
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)
1733 {
1734
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));
1735 }
1736
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)
1737 {
1738
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));
1739 }
1740
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)
1741 {
1742
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));
1743 }
1744
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)
1745 {
1746
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));
1747 }
1748
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)
1749 {
1750
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));
1751 }
1752
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)
1753 {
1754
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->insOutputs->posU), sizeof(obs->insOutputs->posU));
1755 }
1756
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)
1757 {
1758
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->insOutputs->velU), sizeof(obs->insOutputs->velU));
1759 }
1760 }
1761 // Group 7 (GNSS2)
1762
2/2
✓ Branch 0 taken 94 times.
✓ Branch 1 taken 36 times.
130 if (_binaryOutputRegister.gps2Field != vn::protocol::uart::GpsGroup::GPSGROUP_NONE)
1763 {
1764
1/2
✓ Branch 2 taken 94 times.
✗ Branch 3 not taken.
94 if (!obs->gnss2Outputs)
1765 {
1766
1/2
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
94 obs->gnss2Outputs = std::make_shared<NAV::vendor::vectornav::GnssOutputs>();
1767
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 obs->gnss2Outputs->gnssField |= _binaryOutputRegister.gps2Field;
1768 }
1769
1770
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)
1771 {
1772
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));
1773
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));
1774
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));
1775
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));
1776
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));
1777
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));
1778
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));
1779 }
1780
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)
1781 {
1782
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->tow), sizeof(obs->gnss2Outputs->tow));
1783 }
1784
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)
1785 {
1786
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->week), sizeof(obs->gnss2Outputs->week));
1787 }
1788
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)
1789 {
1790
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->numSats), sizeof(obs->gnss2Outputs->numSats));
1791 }
1792
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)
1793 {
1794
1/2
✓ Branch 3 taken 94 times.
✗ Branch 4 not taken.
94 read(reinterpret_cast<char*>(&obs->gnss2Outputs->fix), sizeof(obs->gnss2Outputs->fix));
1795 }
1796
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)
1797 {
1798
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));
1799 }
1800
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)
1801 {
1802
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));
1803 }
1804
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)
1805 {
1806
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));
1807 }
1808
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)
1809 {
1810
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));
1811 }
1812
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)
1813 {
1814
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));
1815 }
1816
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)
1817 {
1818
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->velU), sizeof(obs->gnss2Outputs->velU));
1819 }
1820
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)
1821 {
1822
1/2
✓ Branch 3 taken 24 times.
✗ Branch 4 not taken.
24 read(reinterpret_cast<char*>(&obs->gnss2Outputs->timeU), sizeof(obs->gnss2Outputs->timeU));
1823 }
1824
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)
1825 {
1826
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()));
1827
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));
1828 }
1829
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)
1830 {
1831
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));
1832
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));
1833
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));
1834
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));
1835
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));
1836
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));
1837
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));
1838 }
1839
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)
1840 {
1841
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));
1842
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss2Outputs->satInfo.satellites.resize(obs->gnss2Outputs->satInfo.numSats);
1843
1844
2/2
✓ Branch 7 taken 1146 times.
✓ Branch 8 taken 70 times.
1216 for (auto& satellite : obs->gnss2Outputs->satInfo.satellites)
1845 {
1846
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1847
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1848
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1849
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1850
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.qi), sizeof(satellite.qi));
1851
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.el), sizeof(satellite.el));
1852
1/2
✓ Branch 1 taken 1146 times.
✗ Branch 2 not taken.
1146 read(reinterpret_cast<char*>(&satellite.az), sizeof(satellite.az));
1853 }
1854 }
1855
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)
1856 {
1857
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));
1858
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));
1859
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));
1860
1/2
✓ Branch 5 taken 70 times.
✗ Branch 6 not taken.
70 obs->gnss2Outputs->raw.satellites.resize(obs->gnss2Outputs->raw.numSats);
1861
1862
2/2
✓ Branch 7 taken 543 times.
✓ Branch 8 taken 70 times.
613 for (auto& satellite : obs->gnss2Outputs->raw.satellites)
1863 {
1864
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.sys), sizeof(satellite.sys));
1865
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.svId), sizeof(satellite.svId));
1866
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.freq), sizeof(satellite.freq));
1867
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.chan), sizeof(satellite.chan));
1868
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.slot), sizeof(satellite.slot));
1869
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.cno), sizeof(satellite.cno));
1870
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.flags), sizeof(satellite.flags));
1871
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.pr), sizeof(satellite.pr));
1872
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.cp), sizeof(satellite.cp));
1873
1/2
✓ Branch 1 taken 543 times.
✗ Branch 2 not taken.
543 read(reinterpret_cast<char*>(&satellite.dp), sizeof(satellite.dp));
1874 }
1875 }
1876 }
1877 }
1878
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
5 catch (const std::exception& e)
1879 {
1880
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);
1881 5 return nullptr;
1882 5 }
1883 }
1884
1885
2/14
✗ Branch 2 not taken.
✓ Branch 3 taken 28671 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✓ Branch 25 taken 28671 times.
28671 if (!obs->timeOutputs && !obs->imuOutputs && !obs->gnss1Outputs && !obs->attitudeOutputs && !obs->insOutputs && !obs->gnss2Outputs)
1886 {
1887 LOG_DATA("{}: Nothing read at message {}. Ending reading.", nameId(), _messageCount);
1888 return nullptr;
1889 }
1890
2/2
✓ Branch 2 taken 39 times.
✓ Branch 3 taken 28632 times.
28671 if (obs->insTime.empty())
1891 {
1892 LOG_DATA("{}: Skipping message {}, as no InsTime set.", nameId(), _messageCount);
1893 39 return obs;
1894 }
1895
1896
1/2
✓ Branch 2 taken 28631 times.
✗ Branch 3 not taken.
28632 invokeCallbacks(OUTPUT_PORT_INDEX_VECTORNAV_BINARY_OUTPUT, obs);
1897 28631 return obs;
1898 28725 }
1899