0.3.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
VectorNavTypes.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// VectorNav library includes <winsock2.h>, but <boost/asio.hpp> needs to be included before (even though not used in this file)
17// https://stackoverflow.com/questions/9750344/boostasio-winsock-and-winsock-2-compatibility-issue
18#ifdef _WIN32
19 // Set the proper SDK version before including boost/Asio
20 #include <SDKDDKVer.h>
21 // Note boost/ASIO includes Windows.h.
22 #include <boost/asio.hpp>
23#endif //_WIN32
24
25#include <cstdint>
26#include <vector>
27#include <iostream>
28#include <fmt/format.h>
29#include <fmt/ostream.h>
30#include <vn/vector.h>
31#include <vn/matrix.h>
32#include <vn/types.h>
33
34namespace NAV::vendor::vectornav
35{
43{
44 public:
47 explicit TimeStatus(uint8_t status) : _status(status) {}
48
51 TimeStatus& operator=(const uint8_t& status)
52 {
54 return *this;
55 }
56
58 TimeStatus() = default;
59
61 [[nodiscard]] constexpr uint8_t& status()
62 {
63 return _status;
64 }
65
67 [[nodiscard]] constexpr uint8_t timeOk() const
68 {
69 return ((_status & (1U << 0U)) >> 0U);
70 }
72 [[nodiscard]] constexpr uint8_t dateOk() const
73 {
74 return ((_status & (1U << 1U)) >> 1U); // NOLINT
75 }
77 [[nodiscard]] constexpr uint8_t utcTimeValid() const
78 {
79 return ((_status & (1U << 2U)) >> 2U); // NOLINT
80 }
81
82 private:
84 uint8_t _status;
85};
86
88struct UTC
89{
90 int8_t year{};
91 uint8_t month{};
92 uint8_t day{};
93 uint8_t hour{};
94 uint8_t min{};
95 uint8_t sec{};
96 uint16_t ms{};
97};
98
110
113{
125 int8_t leapSeconds{};
126};
127
129struct DOP
130{
131 float gDop{};
132 float pDop{};
133 float tDop{};
134 float vDop{};
135 float hDop{};
136 float nDop{};
137 float eDop{};
138};
139
141enum class SatSys : uint8_t
142{
143 GPS = 0,
144 SBAS = 1,
145 Galileo = 2,
146 BeiDou = 3,
147 IMES = 4,
148 QZSS = 5,
149 GLONASS = 6,
150};
151
156std::ostream& operator<<(std::ostream& os, const SatSys& satSys);
157
165{
168 {
170 enum class Flags : uint8_t
171 {
172 None = 0,
173 Healthy = 1 << 0,
174 Almanac = 1 << 1,
175 Ephemeris = 1 << 2,
176 DifferentialCorrection = 1 << 3,
177 UsedForNavigation = 1 << 4,
178 AzimuthElevationValid = 1 << 5,
179 UsedForRTK = 1 << 6,
180 };
181
186 friend Flags operator|(Flags lhs, Flags rhs)
187 {
188 return Flags(int(lhs) | int(rhs));
189 }
190
203
205 SatInfoElement() = default;
206
215 SatInfoElement(uint8_t sys, uint8_t svId, uint8_t flags, uint8_t cno, uint8_t qi, int8_t el, int16_t az)
216 : sys(static_cast<SatSys>(sys)), svId(svId), flags(static_cast<Flags>(flags)), cno(cno), qi(static_cast<QualityIndicator>(qi)), el(el), az(az) {}
217
232 SatInfoElement(uint8_t sys, uint8_t svId,
233 uint8_t healthy, uint8_t almanac, uint8_t ephemeris, uint8_t differentialCorrection, uint8_t usedForNavigation, uint8_t azimuthElevationValid, uint8_t usedForRTK,
234 uint8_t cno, uint8_t qi, int8_t el, int16_t az)
235 : sys(static_cast<SatSys>(sys)), svId(svId), flags((healthy ? Flags::Healthy : Flags::None) | (almanac ? Flags::Almanac : Flags::None) | (ephemeris ? Flags::Ephemeris : Flags::None) | (differentialCorrection ? Flags::DifferentialCorrection : Flags::None) | (usedForNavigation ? Flags::UsedForNavigation : Flags::None) | (azimuthElevationValid ? Flags::AzimuthElevationValid : Flags::None) | (usedForRTK ? Flags::UsedForRTK : Flags::None)), cno(cno), qi(static_cast<QualityIndicator>(qi)), el(el), az(az) {}
236
238 uint8_t svId{};
240 uint8_t cno{};
242 int8_t el{};
243 int16_t az{};
244 };
245
247 uint8_t numSats{};
249 std::vector<SatInfoElement> satellites;
250};
251
261
264{
267 {
269 enum class Flags : uint16_t
270 {
271 None = 0,
272 Searching = 1 << 0,
273 Tracking = 1 << 1,
274 TimeValid = 1 << 2,
275 CodeLock = 1 << 3,
276 PhaseLock = 1 << 4,
277 PhaseHalfAmbiguity = 1 << 5,
278 PhaseHalfSub = 1 << 6,
279 PhaseSlip = 1 << 7,
280 PseudorangeSmoothed = 1 << 8,
281 };
282
287 friend Flags operator|(Flags lhs, Flags rhs)
288 {
289 return Flags(int(lhs) | int(rhs));
290 }
291
293 enum class Chan : uint8_t
294 {
295 P_Code = 0,
296 CA_Code = 1,
297 SemiCodeless = 2,
298 Y_Code = 3,
299 M_Code = 4,
300 Codeless = 5,
301 A_Chan = 6,
302 B_Chan = 7,
303 I_Chan = 8,
304 Q_Chan = 9,
305 M_Chan = 10,
306 L_Chan = 11,
307 BC_Chan = 12,
308 Z_Tracking = 13,
309 ABC = 14,
310 };
311
316 friend std::ostream& operator<<(std::ostream& os, const Chan& chan)
317 {
318 switch (chan)
319 {
320 case Chan::P_Code:
321 os << "P-Code";
322 break;
323 case Chan::CA_Code:
324 os << "C/A-Code or C-Chan";
325 break;
327 os << "Semi-codeless";
328 break;
329 case Chan::Y_Code:
330 os << "Y-Code";
331 break;
332 case Chan::M_Code:
333 os << "M-Code";
334 break;
335 case Chan::Codeless:
336 os << "Codeless";
337 break;
338 case Chan::A_Chan:
339 os << "A Chan";
340 break;
341 case Chan::B_Chan:
342 os << "B Chan";
343 break;
344 case Chan::I_Chan:
345 os << "I Chan";
346 break;
347 case Chan::Q_Chan:
348 os << "Q Chan";
349 break;
350 case Chan::M_Chan:
351 os << "M Chan or D Chan";
352 break;
353 case Chan::L_Chan:
354 os << "L Chan or P Chan";
355 break;
356 case Chan::BC_Chan:
357 os << "B+C Chan, I+Q Chan, M+L Chan or D+P Chan";
358 break;
359 case Chan::Z_Tracking:
360 os << "based on Z-tracking";
361 break;
362 case Chan::ABC:
363 os << "A+B+C";
364 break;
365 }
366 return os;
367 }
368
370 enum class Freq : uint8_t
371 {
372 RxChannel = 0,
373 L1 = 1,
374 L2 = 2,
375 L5 = 3,
376 E6 = 4,
377 E5b = 5,
378 E5a = 6,
379 };
380
385 friend std::ostream& operator<<(std::ostream& os, const Freq& freq)
386 {
387 switch (freq)
388 {
389 case Freq::RxChannel:
390 os << "Rx Channel";
391 break;
392 case Freq::L1:
393 os << "L1, G1, E2-L1-E1 or B1";
394 break;
395 case Freq::L2:
396 os << "L2 or G2";
397 break;
398 case Freq::L5:
399 os << "L5 or E5a";
400 break;
401 case Freq::E6:
402 os << "E6, LEX or B3";
403 break;
404 case Freq::E5b:
405 os << "E5b or B2";
406 break;
407 case Freq::E5a:
408 os << "E5a+b";
409 break;
410 }
411 return os;
412 }
413
415 SatRawElement() = default;
416
428 SatRawElement(uint8_t sys, uint8_t svId, uint8_t freq, uint8_t chan, int8_t slot, uint8_t cno, uint16_t flags, double pr, double cp, float dp)
429 : sys(static_cast<SatSys>(sys)), svId(svId), freq(static_cast<Freq>(freq)), chan(static_cast<Chan>(chan)), slot(slot), cno(cno), flags(static_cast<Flags>(flags)), pr(pr), cp(cp), dp(dp) {}
430
450 SatRawElement(uint8_t sys, uint8_t svId, uint8_t freq, uint8_t chan, int8_t slot, uint8_t cno,
451 uint8_t searching, uint8_t tracking, uint8_t timeValid, uint8_t codeLock, uint8_t phaseLock, uint8_t phaseHalfAmbiguity, uint8_t phaseHalfSub, uint8_t phaseSlip, uint8_t pseudorangeSmoothed,
452 double pr, double cp, double dp)
453 : sys(static_cast<SatSys>(sys)), svId(svId), freq(static_cast<Freq>(freq)), chan(static_cast<Chan>(chan)), slot(slot), cno(cno), flags((searching ? Flags::Searching : Flags::None) | (tracking ? Flags::Tracking : Flags::None) | (timeValid ? Flags::TimeValid : Flags::None) | (codeLock ? Flags::CodeLock : Flags::None) | (phaseLock ? Flags::PhaseLock : Flags::None) | (phaseHalfAmbiguity ? Flags::PhaseHalfAmbiguity : Flags::None) | (phaseHalfSub ? Flags::PhaseHalfSub : Flags::None) | (phaseSlip ? Flags::PhaseSlip : Flags::None) | (pseudorangeSmoothed ? Flags::PseudorangeSmoothed : Flags::None)), pr(pr), cp(cp), dp(static_cast<float>(dp)) {}
454
456 uint8_t svId{};
459 int8_t slot{};
460 uint8_t cno{};
462 double pr{};
463 double cp{};
464 float dp{};
465 };
466
468 double tow{};
470 uint16_t week{};
472 uint8_t numSats{};
474 std::vector<SatRawElement> satellites;
475};
476
486
500{
501 public:
504 explicit VpeStatus(uint16_t status) : _status(status) {}
505
508 VpeStatus& operator=(const uint16_t& status)
509 {
510 _status = status;
511 return *this;
512 }
513
515 VpeStatus() = default;
516
518 [[nodiscard]] constexpr uint16_t& status()
519 {
520 return _status;
521 }
522
524 [[nodiscard]] constexpr uint8_t attitudeQuality() const
525 {
526 return ((_status & (1U << 0U | 1U << 1U)) >> 0U);
527 }
529 [[nodiscard]] constexpr uint8_t gyroSaturation() const
530 {
531 return ((_status & (1U << 2U)) >> 2U); // NOLINT
532 }
534 [[nodiscard]] constexpr uint8_t gyroSaturationRecovery() const
535 {
536 return ((_status & (1U << 3U)) >> 3U); // NOLINT
537 }
539 [[nodiscard]] constexpr uint8_t magDisturbance() const
540 {
541 return ((_status & (1U << 4U | 1U << 5U)) >> 4U); // NOLINT
542 }
544 [[nodiscard]] constexpr uint8_t magSaturation() const
545 {
546 return ((_status & (1U << 6U)) >> 6U); // NOLINT
547 }
549 [[nodiscard]] constexpr uint8_t accDisturbance() const
550 {
551 return ((_status & (1U << 7U | 1U << 8U)) >> 7U); // NOLINT
552 }
554 [[nodiscard]] constexpr uint8_t accSaturation() const
555 {
556 return ((_status & (1U << 9U)) >> 9U); // NOLINT
557 }
559 [[nodiscard]] constexpr uint8_t knownMagDisturbance() const
560 {
561 return ((_status & (1U << 11U)) >> 11U); // NOLINT
562 }
564 [[nodiscard]] constexpr uint8_t knownAccelDisturbance() const
565 {
566 return ((_status & (1U << 12U)) >> 12U); // NOLINT
567 }
568
569 private:
571 uint16_t _status;
572};
573
598{
599 public:
601 enum class Mode : uint8_t
602 {
606 NotTracking = 0,
615 Aligning = 1,
619 Tracking = 2,
624 LossOfGNSS = 3,
625 };
626
629 explicit InsStatus(uint16_t status) : _status(status) {}
630
633 InsStatus& operator=(const uint16_t& status)
634 {
635 _status = status;
636 return *this;
637 }
638
640 InsStatus() = default;
641
643 [[nodiscard]] constexpr uint16_t& status()
644 {
645 return _status;
646 }
647
649 [[nodiscard]] constexpr Mode mode() const
650 {
651 return static_cast<Mode>((_status & (1U << 0U | 1U << 1U)) >> 0U);
652 }
654 [[nodiscard]] constexpr bool gpsFix() const
655 {
656 return ((_status & (1U << 2U)) >> 2U); // NOLINT
657 }
659 [[nodiscard]] constexpr bool errorIMU() const
660 {
661 return ((_status & (1U << 4U)) >> 4U); // NOLINT
662 }
664 [[nodiscard]] constexpr bool errorMagPres() const
665 {
666 return ((_status & (1U << 5U)) >> 5U); // NOLINT
667 }
669 [[nodiscard]] constexpr bool errorGnss() const
670 {
671 return ((_status & (1U << 6U)) >> 6U); // NOLINT
672 }
674 [[nodiscard]] constexpr bool gpsHeadingIns() const
675 {
676 return ((_status & (1U << 8U)) >> 8U); // NOLINT
677 }
679 [[nodiscard]] constexpr bool gpsCompass() const
680 {
681 return ((_status & (1U << 9U)) >> 9U); // NOLINT
682 }
683
684 private:
686 uint16_t _status;
687};
688
689} // namespace NAV::vendor::vectornav
690
691#ifndef DOXYGEN_IGNORE
692
693template<>
694struct fmt::formatter<vn::protocol::uart::ErrorDetectionMode> : ostream_formatter
695{};
696template<>
697struct fmt::formatter<vn::protocol::uart::AsciiAsync> : ostream_formatter
698{};
699template<>
700struct fmt::formatter<vn::protocol::uart::AsyncMode> : ostream_formatter
701{};
702template<>
703struct fmt::formatter<vn::protocol::uart::BinaryGroup> : ostream_formatter
704{};
705template<>
706struct fmt::formatter<vn::protocol::uart::CommonGroup> : ostream_formatter
707{};
708template<>
709struct fmt::formatter<vn::protocol::uart::TimeGroup> : ostream_formatter
710{};
711template<>
712struct fmt::formatter<vn::protocol::uart::ImuGroup> : ostream_formatter
713{};
714template<>
715struct fmt::formatter<vn::protocol::uart::GpsGroup> : ostream_formatter
716{};
717template<>
718struct fmt::formatter<vn::protocol::uart::AttitudeGroup> : ostream_formatter
719{};
720template<>
721struct fmt::formatter<vn::protocol::uart::InsGroup> : ostream_formatter
722{};
723template<>
724struct fmt::formatter<vn::protocol::uart::SensorError> : ostream_formatter
725{};
726template<>
727struct fmt::formatter<vn::protocol::uart::BootloaderError> : ostream_formatter
728{};
729template<>
730struct fmt::formatter<vn::protocol::uart::SyncInMode> : ostream_formatter
731{};
732template<>
733struct fmt::formatter<vn::protocol::uart::SyncInEdge> : ostream_formatter
734{};
735template<>
736struct fmt::formatter<vn::protocol::uart::SyncOutMode> : ostream_formatter
737{};
738template<>
739struct fmt::formatter<vn::protocol::uart::SyncOutPolarity> : ostream_formatter
740{};
741template<>
742struct fmt::formatter<vn::protocol::uart::CountMode> : ostream_formatter
743{};
744template<>
745struct fmt::formatter<vn::protocol::uart::StatusMode> : ostream_formatter
746{};
747template<>
748struct fmt::formatter<vn::protocol::uart::ChecksumMode> : ostream_formatter
749{};
750template<>
751struct fmt::formatter<vn::protocol::uart::ErrorMode> : ostream_formatter
752{};
753template<>
754struct fmt::formatter<vn::protocol::uart::FilterMode> : ostream_formatter
755{};
756template<>
757struct fmt::formatter<vn::protocol::uart::IntegrationFrame> : ostream_formatter
758{};
759template<>
760struct fmt::formatter<vn::protocol::uart::CompensationMode> : ostream_formatter
761{};
762template<>
763struct fmt::formatter<vn::protocol::uart::AccCompensationMode> : ostream_formatter
764{};
765template<>
766struct fmt::formatter<vn::protocol::uart::EarthRateCorrection> : ostream_formatter
767{};
768template<>
769struct fmt::formatter<vn::protocol::uart::GpsFix> : ostream_formatter
770{};
771template<>
772struct fmt::formatter<vn::protocol::uart::GpsMode> : ostream_formatter
773{};
774template<>
775struct fmt::formatter<vn::protocol::uart::PpsSource> : ostream_formatter
776{};
777template<>
778struct fmt::formatter<vn::protocol::uart::GpsRate> : ostream_formatter
779{};
780template<>
781struct fmt::formatter<vn::protocol::uart::AntPower> : ostream_formatter
782{};
783template<>
784struct fmt::formatter<vn::protocol::uart::VpeEnable> : ostream_formatter
785{};
786template<>
787struct fmt::formatter<vn::protocol::uart::HeadingMode> : ostream_formatter
788{};
789template<>
790struct fmt::formatter<vn::protocol::uart::VpeMode> : ostream_formatter
791{};
792template<>
793struct fmt::formatter<vn::protocol::uart::Scenario> : ostream_formatter
794{};
795template<>
796struct fmt::formatter<vn::protocol::uart::HsiMode> : ostream_formatter
797{};
798template<>
799struct fmt::formatter<vn::protocol::uart::HsiOutput> : ostream_formatter
800{};
801template<>
802struct fmt::formatter<vn::protocol::uart::VelocityCompensationMode> : ostream_formatter
803{};
804template<>
805struct fmt::formatter<vn::protocol::uart::MagneticMode> : ostream_formatter
806{};
807template<>
808struct fmt::formatter<vn::protocol::uart::ExternalSensorMode> : ostream_formatter
809{};
810template<>
811struct fmt::formatter<vn::protocol::uart::FoamInit> : ostream_formatter
812{};
813template<>
814struct fmt::formatter<vn::protocol::uart::SensSat> : ostream_formatter
815{};
816template<>
817struct fmt::formatter<vn::protocol::uart::InsStatus> : ostream_formatter
818{};
819
820template<>
821struct fmt::formatter<NAV::vendor::vectornav::SatSys> : ostream_formatter
822{};
823template<>
824struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Chan> : ostream_formatter
825{};
826template<>
827struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Freq> : ostream_formatter
828{};
829
830template<size_t tdim, typename T>
831struct fmt::formatter<vn::math::vec<tdim, T>> : ostream_formatter
832{};
833
834template<size_t m, size_t n, typename T>
835struct fmt::formatter<vn::math::mat<m, n, T>> : ostream_formatter
836{};
837
838#endif
Code operator&(const Code::Enum &lhs, const Code::Enum &rhs)
Allows combining flags of the Code enum.
std::ostream & operator<<(std::ostream &os, const NAV::CycleSlipDetector::Result &obj)
Stream insertion operator overload.
@ GPS
Global Positioning System.
Definition SatelliteSystem.hpp:33
@ QZSS
Quasi-Zenith Satellite System.
Definition SatelliteSystem.hpp:37
@ SBAS
Satellite Based Augmentation System.
Definition SatelliteSystem.hpp:39
SatSys
Satellite Constellation.
Definition VectorNavTypes.hpp:142
GnssFix
GNSS fix.
Definition VectorNavTypes.hpp:101
@ GnssFix_NoFix
No fix.
Definition VectorNavTypes.hpp:102
@ GnssFix_2D
2D
Definition VectorNavTypes.hpp:104
@ GnssFix_TimeOnly
Time only.
Definition VectorNavTypes.hpp:103
@ GnssFix_SBAS
SBAS.
Definition VectorNavTypes.hpp:106
@ GnssFix_RTK_Float
RTK Float (only GNSS1)
Definition VectorNavTypes.hpp:107
@ GnssFix_3D
3D
Definition VectorNavTypes.hpp:105
@ GnssFix_RTK_Fixed
RTK Fixed (only GNSS1)
Definition VectorNavTypes.hpp:108
The INS status bitfield.
Definition VectorNavTypes.hpp:598
Mode
Indicates the current mode of the INS filter.
Definition VectorNavTypes.hpp:602
@ Aligning
INS Filter is dynamically aligning.
constexpr uint16_t & status()
Returns a reference to the status.
Definition VectorNavTypes.hpp:643
constexpr Mode mode() const
Extract the current mode of the INS filter from the ins status.
Definition VectorNavTypes.hpp:649
constexpr bool errorIMU() const
Extract the IMU Error from the ins status.
Definition VectorNavTypes.hpp:659
constexpr bool gpsFix() const
Extract the GPS Fix from the ins status.
Definition VectorNavTypes.hpp:654
InsStatus()=default
Default constructor.
constexpr bool errorMagPres() const
Extract the Mag/Pres Error from the ins status.
Definition VectorNavTypes.hpp:664
InsStatus & operator=(const uint16_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:633
constexpr bool errorGnss() const
Extract the GNSS Error from the ins status.
Definition VectorNavTypes.hpp:669
constexpr bool gpsCompass() const
Extract the GPS Compass from the ins status.
Definition VectorNavTypes.hpp:679
InsStatus(uint16_t status)
Definition VectorNavTypes.hpp:629
uint16_t _status
The storage field.
Definition VectorNavTypes.hpp:686
constexpr bool gpsHeadingIns() const
Extract the GPS Heading INS from the ins status.
Definition VectorNavTypes.hpp:674
The VPE status bitfield.
Definition VectorNavTypes.hpp:43
constexpr uint8_t & status()
Returns a reference to the status.
Definition VectorNavTypes.hpp:61
constexpr uint8_t timeOk() const
GpsTow is valid.
Definition VectorNavTypes.hpp:67
TimeStatus(uint8_t status)
Definition VectorNavTypes.hpp:47
uint8_t _status
The storage field.
Definition VectorNavTypes.hpp:84
TimeStatus()=default
Default constructor.
constexpr uint8_t dateOk() const
TimeGps and GpsWeek are valid.
Definition VectorNavTypes.hpp:72
constexpr uint8_t utcTimeValid() const
UTC time is valid.
Definition VectorNavTypes.hpp:77
TimeStatus & operator=(const uint8_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:51
The VPE status bitfield.
Definition VectorNavTypes.hpp:500
uint16_t _status
The storage field.
Definition VectorNavTypes.hpp:571
constexpr uint8_t magDisturbance() const
Extract the magnetic disturbance from the vpe status.
Definition VectorNavTypes.hpp:539
constexpr uint8_t gyroSaturation() const
Extract the gyro saturation from the vpe status.
Definition VectorNavTypes.hpp:529
VpeStatus & operator=(const uint16_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:508
constexpr uint16_t & status()
Returns a reference to the status.
Definition VectorNavTypes.hpp:518
VpeStatus(uint16_t status)
Definition VectorNavTypes.hpp:504
constexpr uint8_t accSaturation() const
Extract the acceleration saturation from the vpe status.
Definition VectorNavTypes.hpp:554
constexpr uint8_t attitudeQuality() const
Extract the attitude quality from the vpe status.
Definition VectorNavTypes.hpp:524
constexpr uint8_t gyroSaturationRecovery() const
Extract the gyro saturation recovery from the vpe status.
Definition VectorNavTypes.hpp:534
VpeStatus()=default
Default constructor.
constexpr uint8_t accDisturbance() const
Extract the acceleration disturbance from the vpe status.
Definition VectorNavTypes.hpp:549
constexpr uint8_t knownAccelDisturbance() const
Extract the known acceleration disturbance from the vpe status.
Definition VectorNavTypes.hpp:564
constexpr uint8_t knownMagDisturbance() const
Extract the known magnetic disturbance from the vpe status.
Definition VectorNavTypes.hpp:559
constexpr uint8_t magSaturation() const
Extract the magnetic saturation from the vpe status.
Definition VectorNavTypes.hpp:544
Dilution of precision.
Definition VectorNavTypes.hpp:130
float tDop
Time DOP (time precision)
Definition VectorNavTypes.hpp:133
float pDop
Positional DOP (Overall 3D position precision)
Definition VectorNavTypes.hpp:132
float nDop
North DOP.
Definition VectorNavTypes.hpp:136
float hDop
Horizontal DOP (2D position precision)
Definition VectorNavTypes.hpp:135
float gDop
Geometric DOP.
Definition VectorNavTypes.hpp:131
float vDop
Vertical DOP (vertical position precision)
Definition VectorNavTypes.hpp:134
float eDop
East DOP.
Definition VectorNavTypes.hpp:137
Raw measurements for a certain satellite.
Definition VectorNavTypes.hpp:267
float dp
Doppler measurement in Hz. Positive sign for approaching satellites.
Definition VectorNavTypes.hpp:464
Flags flags
Tracking info flags.
Definition VectorNavTypes.hpp:461
SatRawElement(uint8_t sys, uint8_t svId, uint8_t freq, uint8_t chan, int8_t slot, uint8_t cno, uint16_t flags, double pr, double cp, float dp)
Constructor.
Definition VectorNavTypes.hpp:428
Freq
Frequency indicator.
Definition VectorNavTypes.hpp:371
@ L1
L1(GPS,QZSS,SBAS), G1(GLO), E2-L1-E1(GAL), B1(BDS)
friend std::ostream & operator<<(std::ostream &os, const Chan &chan)
Stream insertion operator overload.
Definition VectorNavTypes.hpp:316
friend std::ostream & operator<<(std::ostream &os, const Freq &freq)
Stream insertion operator overload.
Definition VectorNavTypes.hpp:385
SatRawElement(uint8_t sys, uint8_t svId, uint8_t freq, uint8_t chan, int8_t slot, uint8_t cno, uint8_t searching, uint8_t tracking, uint8_t timeValid, uint8_t codeLock, uint8_t phaseLock, uint8_t phaseHalfAmbiguity, uint8_t phaseHalfSub, uint8_t phaseSlip, uint8_t pseudorangeSmoothed, double pr, double cp, double dp)
Constructor.
Definition VectorNavTypes.hpp:450
SatRawElement()=default
Default Constructor.
Flags
Tracking info flags.
Definition VectorNavTypes.hpp:270
int8_t slot
Slot Id.
Definition VectorNavTypes.hpp:459
Chan chan
Channel Indicator.
Definition VectorNavTypes.hpp:458
SatSys sys
GNSS constellation indicator.
Definition VectorNavTypes.hpp:455
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
Definition VectorNavTypes.hpp:460
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Definition VectorNavTypes.hpp:287
Freq freq
Frequency indicator.
Definition VectorNavTypes.hpp:457
double cp
Carrier phase measurement in cycles.
Definition VectorNavTypes.hpp:463
double pr
Pseudorange measurement in meters.
Definition VectorNavTypes.hpp:462
Chan
Channel Indicator.
Definition VectorNavTypes.hpp:294
@ L_Chan
L chan (L2CGPS, L2CQZSS), P chan (GPS,QZSS)
@ BC_Chan
B+C chan (GAL), I+Q chan (GPS,GAL,QZSS,BDS), M+L chan (GPS,QZSS), D+P chan (GPS,QZSS)
@ CA_Code
C/A-code (GPS,GLO,SBAS,QZSS), C chan (GAL)
@ M_Chan
M chan (L2CGPS, L2CQZSS), D chan (GPS,QZSS)
uint8_t svId
Space vehicle Id.
Definition VectorNavTypes.hpp:456
Raw measurements pertaining to each GNSS satellite in view.
Definition VectorNavTypes.hpp:264
double tow
Time of week in seconds.
Definition VectorNavTypes.hpp:468
uint8_t numSats
Number of measurements to follow.
Definition VectorNavTypes.hpp:472
uint16_t week
GPS week number.
Definition VectorNavTypes.hpp:470
std::vector< SatRawElement > satellites
SatRaw container.
Definition VectorNavTypes.hpp:474
Information for a certain satellite.
Definition VectorNavTypes.hpp:168
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
Definition VectorNavTypes.hpp:240
Flags flags
Tracking info flags.
Definition VectorNavTypes.hpp:239
SatSys sys
GNSS constellation indicator.
Definition VectorNavTypes.hpp:237
SatInfoElement()=default
Default Constructor.
QualityIndicator qi
Quality Indicator.
Definition VectorNavTypes.hpp:241
SatInfoElement(uint8_t sys, uint8_t svId, uint8_t flags, uint8_t cno, uint8_t qi, int8_t el, int16_t az)
Constructor.
Definition VectorNavTypes.hpp:215
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Definition VectorNavTypes.hpp:186
Flags
Tracking info flags.
Definition VectorNavTypes.hpp:171
int8_t el
Elevation in degrees.
Definition VectorNavTypes.hpp:242
int16_t az
Azimuth angle in degrees.
Definition VectorNavTypes.hpp:243
uint8_t svId
Space vehicle Id.
Definition VectorNavTypes.hpp:238
SatInfoElement(uint8_t sys, uint8_t svId, uint8_t healthy, uint8_t almanac, uint8_t ephemeris, uint8_t differentialCorrection, uint8_t usedForNavigation, uint8_t azimuthElevationValid, uint8_t usedForRTK, uint8_t cno, uint8_t qi, int8_t el, int16_t az)
Constructor.
Definition VectorNavTypes.hpp:232
QualityIndicator
Quality Indicator.
Definition VectorNavTypes.hpp:193
@ CodeAndCarrierLockedAndTimeSynchronized3
Code and carrier locked and time synchronized.
@ CodeAndCarrierLockedAndTimeSynchronized1
Code and carrier locked and time synchronized.
@ CodeAndCarrierLockedAndTimeSynchronized2
Code and carrier locked and time synchronized.
@ CodeLockedAndTimeSynchronized
Code locked and time synchronized.
Information and measurements pertaining to each GNSS satellite in view.
Definition VectorNavTypes.hpp:165
std::vector< SatInfoElement > satellites
SatInfo container.
Definition VectorNavTypes.hpp:249
uint8_t numSats
Number of measurements to follow.
Definition VectorNavTypes.hpp:247
Flags for valid GPS TOW, week number and UTC and current leap seconds.
Definition VectorNavTypes.hpp:113
int8_t leapSeconds
Amount of leap seconds.
Definition VectorNavTypes.hpp:125
TimeStatus status
Definition VectorNavTypes.hpp:123
Storage class for UTC Time.
Definition VectorNavTypes.hpp:89
uint8_t hour
Hours.
Definition VectorNavTypes.hpp:93
uint8_t min
Minutes.
Definition VectorNavTypes.hpp:94
uint8_t day
Days.
Definition VectorNavTypes.hpp:92
uint8_t sec
Seconds.
Definition VectorNavTypes.hpp:95
uint8_t month
Months.
Definition VectorNavTypes.hpp:91
uint16_t ms
Milliseconds.
Definition VectorNavTypes.hpp:96
int8_t year
The year is given as a signed byte year offset from the year 2000. For example the year 2013 would be...
Definition VectorNavTypes.hpp:90