INSTINCT Code Coverage Report


Directory: src/
File: Nodes/DataLogger/IMU/VectorNavDataLogger.cpp
Date: 2025-11-25 23:34:18
Exec Total Coverage
Lines: 219 298 73.5%
Functions: 10 13 76.9%
Branches: 323 766 42.2%

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 "VectorNavDataLogger.hpp"
10
11 #include "NodeData/IMU/VectorNavBinaryOutput.hpp"
12
13 #include "util/Logger.hpp"
14 #include "util/StringUtil.hpp"
15
16 #include <iomanip> // std::setprecision
17 #include <limits>
18
19 #include "internal/FlowManager.hpp"
20
21 #include <imgui_internal.h>
22
23 116 NAV::VectorNavDataLogger::VectorNavDataLogger()
24
4/8
✓ Branch 1 taken 116 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 116 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 116 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 116 times.
✗ Branch 12 not taken.
116 : Node(typeStatic())
25 {
26 LOG_TRACE("{}: called", name);
27
28 116 _fileType = FileType::BINARY;
29
30 116 _hasConfig = true;
31 116 _guiConfigDefaultWindowSize = { 444, 92 };
32
33
4/8
✓ Branch 1 taken 116 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 116 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 116 times.
✓ Branch 9 taken 116 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
348 CreateInputPin("BinaryOutput", Pin::Type::Flow, { NAV::VectorNavBinaryOutput::type() }, &VectorNavDataLogger::writeObservation);
34 232 }
35
36 236 NAV::VectorNavDataLogger::~VectorNavDataLogger()
37 {
38 LOG_TRACE("{}: called", nameId());
39 236 }
40
41 230 std::string NAV::VectorNavDataLogger::typeStatic()
42 {
43
1/2
✓ Branch 1 taken 230 times.
✗ Branch 2 not taken.
460 return "VectorNavDataLogger";
44 }
45
46 std::string NAV::VectorNavDataLogger::type() const
47 {
48 return typeStatic();
49 }
50
51 114 std::string NAV::VectorNavDataLogger::category()
52 {
53
1/2
✓ Branch 1 taken 114 times.
✗ Branch 2 not taken.
228 return "Data Logger";
54 }
55
56 void NAV::VectorNavDataLogger::guiConfig()
57 {
58 if (FileWriter::guiConfig(".vnb", { ".vnb" }, size_t(id), nameId()))
59 {
60 flow::ApplyChanges();
61 doDeinitialize();
62 }
63
64 if (CommonLog::ShowOriginInput(nameId().c_str()))
65 {
66 flow::ApplyChanges();
67 }
68 }
69
70 [[nodiscard]] json NAV::VectorNavDataLogger::save() const
71 {
72 LOG_TRACE("{}: called", nameId());
73
74 json j;
75
76 j["FileWriter"] = FileWriter::save();
77
78 return j;
79 }
80
81 2 void NAV::VectorNavDataLogger::restore(json const& j)
82 {
83 LOG_TRACE("{}: called", nameId());
84
85
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 if (j.contains("FileWriter"))
86 {
87 2 FileWriter::restore(j.at("FileWriter"));
88 }
89 2 }
90
91 2 bool NAV::VectorNavDataLogger::onCreateLink([[maybe_unused]] OutputPin& startPin, [[maybe_unused]] InputPin& endPin)
92 {
93 LOG_TRACE("{}: called for {} ==> {}", nameId(), size_t(startPin.id), size_t(endPin.id));
94
95
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
2 if (isInitialized())
96 {
97 deinitialize();
98 initialize();
99 }
100
101 2 return true;
102 }
103
104 2 void NAV::VectorNavDataLogger::flush()
105 {
106 2 _filestream.flush();
107 2 }
108
109 6 bool NAV::VectorNavDataLogger::initialize()
110 {
111 LOG_TRACE("{}: called", nameId());
112
113
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
6 if (!FileWriter::initialize())
114 {
115 return false;
116 }
117
118 6 CommonLog::initialize();
119
120 6 _headerWritten = false;
121
122 6 return true;
123 }
124
125 2 void NAV::VectorNavDataLogger::deinitialize()
126 {
127 LOG_TRACE("{}: called", nameId());
128
129 2 FileWriter::deinitialize();
130 2 }
131
132 30 void NAV::VectorNavDataLogger::writeObservation(NAV::InputPin::NodeDataQueue& queue, size_t /* pinIdx */)
133 {
134
1/2
✓ Branch 1 taken 30 times.
✗ Branch 2 not taken.
30 auto obs = std::static_pointer_cast<const VectorNavBinaryOutput>(queue.extract_front());
135
136
1/2
✓ Branch 0 taken 30 times.
✗ Branch 1 not taken.
30 if (_fileType == FileType::BINARY)
137 {
138 30 std::array<const char, 8> zeroData{};
139
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 28 times.
30 if (!_headerWritten)
140 {
141
2/4
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
2 _filestream.write(obs->timeOutputs ? reinterpret_cast<const char*>(&obs->timeOutputs->timeField) : zeroData.data(), sizeof(vn::protocol::uart::TimeGroup));
142
3/4
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
3 _filestream.write(obs->imuOutputs ? reinterpret_cast<const char*>(&obs->imuOutputs->imuField) : zeroData.data(), sizeof(vn::protocol::uart::ImuGroup));
143
2/4
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
2 _filestream.write(obs->gnss1Outputs ? reinterpret_cast<const char*>(&obs->gnss1Outputs->gnssField) : zeroData.data(), sizeof(vn::protocol::uart::GpsGroup));
144
2/4
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
2 _filestream.write(obs->attitudeOutputs ? reinterpret_cast<const char*>(&obs->attitudeOutputs->attitudeField) : zeroData.data(), sizeof(vn::protocol::uart::AttitudeGroup));
145
3/4
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
3 _filestream.write(obs->insOutputs ? reinterpret_cast<const char*>(&obs->insOutputs->insField) : zeroData.data(), sizeof(vn::protocol::uart::InsGroup));
146
3/4
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
3 _filestream.write(obs->gnss2Outputs ? reinterpret_cast<const char*>(&obs->gnss2Outputs->gnssField) : zeroData.data(), sizeof(vn::protocol::uart::GpsGroup));
147 2 _headerWritten = true;
148 }
149
150
1/2
✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
30 if (!obs->insTime.empty())
151 {
152
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 auto insTimeGPS = obs->insTime.toGPSweekTow();
153 30 auto tow = static_cast<double>(insTimeGPS.tow);
154
1/2
✓ Branch 1 taken 30 times.
✗ Branch 2 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&insTimeGPS.gpsCycle), sizeof(insTimeGPS.gpsCycle));
155
1/2
✓ Branch 1 taken 30 times.
✗ Branch 2 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&insTimeGPS.gpsWeek), sizeof(insTimeGPS.gpsWeek));
156
1/2
✓ Branch 1 taken 30 times.
✗ Branch 2 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&tow), sizeof(tow));
157 }
158 else
159 {
160 _filestream.write(zeroData.data(), sizeof(int32_t));
161 _filestream.write(zeroData.data(), sizeof(int32_t));
162 _filestream.write(zeroData.data(), sizeof(double));
163 }
164
165 // Group 2 (Time)
166
1/2
✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
30 if (obs->timeOutputs)
167 {
168
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTARTUP)
169 {
170
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeStartup), sizeof(obs->timeOutputs->timeStartup));
171 }
172
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPS)
173 {
174 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeGps), sizeof(obs->timeOutputs->timeGps));
175 }
176
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
177 {
178
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->gpsTow), sizeof(obs->timeOutputs->gpsTow));
179 }
180
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK)
181 {
182
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->gpsWeek), sizeof(obs->timeOutputs->gpsWeek));
183 }
184
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESYNCIN)
185 {
186 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeSyncIn), sizeof(obs->timeOutputs->timeSyncIn));
187 }
188
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPSPPS)
189 {
190 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timePPS), sizeof(obs->timeOutputs->timePPS));
191 }
192
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)
193 {
194
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.year), sizeof(obs->timeOutputs->timeUtc.year));
195
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.month), sizeof(obs->timeOutputs->timeUtc.month));
196
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.day), sizeof(obs->timeOutputs->timeUtc.day));
197
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.hour), sizeof(obs->timeOutputs->timeUtc.hour));
198
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.min), sizeof(obs->timeOutputs->timeUtc.min));
199
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.sec), sizeof(obs->timeOutputs->timeUtc.sec));
200
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeUtc.ms), sizeof(obs->timeOutputs->timeUtc.ms));
201 }
202
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCINCNT)
203 {
204 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->syncInCnt), sizeof(obs->timeOutputs->syncInCnt));
205 }
206
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCOUTCNT)
207 {
208 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->syncOutCnt), sizeof(obs->timeOutputs->syncOutCnt));
209 }
210
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
211 {
212
1/2
✓ Branch 4 taken 30 times.
✗ Branch 5 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->timeOutputs->timeStatus.status()), sizeof(obs->timeOutputs->timeStatus.status()));
213 }
214 }
215 // Group 3 (IMU)
216
2/2
✓ Branch 2 taken 18 times.
✓ Branch 3 taken 12 times.
30 if (obs->imuOutputs)
217 {
218
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 18 times.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_IMUSTATUS)
219 {
220 _filestream.write(reinterpret_cast<const char*>(&obs->imuOutputs->imuStatus), sizeof(obs->imuOutputs->imuStatus));
221 }
222
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)
223 {
224
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->uncompMag.data()), sizeof(obs->imuOutputs->uncompMag));
225 }
226
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)
227 {
228
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->uncompAccel.data()), sizeof(obs->imuOutputs->uncompAccel));
229 }
230
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)
231 {
232
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->uncompGyro.data()), sizeof(obs->imuOutputs->uncompGyro));
233 }
234
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)
235 {
236
1/2
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
18 _filestream.write(reinterpret_cast<const char*>(&obs->imuOutputs->temp), sizeof(obs->imuOutputs->temp));
237 }
238
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_PRES)
239 {
240
1/2
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
18 _filestream.write(reinterpret_cast<const char*>(&obs->imuOutputs->pres), sizeof(obs->imuOutputs->pres));
241 }
242
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)
243 {
244
1/2
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
18 _filestream.write(reinterpret_cast<const char*>(&obs->imuOutputs->deltaTime), sizeof(obs->imuOutputs->deltaTime));
245
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->deltaTheta.data()), sizeof(obs->imuOutputs->deltaTheta));
246 }
247
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)
248 {
249
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->deltaV.data()), sizeof(obs->imuOutputs->deltaV));
250 }
251
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)
252 {
253
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->mag.data()), sizeof(obs->imuOutputs->mag));
254 }
255
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)
256 {
257
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->accel.data()), sizeof(obs->imuOutputs->accel));
258 }
259
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
18 if (obs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)
260 {
261
2/4
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 18 times.
✗ Branch 7 not taken.
18 _filestream.write(reinterpret_cast<const char*>(obs->imuOutputs->angularRate.data()), sizeof(obs->imuOutputs->angularRate));
262 }
263 }
264 // Group 4 (GNSS1)
265
1/2
✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
30 if (obs->gnss1Outputs)
266 {
267
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
268 {
269
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.year), sizeof(obs->gnss1Outputs->timeUtc.year));
270
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.month), sizeof(obs->gnss1Outputs->timeUtc.month));
271
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.day), sizeof(obs->gnss1Outputs->timeUtc.day));
272
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.hour), sizeof(obs->gnss1Outputs->timeUtc.hour));
273
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.min), sizeof(obs->gnss1Outputs->timeUtc.min));
274
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.sec), sizeof(obs->gnss1Outputs->timeUtc.sec));
275
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeUtc.ms), sizeof(obs->gnss1Outputs->timeUtc.ms));
276 }
277
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
278 {
279
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->tow), sizeof(obs->gnss1Outputs->tow));
280 }
281
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
282 {
283
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->week), sizeof(obs->gnss1Outputs->week));
284 }
285
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
286 {
287
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->numSats), sizeof(obs->gnss1Outputs->numSats));
288 }
289
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
290 {
291
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->fix), sizeof(obs->gnss1Outputs->fix));
292 }
293
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
294 {
295
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss1Outputs->posLla.data()), sizeof(obs->gnss1Outputs->posLla));
296 }
297
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
298 {
299
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss1Outputs->posEcef.data()), sizeof(obs->gnss1Outputs->posEcef));
300 }
301
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
302 {
303
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss1Outputs->velNed.data()), sizeof(obs->gnss1Outputs->velNed));
304 }
305
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
306 {
307
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss1Outputs->velEcef.data()), sizeof(obs->gnss1Outputs->velEcef));
308 }
309
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
310 {
311
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss1Outputs->posU.data()), sizeof(obs->gnss1Outputs->posU));
312 }
313
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
314 {
315
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->velU), sizeof(obs->gnss1Outputs->velU));
316 }
317
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
318 {
319
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeU), sizeof(obs->gnss1Outputs->timeU));
320 }
321
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
322 {
323
1/2
✓ Branch 4 taken 30 times.
✗ Branch 5 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeInfo.status.status()), sizeof(obs->gnss1Outputs->timeInfo.status.status()));
324
1/2
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
30 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->timeInfo.leapSeconds), sizeof(obs->gnss1Outputs->timeInfo.leapSeconds));
325 }
326
3/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✓ Branch 6 taken 18 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
327 {
328
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.gDop), sizeof(obs->gnss1Outputs->dop.gDop));
329
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.pDop), sizeof(obs->gnss1Outputs->dop.pDop));
330
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.tDop), sizeof(obs->gnss1Outputs->dop.tDop));
331
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.vDop), sizeof(obs->gnss1Outputs->dop.vDop));
332
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.hDop), sizeof(obs->gnss1Outputs->dop.hDop));
333
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.nDop), sizeof(obs->gnss1Outputs->dop.nDop));
334
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->dop.eDop), sizeof(obs->gnss1Outputs->dop.eDop));
335 }
336
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
337 {
338 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->satInfo.numSats), sizeof(obs->gnss1Outputs->satInfo.numSats));
339
340 for (auto& satellite : obs->gnss1Outputs->satInfo.satellites)
341 {
342 _filestream.write(reinterpret_cast<const char*>(&satellite.sys), sizeof(satellite.sys));
343 _filestream.write(reinterpret_cast<const char*>(&satellite.svId), sizeof(satellite.svId));
344 _filestream.write(reinterpret_cast<const char*>(&satellite.flags), sizeof(satellite.flags));
345 _filestream.write(reinterpret_cast<const char*>(&satellite.cno), sizeof(satellite.cno));
346 _filestream.write(reinterpret_cast<const char*>(&satellite.qi), sizeof(satellite.qi));
347 _filestream.write(reinterpret_cast<const char*>(&satellite.el), sizeof(satellite.el));
348 _filestream.write(reinterpret_cast<const char*>(&satellite.az), sizeof(satellite.az));
349 }
350 }
351
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
352 {
353 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->raw.tow), sizeof(obs->gnss1Outputs->raw.tow));
354 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->raw.week), sizeof(obs->gnss1Outputs->raw.week));
355 _filestream.write(reinterpret_cast<const char*>(&obs->gnss1Outputs->raw.numSats), sizeof(obs->gnss1Outputs->raw.numSats));
356
357 for (auto& satellite : obs->gnss1Outputs->raw.satellites)
358 {
359 _filestream.write(reinterpret_cast<const char*>(&satellite.sys), sizeof(satellite.sys));
360 _filestream.write(reinterpret_cast<const char*>(&satellite.svId), sizeof(satellite.svId));
361 _filestream.write(reinterpret_cast<const char*>(&satellite.freq), sizeof(satellite.freq));
362 _filestream.write(reinterpret_cast<const char*>(&satellite.chan), sizeof(satellite.chan));
363 _filestream.write(reinterpret_cast<const char*>(&satellite.slot), sizeof(satellite.slot));
364 _filestream.write(reinterpret_cast<const char*>(&satellite.cno), sizeof(satellite.cno));
365 _filestream.write(reinterpret_cast<const char*>(&satellite.flags), sizeof(satellite.flags));
366 _filestream.write(reinterpret_cast<const char*>(&satellite.pr), sizeof(satellite.pr));
367 _filestream.write(reinterpret_cast<const char*>(&satellite.cp), sizeof(satellite.cp));
368 _filestream.write(reinterpret_cast<const char*>(&satellite.dp), sizeof(satellite.dp));
369 }
370 }
371 }
372 // Group 5 (Attitude)
373
1/2
✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
30 if (obs->attitudeOutputs)
374 {
375
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)
376 {
377 _filestream.write(reinterpret_cast<const char*>(&obs->attitudeOutputs->vpeStatus.status()), sizeof(obs->attitudeOutputs->vpeStatus.status()));
378 }
379
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)
380 {
381
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 30 times.
✗ Branch 7 not taken.
30 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->ypr.data()), sizeof(obs->attitudeOutputs->ypr));
382 }
383
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)
384 {
385
2/4
✓ Branch 4 taken 30 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 30 times.
✗ Branch 8 not taken.
30 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->qtn.coeffs().data()), sizeof(obs->attitudeOutputs->qtn));
386 }
387
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)
388 {
389 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->dcm.data()), sizeof(obs->attitudeOutputs->dcm));
390 }
391
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)
392 {
393 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->magNed.data()), sizeof(obs->attitudeOutputs->magNed));
394 }
395
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)
396 {
397 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->accelNed.data()), sizeof(obs->attitudeOutputs->accelNed));
398 }
399
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)
400 {
401 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->linearAccelBody.data()), sizeof(obs->attitudeOutputs->linearAccelBody));
402 }
403
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)
404 {
405 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->linearAccelNed.data()), sizeof(obs->attitudeOutputs->linearAccelNed));
406 }
407
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
30 if (obs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)
408 {
409
2/4
✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 30 times.
✗ Branch 7 not taken.
30 _filestream.write(reinterpret_cast<const char*>(obs->attitudeOutputs->yprU.data()), sizeof(obs->attitudeOutputs->yprU));
410 }
411 }
412 // Group 6 (INS)
413
2/2
✓ Branch 2 taken 12 times.
✓ Branch 3 taken 18 times.
30 if (obs->insOutputs)
414 {
415
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)
416 {
417
1/2
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->insOutputs->insStatus.status()), sizeof(obs->insOutputs->insStatus.status()));
418 }
419
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)
420 {
421
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->posLla.data()), sizeof(obs->insOutputs->posLla));
422 }
423
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)
424 {
425
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->posEcef.data()), sizeof(obs->insOutputs->posEcef));
426 }
427
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)
428 {
429
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->velBody.data()), sizeof(obs->insOutputs->velBody));
430 }
431
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)
432 {
433
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->velNed.data()), sizeof(obs->insOutputs->velNed));
434 }
435
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)
436 {
437
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->velEcef.data()), sizeof(obs->insOutputs->velEcef));
438 }
439
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)
440 {
441
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->magEcef.data()), sizeof(obs->insOutputs->magEcef));
442 }
443
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)
444 {
445
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->accelEcef.data()), sizeof(obs->insOutputs->accelEcef));
446 }
447
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)
448 {
449
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->insOutputs->linearAccelEcef.data()), sizeof(obs->insOutputs->linearAccelEcef));
450 }
451
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSU)
452 {
453
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->insOutputs->posU), sizeof(obs->insOutputs->posU));
454 }
455
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELU)
456 {
457
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->insOutputs->velU), sizeof(obs->insOutputs->velU));
458 }
459 }
460 // Group 7 (GNSS2)
461
2/2
✓ Branch 2 taken 12 times.
✓ Branch 3 taken 18 times.
30 if (obs->gnss2Outputs)
462 {
463
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)
464 {
465
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.year), sizeof(obs->gnss2Outputs->timeUtc.year));
466
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.month), sizeof(obs->gnss2Outputs->timeUtc.month));
467
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.day), sizeof(obs->gnss2Outputs->timeUtc.day));
468
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.hour), sizeof(obs->gnss2Outputs->timeUtc.hour));
469
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.min), sizeof(obs->gnss2Outputs->timeUtc.min));
470
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.sec), sizeof(obs->gnss2Outputs->timeUtc.sec));
471
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeUtc.ms), sizeof(obs->gnss2Outputs->timeUtc.ms));
472 }
473
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)
474 {
475
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->tow), sizeof(obs->gnss2Outputs->tow));
476 }
477
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)
478 {
479
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->week), sizeof(obs->gnss2Outputs->week));
480 }
481
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)
482 {
483
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->numSats), sizeof(obs->gnss2Outputs->numSats));
484 }
485
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)
486 {
487
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->fix), sizeof(obs->gnss2Outputs->fix));
488 }
489
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
490 {
491
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss2Outputs->posLla.data()), sizeof(obs->gnss2Outputs->posLla));
492 }
493
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
494 {
495
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss2Outputs->posEcef.data()), sizeof(obs->gnss2Outputs->posEcef));
496 }
497
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
498 {
499
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss2Outputs->velNed.data()), sizeof(obs->gnss2Outputs->velNed));
500 }
501
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
502 {
503
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss2Outputs->velEcef.data()), sizeof(obs->gnss2Outputs->velEcef));
504 }
505
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)
506 {
507
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 12 times.
✗ Branch 7 not taken.
12 _filestream.write(reinterpret_cast<const char*>(obs->gnss2Outputs->posU.data()), sizeof(obs->gnss2Outputs->posU));
508 }
509
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)
510 {
511
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->velU), sizeof(obs->gnss2Outputs->velU));
512 }
513
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)
514 {
515
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeU), sizeof(obs->gnss2Outputs->timeU));
516 }
517
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)
518 {
519
1/2
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeInfo.status.status()), sizeof(obs->gnss2Outputs->timeInfo.status.status()));
520
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->timeInfo.leapSeconds), sizeof(obs->gnss2Outputs->timeInfo.leapSeconds));
521 }
522
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 12 times.
✗ Branch 6 not taken.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)
523 {
524
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.gDop), sizeof(obs->gnss2Outputs->dop.gDop));
525
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.pDop), sizeof(obs->gnss2Outputs->dop.pDop));
526
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.tDop), sizeof(obs->gnss2Outputs->dop.tDop));
527
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.vDop), sizeof(obs->gnss2Outputs->dop.vDop));
528
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.hDop), sizeof(obs->gnss2Outputs->dop.hDop));
529
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.nDop), sizeof(obs->gnss2Outputs->dop.nDop));
530
1/2
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
12 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->dop.eDop), sizeof(obs->gnss2Outputs->dop.eDop));
531 }
532
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 12 times.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)
533 {
534 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->satInfo.numSats), sizeof(obs->gnss2Outputs->satInfo.numSats));
535
536 for (auto& satellite : obs->gnss2Outputs->satInfo.satellites)
537 {
538 _filestream.write(reinterpret_cast<const char*>(&satellite.sys), sizeof(satellite.sys));
539 _filestream.write(reinterpret_cast<const char*>(&satellite.svId), sizeof(satellite.svId));
540 _filestream.write(reinterpret_cast<const char*>(&satellite.flags), sizeof(satellite.flags));
541 _filestream.write(reinterpret_cast<const char*>(&satellite.cno), sizeof(satellite.cno));
542 _filestream.write(reinterpret_cast<const char*>(&satellite.qi), sizeof(satellite.qi));
543 _filestream.write(reinterpret_cast<const char*>(&satellite.el), sizeof(satellite.el));
544 _filestream.write(reinterpret_cast<const char*>(&satellite.az), sizeof(satellite.az));
545 }
546 }
547
2/4
✓ Branch 3 taken 12 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 12 times.
12 if (obs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
548 {
549 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->raw.tow), sizeof(obs->gnss2Outputs->raw.tow));
550 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->raw.week), sizeof(obs->gnss2Outputs->raw.week));
551 _filestream.write(reinterpret_cast<const char*>(&obs->gnss2Outputs->raw.numSats), sizeof(obs->gnss2Outputs->raw.numSats));
552
553 for (auto& satellite : obs->gnss2Outputs->raw.satellites)
554 {
555 _filestream.write(reinterpret_cast<const char*>(&satellite.sys), sizeof(satellite.sys));
556 _filestream.write(reinterpret_cast<const char*>(&satellite.svId), sizeof(satellite.svId));
557 _filestream.write(reinterpret_cast<const char*>(&satellite.freq), sizeof(satellite.freq));
558 _filestream.write(reinterpret_cast<const char*>(&satellite.chan), sizeof(satellite.chan));
559 _filestream.write(reinterpret_cast<const char*>(&satellite.slot), sizeof(satellite.slot));
560 _filestream.write(reinterpret_cast<const char*>(&satellite.cno), sizeof(satellite.cno));
561 _filestream.write(reinterpret_cast<const char*>(&satellite.flags), sizeof(satellite.flags));
562 _filestream.write(reinterpret_cast<const char*>(&satellite.pr), sizeof(satellite.pr));
563 _filestream.write(reinterpret_cast<const char*>(&satellite.cp), sizeof(satellite.cp));
564 _filestream.write(reinterpret_cast<const char*>(&satellite.dp), sizeof(satellite.dp));
565 }
566 }
567 }
568 }
569 else
570 {
571 LOG_INFO("{}: If you want to log csv instead of binary, use the 'CsvLogger' instead.", nameId());
572 }
573
574 LOG_DATA("{}: Message logged", nameId());
575 30 }
576