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