0.2.0
Loading...
Searching...
No Matches
VectorNavBinaryOutput.hpp
Go to the documentation of this file.
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
13
14#pragma once
15
16#include <memory>
17
18#include "NodeData/NodeData.hpp"
20#include "util/Eigen.hpp"
21
23#include "util/Vendor/VectorNav/BinaryOutputs/ImuOutputs.hpp"
24#include "util/Vendor/VectorNav/BinaryOutputs/GnssOutputs.hpp"
25#include "util/Vendor/VectorNav/BinaryOutputs/AttitudeOutputs.hpp"
26#include "util/Vendor/VectorNav/BinaryOutputs/InsOutputs.hpp"
27
28namespace NAV
29{
32{
33 public:
37 : imuPos(imuPos) {}
38
41 [[nodiscard]] static std::string type()
42 {
43 return "VectorNavBinaryOutput";
44 }
45
48 [[nodiscard]] static std::vector<std::string> parentTypes()
49 {
50 return { NodeData::type() };
51 }
52
54 [[nodiscard]] static std::vector<std::string> GetStaticDataDescriptors()
55 {
56 return {
57 // Group 2 (Time)
58 "Time::TimeStartup [ns]",
59 "Time::TimeGps [ns]",
60 "Time::GpsTow [ns]",
61 "Time::GpsWeek",
62 "Time::TimeSyncIn [ns]",
63 "Time::TimeGpsPps [ns]",
64 "Time::TimeUTC::year",
65 "Time::TimeUTC::month",
66 "Time::TimeUTC::day",
67 "Time::TimeUTC::hour",
68 "Time::TimeUTC::min",
69 "Time::TimeUTC::sec",
70 "Time::TimeUTC::ms",
71 "Time::SyncInCnt",
72 "Time::SyncOutCnt",
73 "Time::TimeStatus::timeOk",
74 "Time::TimeStatus::dateOk",
75 "Time::TimeStatus::utcTimeValid",
76 // Group 3 (IMU)
77 "IMU::ImuStatus",
78 "IMU::UncompMag::X [Gauss]",
79 "IMU::UncompMag::Y [Gauss]",
80 "IMU::UncompMag::Z [Gauss]",
81 "IMU::UncompAccel::X [m/s^2]",
82 "IMU::UncompAccel::Y [m/s^2]",
83 "IMU::UncompAccel::Z [m/s^2]",
84 "IMU::UncompGyro::X [rad/s]",
85 "IMU::UncompGyro::Y [rad/s]",
86 "IMU::UncompGyro::Z [rad/s]",
87 "IMU::Temp [Celsius]",
88 "IMU::Pres [kPa]",
89 "IMU::DeltaTime [s]",
90 "IMU::DeltaTheta::X [deg]",
91 "IMU::DeltaTheta::Y [deg]",
92 "IMU::DeltaTheta::Z [deg]",
93 "IMU::DeltaVel::X [m/s]",
94 "IMU::DeltaVel::Y [m/s]",
95 "IMU::DeltaVel::Z [m/s]",
96 "IMU::Mag::X [Gauss]",
97 "IMU::Mag::Y [Gauss]",
98 "IMU::Mag::Z [Gauss]",
99 "IMU::Accel::X [m/s^2]",
100 "IMU::Accel::Y [m/s^2]",
101 "IMU::Accel::Z [m/s^2]",
102 "IMU::AngularRate::X [rad/s]",
103 "IMU::AngularRate::Y [rad/s]",
104 "IMU::AngularRate::Z [rad/s]",
105 // Group 4 (GNSS1)
106 "GNSS1::UTC::year",
107 "GNSS1::UTC::month",
108 "GNSS1::UTC::day",
109 "GNSS1::UTC::hour",
110 "GNSS1::UTC::min",
111 "GNSS1::UTC::sec",
112 "GNSS1::UTC::ms",
113 "GNSS1::Tow [ns]",
114 "GNSS1::Week",
115 "GNSS1::NumSats",
116 "GNSS1::Fix",
117 "GNSS1::PosLla::latitude [deg]",
118 "GNSS1::PosLla::longitude [deg]",
119 "GNSS1::PosLla::altitude [m]",
120 "GNSS1::PosEcef::X [m]",
121 "GNSS1::PosEcef::Y [m]",
122 "GNSS1::PosEcef::Z [m]",
123 "GNSS1::VelNed::N [m/s]",
124 "GNSS1::VelNed::E [m/s]",
125 "GNSS1::VelNed::D [m/s]",
126 "GNSS1::VelEcef::X [m/s]",
127 "GNSS1::VelEcef::Y [m/s]",
128 "GNSS1::VelEcef::Z [m/s]",
129 "GNSS1::PosU::N [m]",
130 "GNSS1::PosU::E [m]",
131 "GNSS1::PosU::D [m]",
132 "GNSS1::VelU [m/s]",
133 "GNSS1::TimeU [s]",
134 "GNSS1::TimeInfo::Status::timeOk",
135 "GNSS1::TimeInfo::Status::dateOk",
136 "GNSS1::TimeInfo::Status::utcTimeValid",
137 "GNSS1::TimeInfo::LeapSeconds",
138 "GNSS1::DOP::g",
139 "GNSS1::DOP::p",
140 "GNSS1::DOP::t",
141 "GNSS1::DOP::v",
142 "GNSS1::DOP::h",
143 "GNSS1::DOP::n",
144 "GNSS1::DOP::e",
145 "GNSS1::SatInfo::NumSats",
146 "GNSS1::RawMeas::Tow [s]",
147 "GNSS1::RawMeas::Week",
148 "GNSS1::RawMeas::NumSats",
149 // Group 5 (Attitude)
150 "Att::VpeStatus::AttitudeQuality",
151 "Att::VpeStatus::GyroSaturation",
152 "Att::VpeStatus::GyroSaturationRecovery",
153 "Att::VpeStatus::MagDisturbance",
154 "Att::VpeStatus::MagSaturation",
155 "Att::VpeStatus::AccDisturbance",
156 "Att::VpeStatus::AccSaturation",
157 "Att::VpeStatus::KnownMagDisturbance",
158 "Att::VpeStatus::KnownAccelDisturbance",
159 "Att::YawPitchRoll::Y [deg]",
160 "Att::YawPitchRoll::P [deg]",
161 "Att::YawPitchRoll::R [deg]",
162 "Att::Quaternion::w",
163 "Att::Quaternion::x",
164 "Att::Quaternion::y",
165 "Att::Quaternion::z",
166 "Att::DCM::0-0",
167 "Att::DCM::0-1",
168 "Att::DCM::0-2",
169 "Att::DCM::1-0",
170 "Att::DCM::1-1",
171 "Att::DCM::1-2",
172 "Att::DCM::2-0",
173 "Att::DCM::2-1",
174 "Att::DCM::2-2",
175 "Att::MagNed::N [Gauss]",
176 "Att::MagNed::E [Gauss]",
177 "Att::MagNed::D [Gauss]",
178 "Att::AccelNed::N [m/s^2]",
179 "Att::AccelNed::E [m/s^2]",
180 "Att::AccelNed::D [m/s^2]",
181 "Att::LinearAccelBody::X [m/s^2]",
182 "Att::LinearAccelBody::Y [m/s^2]",
183 "Att::LinearAccelBody::Z [m/s^2]",
184 "Att::LinearAccelNed::N [m/s^2]",
185 "Att::LinearAccelNed::E [m/s^2]",
186 "Att::LinearAccelNed::D [m/s^2]",
187 "Att::YprU::Y [deg]",
188 "Att::YprU::P [deg]",
189 "Att::YprU::R [deg]",
190 // Group 6 (INS)
191 "INS::InsStatus::Mode",
192 "INS::InsStatus::GpsFix",
193 "INS::InsStatus::Error::IMU",
194 "INS::InsStatus::Error::MagPres",
195 "INS::InsStatus::Error::GNSS",
196 "INS::InsStatus::GpsHeadingIns",
197 "INS::InsStatus::GpsCompass",
198 "INS::PosLla::latitude [deg]",
199 "INS::PosLla::longitude [deg]",
200 "INS::PosLla::altitude [m]",
201 "INS::PosEcef::X [m]",
202 "INS::PosEcef::Y [m]",
203 "INS::PosEcef::Z [m]",
204 "INS::VelBody::X [m/s]",
205 "INS::VelBody::Y [m/s]",
206 "INS::VelBody::Z [m/s]",
207 "INS::VelNed::N [m/s]",
208 "INS::VelNed::E [m/s]",
209 "INS::VelNed::D [m/s]",
210 "INS::VelEcef::X [m/s]",
211 "INS::VelEcef::Y [m/s]",
212 "INS::VelEcef::Z [m/s]",
213 "INS::MagEcef::X [Gauss}",
214 "INS::MagEcef::Y [Gauss}",
215 "INS::MagEcef::Z [Gauss}",
216 "INS::AccelEcef::X [m/s^2]",
217 "INS::AccelEcef::Y [m/s^2]",
218 "INS::AccelEcef::Z [m/s^2]",
219 "INS::LinearAccelEcef::X [m/s^2]",
220 "INS::LinearAccelEcef::Y [m/s^2]",
221 "INS::LinearAccelEcef::Z [m/s^2]",
222 "INS::PosU [m]",
223 "INS::VelU [m/s]",
224 // Group 7 (GNSS2)
225 "GNSS2::UTC::year",
226 "GNSS2::UTC::month",
227 "GNSS2::UTC::day",
228 "GNSS2::UTC::hour",
229 "GNSS2::UTC::min",
230 "GNSS2::UTC::sec",
231 "GNSS2::UTC::ms",
232 "GNSS2::Tow [ns]",
233 "GNSS2::Week",
234 "GNSS2::NumSats",
235 "GNSS2::Fix",
236 "GNSS2::PosLla::latitude [deg]",
237 "GNSS2::PosLla::longitude [deg]",
238 "GNSS2::PosLla::altitude [m]",
239 "GNSS2::PosEcef::X [m]",
240 "GNSS2::PosEcef::Y [m]",
241 "GNSS2::PosEcef::Z [m]",
242 "GNSS2::VelNed::N [m/s]",
243 "GNSS2::VelNed::E [m/s]",
244 "GNSS2::VelNed::D [m/s]",
245 "GNSS2::VelEcef::X [m/s]",
246 "GNSS2::VelEcef::Y [m/s]",
247 "GNSS2::VelEcef::Z [m/s]",
248 "GNSS2::PosU::N [m]",
249 "GNSS2::PosU::E [m]",
250 "GNSS2::PosU::D [m]",
251 "GNSS2::VelU [m/s]",
252 "GNSS2::TimeU [s]",
253 "GNSS2::TimeInfo::Status::timeOk",
254 "GNSS2::TimeInfo::Status::dateOk",
255 "GNSS2::TimeInfo::Status::utcTimeValid",
256 "GNSS2::TimeInfo::LeapSeconds",
257 "GNSS2::DOP::g",
258 "GNSS2::DOP::p",
259 "GNSS2::DOP::t",
260 "GNSS2::DOP::v",
261 "GNSS2::DOP::h",
262 "GNSS2::DOP::n",
263 "GNSS2::DOP::e",
264 "GNSS2::SatInfo::NumSats",
265 "GNSS2::RawMeas::Tow [s]",
266 "GNSS2::RawMeas::Week",
267 "GNSS2::RawMeas::NumSats",
268 };
269 }
270
272 [[nodiscard]] static constexpr size_t GetStaticDescriptorCount() { return 205; }
273
275 [[nodiscard]] std::vector<std::string> staticDataDescriptors() const override { return GetStaticDataDescriptors(); }
276
278 [[nodiscard]] size_t staticDescriptorCount() const override { return GetStaticDescriptorCount(); }
279
283 [[nodiscard]] std::optional<double> getValueAt(size_t idx) const override
284 {
286 switch (idx)
287 {
288 // Group 2 (Time)
289 case 0: // Time::TimeStartup [ns]
290 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTARTUP)) { return static_cast<double>(timeOutputs->timeStartup); }
291 break;
292 case 1: // Time::TimeGps [ns]
293 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPS)) { return static_cast<double>(timeOutputs->timeGps); }
294 break;
295 case 2: // Time::GpsTow [ns]
296 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)) { return static_cast<double>(timeOutputs->gpsTow); }
297 break;
298 case 3: // Time::GpsWeek
299 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK)) { return static_cast<double>(timeOutputs->gpsWeek); }
300 break;
301 case 4: // Time::TimeSyncIn [ns]
302 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESYNCIN)) { return static_cast<double>(timeOutputs->timeSyncIn); }
303 break;
304 case 5: // Time::TimeGpsPps [ns]
305 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEGPSPPS)) { return static_cast<double>(timeOutputs->timePPS); }
306 break;
307 case 6: // Time::TimeUTC::year
308 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.year); }
309 break;
310 case 7: // Time::TimeUTC::month
311 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.month); }
312 break;
313 case 8: // Time::TimeUTC::day
314 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.day); }
315 break;
316 case 9: // Time::TimeUTC::hour
317 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.hour); }
318 break;
319 case 10: // Time::TimeUTC::min
320 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.min); }
321 break;
322 case 11: // Time::TimeUTC::sec
323 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.sec); }
324 break;
325 case 12: // Time::TimeUTC::ms
326 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMEUTC)) { return static_cast<double>(timeOutputs->timeUtc.ms); }
327 break;
328 case 13: // Time::SyncInCnt
329 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCINCNT)) { return static_cast<double>(timeOutputs->syncInCnt); }
330 break;
331 case 14: // Time::SyncOutCnt
332 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_SYNCOUTCNT)) { return static_cast<double>(timeOutputs->syncOutCnt); }
333 break;
334 case 15: // Time::TimeStatus::timeOk
335 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)) { return static_cast<double>(timeOutputs->timeStatus.timeOk()); }
336 break;
337 case 16: // Time::TimeStatus::dateOk
338 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)) { return static_cast<double>(timeOutputs->timeStatus.dateOk()); }
339 break;
340 case 17: // Time::TimeStatus::utcTimeValid
341 if (timeOutputs && (timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)) { return static_cast<double>(timeOutputs->timeStatus.utcTimeValid()); }
342 break;
343 // Group 3 (IMU)
344 case 18: // IMU::ImuStatus
345 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_IMUSTATUS)) { return static_cast<double>(imuOutputs->imuStatus); }
346 break;
347 case 19: // IMU::UncompMag::X [Gauss]
348 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)) { return static_cast<double>(imuOutputs->uncompMag(0)); }
349 break;
350 case 20: // IMU::UncompMag::Y [Gauss]
351 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)) { return static_cast<double>(imuOutputs->uncompMag(1)); }
352 break;
353 case 21: // IMU::UncompMag::Z [Gauss]
354 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)) { return static_cast<double>(imuOutputs->uncompMag(2)); }
355 break;
356 case 22: // IMU::UncompAccel::X [m/s^2]
357 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)) { return static_cast<double>(imuOutputs->uncompAccel(0)); }
358 break;
359 case 23: // IMU::UncompAccel::Y [m/s^2]
360 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)) { return static_cast<double>(imuOutputs->uncompAccel(1)); }
361 break;
362 case 24: // IMU::UncompAccel::Z [m/s^2]
363 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)) { return static_cast<double>(imuOutputs->uncompAccel(2)); }
364 break;
365 case 25: // IMU::UncompGyro::X [rad/s]
366 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)) { return static_cast<double>(imuOutputs->uncompGyro(0)); }
367 break;
368 case 26: // IMU::UncompGyro::Y [rad/s]
369 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)) { return static_cast<double>(imuOutputs->uncompGyro(1)); }
370 break;
371 case 27: // IMU::UncompGyro::Z [rad/s]
372 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)) { return static_cast<double>(imuOutputs->uncompGyro(2)); }
373 break;
374 case 28: // IMU::Temp [Celsius]
375 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)) { return static_cast<double>(imuOutputs->temp); }
376 break;
377 case 29: // IMU::Pres [kPa]
378 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_PRES)) { return static_cast<double>(imuOutputs->pres); }
379 break;
380 case 30: // IMU::DeltaTime [s]
381 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)) { return static_cast<double>(imuOutputs->deltaTime); }
382 break;
383 case 31: // IMU::DeltaTheta::X [deg]
384 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)) { return static_cast<double>(imuOutputs->deltaTheta(0)); }
385 break;
386 case 32: // IMU::DeltaTheta::Y [deg]
387 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)) { return static_cast<double>(imuOutputs->deltaTheta(1)); }
388 break;
389 case 33: // IMU::DeltaTheta::Z [deg]
390 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)) { return static_cast<double>(imuOutputs->deltaTheta(2)); }
391 break;
392 case 34: // IMU::DeltaVel::X [m/s]
393 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)) { return static_cast<double>(imuOutputs->deltaV(0)); }
394 break;
395 case 35: // IMU::DeltaVel::Y [m/s]
396 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)) { return static_cast<double>(imuOutputs->deltaV(1)); }
397 break;
398 case 36: // IMU::DeltaVel::Z [m/s]
399 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)) { return static_cast<double>(imuOutputs->deltaV(2)); }
400 break;
401 case 37: // IMU::Mag::X [Gauss]
402 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)) { return static_cast<double>(imuOutputs->mag(0)); }
403 break;
404 case 38: // IMU::Mag::Y [Gauss]
405 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)) { return static_cast<double>(imuOutputs->mag(1)); }
406 break;
407 case 39: // IMU::Mag::Z [Gauss]
408 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)) { return static_cast<double>(imuOutputs->mag(2)); }
409 break;
410 case 40: // IMU::Accel::X [m/s^2]
411 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)) { return static_cast<double>(imuOutputs->accel(0)); }
412 break;
413 case 41: // IMU::Accel::Y [m/s^2]
414 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)) { return static_cast<double>(imuOutputs->accel(1)); }
415 break;
416 case 42: // IMU::Accel::Z [m/s^2]
417 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)) { return static_cast<double>(imuOutputs->accel(2)); }
418 break;
419 case 43: // IMU::AngularRate::X [rad/s]
420 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)) { return static_cast<double>(imuOutputs->angularRate(0)); }
421 break;
422 case 44: // IMU::AngularRate::Y [rad/s]
423 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)) { return static_cast<double>(imuOutputs->angularRate(1)); }
424 break;
425 case 45: // IMU::AngularRate::Z [rad/s]
426 if (imuOutputs && (imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)) { return static_cast<double>(imuOutputs->angularRate(2)); }
427 break;
428 // Group 4 (GNSS1)
429 case 46: // GNSS1::UTC::year
430 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.year); }
431 break;
432 case 47: // GNSS1::UTC::month
433 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.month); }
434 break;
435 case 48: // GNSS1::UTC::day
436 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.day); }
437 break;
438 case 49: // GNSS1::UTC::hour
439 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.hour); }
440 break;
441 case 50: // GNSS1::UTC::min
442 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.min); }
443 break;
444 case 51: // GNSS1::UTC::sec
445 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.sec); }
446 break;
447 case 52: // GNSS1::UTC::ms
448 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss1Outputs->timeUtc.ms); }
449 break;
450 case 53: // GNSS1::Tow [ns]
451 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)) { return static_cast<double>(gnss1Outputs->tow); }
452 break;
453 case 54: // GNSS1::Week
454 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)) { return static_cast<double>(gnss1Outputs->week); }
455 break;
456 case 55: // GNSS1::NumSats
457 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)) { return static_cast<double>(gnss1Outputs->numSats); }
458 break;
459 case 56: // GNSS1::Fix
460 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)) { return static_cast<double>(gnss1Outputs->fix); }
461 break;
462 case 57: // GNSS1::PosLla::latitude [deg]
463 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss1Outputs->posLla(0); }
464 break;
465 case 58: // GNSS1::PosLla::longitude [deg]
466 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss1Outputs->posLla(1); }
467 break;
468 case 59: // GNSS1::PosLla::altitude [m]
469 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss1Outputs->posLla(2); }
470 break;
471 case 60: // GNSS1::PosEcef::X [m]
472 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss1Outputs->posEcef(0); }
473 break;
474 case 61: // GNSS1::PosEcef::Y [m]
475 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss1Outputs->posEcef(1); }
476 break;
477 case 62: // GNSS1::PosEcef::Z [m]
478 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss1Outputs->posEcef(2); }
479 break;
480 case 63: // GNSS1::VelNed::N [m/s]
481 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss1Outputs->velNed(0)); }
482 break;
483 case 64: // GNSS1::VelNed::E [m/s]
484 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss1Outputs->velNed(1)); }
485 break;
486 case 65: // GNSS1::VelNed::D [m/s]
487 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss1Outputs->velNed(2)); }
488 break;
489 case 66: // GNSS1::VelEcef::X [m/s]
490 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss1Outputs->velEcef(0)); }
491 break;
492 case 67: // GNSS1::VelEcef::Y [m/s]
493 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss1Outputs->velEcef(1)); }
494 break;
495 case 68: // GNSS1::VelEcef::Z [m/s]
496 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss1Outputs->velEcef(2)); }
497 break;
498 case 69: // GNSS1::PosU::N [m]
499 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss1Outputs->posU(0)); }
500 break;
501 case 70: // GNSS1::PosU::E [m]
502 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss1Outputs->posU(1)); }
503 break;
504 case 71: // GNSS1::PosU::D [m]
505 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss1Outputs->posU(2)); }
506 break;
507 case 72: // GNSS1::VelU [m/s]
508 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)) { return static_cast<double>(gnss1Outputs->velU); }
509 break;
510 case 73: // GNSS1::TimeU [s]
511 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)) { return static_cast<double>(gnss1Outputs->timeU); }
512 break;
513 case 74: // GNSS1::TimeInfo::Status::timeOk
514 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss1Outputs->timeInfo.status.timeOk()); }
515 break;
516 case 75: // GNSS1::TimeInfo::Status::dateOk
517 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss1Outputs->timeInfo.status.dateOk()); }
518 break;
519 case 76: // GNSS1::TimeInfo::Status::utcTimeValid
520 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss1Outputs->timeInfo.status.utcTimeValid()); }
521 break;
522 case 77: // GNSS1::TimeInfo::LeapSeconds
523 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss1Outputs->timeInfo.leapSeconds); }
524 break;
525 case 78: // GNSS1::DOP::g
526 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.gDop); }
527 break;
528 case 79: // GNSS1::DOP::p
529 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.pDop); }
530 break;
531 case 80: // GNSS1::DOP::t
532 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.tDop); }
533 break;
534 case 81: // GNSS1::DOP::v
535 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.vDop); }
536 break;
537 case 82: // GNSS1::DOP::h
538 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.hDop); }
539 break;
540 case 83: // GNSS1::DOP::n
541 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.nDop); }
542 break;
543 case 84: // GNSS1::DOP::e
544 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss1Outputs->dop.eDop); }
545 break;
546 case 85: // GNSS1::SatInfo::NumSats
547 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)) { return static_cast<double>(gnss1Outputs->satInfo.numSats); }
548 break;
549 case 86: // GNSS1::RawMeas::Tow [s]
550 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return gnss1Outputs->raw.tow; }
551 break;
552 case 87: // GNSS1::RawMeas::Week
553 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return static_cast<double>(gnss1Outputs->raw.week); }
554 break;
555 case 88: // GNSS1::RawMeas::NumSats
556 if (gnss1Outputs && (gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return static_cast<double>(gnss1Outputs->raw.numSats); }
557 break;
558 // Group 5 (Attitude)
559 case 89: // Att::VpeStatus::AttitudeQuality
560 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.attitudeQuality()); }
561 break;
562 case 90: // Att::VpeStatus::GyroSaturation
563 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.gyroSaturation()); }
564 break;
565 case 91: // Att::VpeStatus::GyroSaturationRecovery
566 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.gyroSaturationRecovery()); }
567 break;
568 case 92: // Att::VpeStatus::MagDisturbance
569 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.magDisturbance()); }
570 break;
571 case 93: // Att::VpeStatus::MagSaturation
572 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.magSaturation()); }
573 break;
574 case 94: // Att::VpeStatus::AccDisturbance
575 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.accDisturbance()); }
576 break;
577 case 95: // Att::VpeStatus::AccSaturation
578 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.accSaturation()); }
579 break;
580 case 96: // Att::VpeStatus::KnownMagDisturbance
581 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.knownMagDisturbance()); }
582 break;
583 case 97: // Att::VpeStatus::KnownAccelDisturbance
584 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_VPESTATUS)) { return static_cast<double>(attitudeOutputs->vpeStatus.knownAccelDisturbance()); }
585 break;
586 case 98: // Att::YawPitchRoll::Y [deg]
587 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)) { return static_cast<double>(attitudeOutputs->ypr(0)); }
588 break;
589 case 99: // Att::YawPitchRoll::P [deg]
590 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)) { return static_cast<double>(attitudeOutputs->ypr(1)); }
591 break;
592 case 100: // Att::YawPitchRoll::R [deg]
593 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)) { return static_cast<double>(attitudeOutputs->ypr(2)); }
594 break;
595 case 101: // Att::Quaternion::w
596 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)) { return static_cast<double>(attitudeOutputs->qtn.w()); }
597 break;
598 case 102: // Att::Quaternion::x
599 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)) { return static_cast<double>(attitudeOutputs->qtn.x()); }
600 break;
601 case 103: // Att::Quaternion::y
602 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)) { return static_cast<double>(attitudeOutputs->qtn.y()); }
603 break;
604 case 104: // Att::Quaternion::z
605 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)) { return static_cast<double>(attitudeOutputs->qtn.z()); }
606 break;
607 case 105: // Att::DCM::0-0
608 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(0, 0)); }
609 break;
610 case 106: // Att::DCM::0-1
611 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(0, 1)); }
612 break;
613 case 107: // Att::DCM::0-2
614 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(0, 2)); }
615 break;
616 case 108: // Att::DCM::1-0
617 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(1, 0)); }
618 break;
619 case 109: // Att::DCM::1-1
620 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(1, 1)); }
621 break;
622 case 110: // Att::DCM::1-2
623 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(1, 2)); }
624 break;
625 case 111: // Att::DCM::2-0
626 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(2, 0)); }
627 break;
628 case 112: // Att::DCM::2-1
629 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(2, 1)); }
630 break;
631 case 113: // Att::DCM::2-2
632 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)) { return static_cast<double>(attitudeOutputs->dcm(2, 2)); }
633 break;
634 case 114: // Att::MagNed::N [Gauss]
635 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)) { return static_cast<double>(attitudeOutputs->magNed(0)); }
636 break;
637 case 115: // Att::MagNed::E [Gauss]
638 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)) { return static_cast<double>(attitudeOutputs->magNed(1)); }
639 break;
640 case 116: // Att::MagNed::D [Gauss]
641 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_MAGNED)) { return static_cast<double>(attitudeOutputs->magNed(2)); }
642 break;
643 case 117: // Att::AccelNed::N [m/s^2]
644 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)) { return static_cast<double>(attitudeOutputs->accelNed(0)); }
645 break;
646 case 118: // Att::AccelNed::E [m/s^2]
647 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)) { return static_cast<double>(attitudeOutputs->accelNed(1)); }
648 break;
649 case 119: // Att::AccelNed::D [m/s^2]
650 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_ACCELNED)) { return static_cast<double>(attitudeOutputs->accelNed(2)); }
651 break;
652 case 120: // Att::LinearAccelBody::X [m/s^2]
653 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)) { return static_cast<double>(attitudeOutputs->linearAccelBody(0)); }
654 break;
655 case 121: // Att::LinearAccelBody::Y [m/s^2]
656 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)) { return static_cast<double>(attitudeOutputs->linearAccelBody(1)); }
657 break;
658 case 122: // Att::LinearAccelBody::Z [m/s^2]
659 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELBODY)) { return static_cast<double>(attitudeOutputs->linearAccelBody(2)); }
660 break;
661 case 123: // Att::LinearAccelNed::N [m/s^2]
662 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)) { return static_cast<double>(attitudeOutputs->linearAccelNed(0)); }
663 break;
664 case 124: // Att::LinearAccelNed::E [m/s^2]
665 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)) { return static_cast<double>(attitudeOutputs->linearAccelNed(1)); }
666 break;
667 case 125: // Att::LinearAccelNed::D [m/s^2]
668 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_LINEARACCELNED)) { return static_cast<double>(attitudeOutputs->linearAccelNed(2)); }
669 break;
670 case 126: // Att::YprU::Y [deg]
671 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)) { return static_cast<double>(attitudeOutputs->yprU(0)); }
672 break;
673 case 127: // Att::YprU::P [deg]
674 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)) { return static_cast<double>(attitudeOutputs->yprU(1)); }
675 break;
676 case 128: // Att::YprU::R [deg]
677 if (attitudeOutputs && (attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YPRU)) { return static_cast<double>(attitudeOutputs->yprU(2)); }
678 break;
679 // Group 6 (INS)
680 case 129: // INS::InsStatus::Mode
681 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.mode()); }
682 break;
683 case 130: // INS::InsStatus::GpsFix
684 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.gpsFix()); }
685 break;
686 case 131: // INS::InsStatus::Error::IMU
687 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.errorIMU()); }
688 break;
689 case 132: // INS::InsStatus::Error::MagPres
690 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.errorMagPres()); }
691 break;
692 case 133: // INS::InsStatus::Error::GNSS
693 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.errorGnss()); }
694 break;
695 case 134: // INS::InsStatus::GpsHeadingIns
696 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.gpsHeadingIns()); }
697 break;
698 case 135: // INS::InsStatus::GpsCompass
699 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_INSSTATUS)) { return static_cast<double>(insOutputs->insStatus.gpsCompass()); }
700 break;
701 case 136: // INS::PosLla::latitude [deg]
702 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)) { return insOutputs->posLla(0); }
703 break;
704 case 137: // INS::PosLla::longitude [deg]
705 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)) { return insOutputs->posLla(1); }
706 break;
707 case 138: // INS::PosLla::altitude [m]
708 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)) { return insOutputs->posLla(2); }
709 break;
710 case 139: // INS::PosEcef::X [m]
711 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)) { return insOutputs->posEcef(0); }
712 break;
713 case 140: // INS::PosEcef::Y [m]
714 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)) { return insOutputs->posEcef(1); }
715 break;
716 case 141: // INS::PosEcef::Z [m]
717 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)) { return insOutputs->posEcef(2); }
718 break;
719 case 142: // INS::VelBody::X [m/s]
720 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)) { return static_cast<double>(insOutputs->velBody(0)); }
721 break;
722 case 143: // INS::VelBody::Y [m/s]
723 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)) { return static_cast<double>(insOutputs->velBody(1)); }
724 break;
725 case 144: // INS::VelBody::Z [m/s]
726 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)) { return static_cast<double>(insOutputs->velBody(2)); }
727 break;
728 case 145: // INS::VelNed::N [m/s]
729 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)) { return static_cast<double>(insOutputs->velNed(0)); }
730 break;
731 case 146: // INS::VelNed::E [m/s]
732 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)) { return static_cast<double>(insOutputs->velNed(1)); }
733 break;
734 case 147: // INS::VelNed::D [m/s]
735 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)) { return static_cast<double>(insOutputs->velNed(2)); }
736 break;
737 case 148: // INS::VelEcef::X [m/s]
738 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)) { return static_cast<double>(insOutputs->velEcef(0)); }
739 break;
740 case 149: // INS::VelEcef::Y [m/s]
741 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)) { return static_cast<double>(insOutputs->velEcef(1)); }
742 break;
743 case 150: // INS::VelEcef::Z [m/s]
744 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)) { return static_cast<double>(insOutputs->velEcef(2)); }
745 break;
746 case 151: // INS::MagEcef::X [Gauss}
747 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)) { return static_cast<double>(insOutputs->magEcef(0)); }
748 break;
749 case 152: // INS::MagEcef::Y [Gauss}
750 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)) { return static_cast<double>(insOutputs->magEcef(1)); }
751 break;
752 case 153: // INS::MagEcef::Z [Gauss}
753 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_MAGECEF)) { return static_cast<double>(insOutputs->magEcef(2)); }
754 break;
755 case 154: // INS::AccelEcef::X [m/s^2]
756 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)) { return static_cast<double>(insOutputs->accelEcef(0)); }
757 break;
758 case 155: // INS::AccelEcef::Y [m/s^2]
759 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)) { return static_cast<double>(insOutputs->accelEcef(1)); }
760 break;
761 case 156: // INS::AccelEcef::Z [m/s^2]
762 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_ACCELECEF)) { return static_cast<double>(insOutputs->accelEcef(2)); }
763 break;
764 case 157: // INS::LinearAccelEcef::X [m/s^2]
765 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)) { return static_cast<double>(insOutputs->linearAccelEcef(0)); }
766 break;
767 case 158: // INS::LinearAccelEcef::Y [m/s^2]
768 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)) { return static_cast<double>(insOutputs->linearAccelEcef(1)); }
769 break;
770 case 159: // INS::LinearAccelEcef::Z [m/s^2]
771 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_LINEARACCELECEF)) { return static_cast<double>(insOutputs->linearAccelEcef(2)); }
772 break;
773 case 160: // INS::PosU [m]
774 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSU)) { return static_cast<double>(insOutputs->posU); }
775 break;
776 case 161: // INS::VelU [m/s]
777 if (insOutputs && (insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELU)) { return static_cast<double>(insOutputs->velU); }
778 break;
779 // Group 7 (GNSS2)
780 case 162: // GNSS2::UTC::year
781 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.year); }
782 break;
783 case 163: // GNSS2::UTC::month
784 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.month); }
785 break;
786 case 164: // GNSS2::UTC::day
787 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.day); }
788 break;
789 case 165: // GNSS2::UTC::hour
790 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.hour); }
791 break;
792 case 166: // GNSS2::UTC::min
793 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.min); }
794 break;
795 case 167: // GNSS2::UTC::sec
796 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.sec); }
797 break;
798 case 168: // GNSS2::UTC::ms
799 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_UTC)) { return static_cast<double>(gnss2Outputs->timeUtc.ms); }
800 break;
801 case 169: // GNSS2::Tow [ns]
802 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TOW)) { return static_cast<double>(gnss2Outputs->tow); }
803 break;
804 case 170: // GNSS2::Week
805 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_WEEK)) { return static_cast<double>(gnss2Outputs->week); }
806 break;
807 case 171: // GNSS2::NumSats
808 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_NUMSATS)) { return static_cast<double>(gnss2Outputs->numSats); }
809 break;
810 case 172: // GNSS2::Fix
811 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_FIX)) { return static_cast<double>(gnss2Outputs->fix); }
812 break;
813 case 173: // GNSS2::PosLla::latitude [deg]
814 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss2Outputs->posLla(0); }
815 break;
816 case 174: // GNSS2::PosLla::longitude [deg]
817 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss2Outputs->posLla(1); }
818 break;
819 case 175: // GNSS2::PosLla::altitude [m]
820 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)) { return gnss2Outputs->posLla(2); }
821 break;
822 case 176: // GNSS2::PosEcef::X [m]
823 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss2Outputs->posEcef(0); }
824 break;
825 case 177: // GNSS2::PosEcef::Y [m]
826 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss2Outputs->posEcef(1); }
827 break;
828 case 178: // GNSS2::PosEcef::Z [m]
829 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)) { return gnss2Outputs->posEcef(2); }
830 break;
831 case 179: // GNSS2::VelNed::N [m/s]
832 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss2Outputs->velNed(0)); }
833 break;
834 case 180: // GNSS2::VelNed::E [m/s]
835 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss2Outputs->velNed(1)); }
836 break;
837 case 181: // GNSS2::VelNed::D [m/s]
838 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)) { return static_cast<double>(gnss2Outputs->velNed(2)); }
839 break;
840 case 182: // GNSS2::VelEcef::X [m/s]
841 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss2Outputs->velEcef(0)); }
842 break;
843 case 183: // GNSS2::VelEcef::Y [m/s]
844 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss2Outputs->velEcef(1)); }
845 break;
846 case 184: // GNSS2::VelEcef::Z [m/s]
847 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)) { return static_cast<double>(gnss2Outputs->velEcef(2)); }
848 break;
849 case 185: // GNSS2::PosU::N [m]
850 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss2Outputs->posU(0)); }
851 break;
852 case 186: // GNSS2::PosU::E [m]
853 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss2Outputs->posU(1)); }
854 break;
855 case 187: // GNSS2::PosU::D [m]
856 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSU)) { return static_cast<double>(gnss2Outputs->posU(2)); }
857 break;
858 case 188: // GNSS2::VelU [m/s]
859 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELU)) { return static_cast<double>(gnss2Outputs->velU); }
860 break;
861 case 189: // GNSS2::TimeU [s]
862 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEU)) { return static_cast<double>(gnss2Outputs->timeU); }
863 break;
864 case 190: // GNSS2::TimeInfo::Status::timeOk
865 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss2Outputs->timeInfo.status.timeOk()); }
866 break;
867 case 191: // GNSS2::TimeInfo::Status::dateOk
868 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss2Outputs->timeInfo.status.dateOk()); }
869 break;
870 case 192: // GNSS2::TimeInfo::Status::utcTimeValid
871 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss2Outputs->timeInfo.status.utcTimeValid()); }
872 break;
873 case 193: // GNSS2::TimeInfo::LeapSeconds
874 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_TIMEINFO)) { return static_cast<double>(gnss2Outputs->timeInfo.leapSeconds); }
875 break;
876 case 194: // GNSS2::DOP::g
877 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.gDop); }
878 break;
879 case 195: // GNSS2::DOP::p
880 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.pDop); }
881 break;
882 case 196: // GNSS2::DOP::t
883 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.tDop); }
884 break;
885 case 197: // GNSS2::DOP::v
886 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.vDop); }
887 break;
888 case 198: // GNSS2::DOP::h
889 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.hDop); }
890 break;
891 case 199: // GNSS2::DOP::n
892 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.nDop); }
893 break;
894 case 200: // GNSS2::DOP::e
895 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_DOP)) { return static_cast<double>(gnss2Outputs->dop.eDop); }
896 break;
897 case 201: // GNSS2::SatInfo::NumSats
898 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_SATINFO)) { return static_cast<double>(gnss2Outputs->satInfo.numSats); }
899 break;
900 case 202: // GNSS2::RawMeas::Tow [s]
901 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return gnss2Outputs->raw.tow; }
902 break;
903 case 203: // GNSS2::RawMeas::Week
904 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return static_cast<double>(gnss2Outputs->raw.week); }
905 break;
906 case 204: // GNSS2::RawMeas::NumSats
907 if (gnss2Outputs && (gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)) { return static_cast<double>(gnss2Outputs->raw.numSats); }
908 break;
909 default:
910 return std::nullopt;
911 }
912 return std::nullopt;
913 }
914
916 std::shared_ptr<vendor::vectornav::TimeOutputs> timeOutputs = nullptr;
917
919 std::shared_ptr<vendor::vectornav::ImuOutputs> imuOutputs = nullptr;
920
922 std::shared_ptr<vendor::vectornav::GnssOutputs> gnss1Outputs = nullptr;
923
925 std::shared_ptr<vendor::vectornav::AttitudeOutputs> attitudeOutputs = nullptr;
926
928 std::shared_ptr<vendor::vectornav::InsOutputs> insOutputs = nullptr;
929
931 std::shared_ptr<vendor::vectornav::GnssOutputs> gnss2Outputs = nullptr;
932
935};
936
937} // namespace NAV
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
Vector space operations.
Imu Position Data.
Abstract NodeData Class.
Binary Group 5 – Attitude Outputs.
IMU Position.
Definition ImuPos.hpp:26
Parent class for all data transmitted over Flow pins.
Definition NodeData.hpp:27
static std::string type()
Returns the type of the data class.
Definition NodeData.hpp:44
IMU Observation storage class.
Definition VectorNavBinaryOutput.hpp:32
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition VectorNavBinaryOutput.hpp:283
std::shared_ptr< vendor::vectornav::TimeOutputs > timeOutputs
Binary Group 2 – Time Outputs.
Definition VectorNavBinaryOutput.hpp:916
VectorNavBinaryOutput(const ImuPos &imuPos)
Constructor.
Definition VectorNavBinaryOutput.hpp:36
std::shared_ptr< vendor::vectornav::ImuOutputs > imuOutputs
Binary Group 3 – IMU Outputs.
Definition VectorNavBinaryOutput.hpp:919
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition VectorNavBinaryOutput.hpp:272
std::shared_ptr< vendor::vectornav::InsOutputs > insOutputs
Binary Group 6 – INS Outputs.
Definition VectorNavBinaryOutput.hpp:928
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition VectorNavBinaryOutput.hpp:54
static std::string type()
Returns the type of the data class.
Definition VectorNavBinaryOutput.hpp:41
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition VectorNavBinaryOutput.hpp:48
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition VectorNavBinaryOutput.hpp:275
const ImuPos & imuPos
Position and rotation information for conversion from platform to body frame.
Definition VectorNavBinaryOutput.hpp:934
std::shared_ptr< vendor::vectornav::GnssOutputs > gnss2Outputs
Binary Group 7 – GNSS2 Outputs.
Definition VectorNavBinaryOutput.hpp:931
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition VectorNavBinaryOutput.hpp:278
std::shared_ptr< vendor::vectornav::GnssOutputs > gnss1Outputs
Binary Group 4 – GNSS1 Outputs.
Definition VectorNavBinaryOutput.hpp:922
std::shared_ptr< vendor::vectornav::AttitudeOutputs > attitudeOutputs
Binary Group 5 – Attitude Outputs.
Definition VectorNavBinaryOutput.hpp:925