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