20 #include <SDKDDKVer.h>
22 #include <boost/asio.hpp>
28#include <fmt/format.h>
29#include <fmt/ostream.h>
34namespace NAV::vendor::vectornav
61 [[nodiscard]]
constexpr uint8_t&
status()
61 [[nodiscard]]
constexpr uint8_t&
status() {
…}
67 [[nodiscard]]
constexpr uint8_t
timeOk()
const
69 return ((
_status & (1U << 0U)) >> 0U);
67 [[nodiscard]]
constexpr uint8_t
timeOk()
const {
…}
72 [[nodiscard]]
constexpr uint8_t
dateOk()
const
74 return ((
_status & (1U << 1U)) >> 1U);
72 [[nodiscard]]
constexpr uint8_t
dateOk()
const {
…}
79 return ((
_status & (1U << 2U)) >> 2U);
188 return Flags(
int(lhs) |
int(rhs));
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)
289 return Flags(
int(lhs) |
int(rhs));
324 os <<
"C/A-Code or C-Chan";
327 os <<
"Semi-codeless";
351 os <<
"M Chan or D Chan";
354 os <<
"L Chan or P Chan";
357 os <<
"B+C Chan, I+Q Chan, M+L Chan or D+P Chan";
360 os <<
"based on Z-tracking";
393 os <<
"L1, G1, E2-L1-E1 or B1";
402 os <<
"E6, LEX or B3";
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)
518 [[nodiscard]]
constexpr uint16_t&
status()
518 [[nodiscard]]
constexpr uint16_t&
status() {
…}
526 return ((
_status & (1U << 0U | 1U << 1U)) >> 0U);
531 return ((
_status & (1U << 2U)) >> 2U);
536 return ((
_status & (1U << 3U)) >> 3U);
541 return ((
_status & (1U << 4U | 1U << 5U)) >> 4U);
546 return ((
_status & (1U << 6U)) >> 6U);
551 return ((
_status & (1U << 7U | 1U << 8U)) >> 7U);
556 return ((
_status & (1U << 9U)) >> 9U);
561 return ((
_status & (1U << 11U)) >> 11U);
566 return ((
_status & (1U << 12U)) >> 12U);
643 [[nodiscard]]
constexpr uint16_t&
status()
643 [[nodiscard]]
constexpr uint16_t&
status() {
…}
651 return static_cast<Mode>((
_status & (1U << 0U | 1U << 1U)) >> 0U);
654 [[nodiscard]]
constexpr bool gpsFix()
const
656 return ((
_status & (1U << 2U)) >> 2U);
654 [[nodiscard]]
constexpr bool gpsFix()
const {
…}
661 return ((
_status & (1U << 4U)) >> 4U);
666 return ((
_status & (1U << 5U)) >> 5U);
671 return ((
_status & (1U << 6U)) >> 6U);
676 return ((
_status & (1U << 8U)) >> 8U);
681 return ((
_status & (1U << 9U)) >> 9U);
691#ifndef DOXYGEN_IGNORE
694struct fmt::formatter<vn::protocol::uart::ErrorDetectionMode> : ostream_formatter
697struct fmt::formatter<vn::protocol::uart::AsciiAsync> : ostream_formatter
700struct fmt::formatter<vn::protocol::uart::AsyncMode> : ostream_formatter
703struct fmt::formatter<vn::protocol::uart::BinaryGroup> : ostream_formatter
706struct fmt::formatter<vn::protocol::uart::CommonGroup> : ostream_formatter
709struct fmt::formatter<vn::protocol::uart::TimeGroup> : ostream_formatter
712struct fmt::formatter<vn::protocol::uart::ImuGroup> : ostream_formatter
715struct fmt::formatter<vn::protocol::uart::GpsGroup> : ostream_formatter
718struct fmt::formatter<vn::protocol::uart::AttitudeGroup> : ostream_formatter
721struct fmt::formatter<vn::protocol::uart::InsGroup> : ostream_formatter
724struct fmt::formatter<vn::protocol::uart::SensorError> : ostream_formatter
727struct fmt::formatter<vn::protocol::uart::BootloaderError> : ostream_formatter
730struct fmt::formatter<vn::protocol::uart::SyncInMode> : ostream_formatter
733struct fmt::formatter<vn::protocol::uart::SyncInEdge> : ostream_formatter
736struct fmt::formatter<vn::protocol::uart::SyncOutMode> : ostream_formatter
739struct fmt::formatter<vn::protocol::uart::SyncOutPolarity> : ostream_formatter
742struct fmt::formatter<vn::protocol::uart::CountMode> : ostream_formatter
745struct fmt::formatter<vn::protocol::uart::StatusMode> : ostream_formatter
748struct fmt::formatter<vn::protocol::uart::ChecksumMode> : ostream_formatter
751struct fmt::formatter<vn::protocol::uart::ErrorMode> : ostream_formatter
754struct fmt::formatter<vn::protocol::uart::FilterMode> : ostream_formatter
757struct fmt::formatter<vn::protocol::uart::IntegrationFrame> : ostream_formatter
760struct fmt::formatter<vn::protocol::uart::CompensationMode> : ostream_formatter
763struct fmt::formatter<vn::protocol::uart::AccCompensationMode> : ostream_formatter
766struct fmt::formatter<vn::protocol::uart::EarthRateCorrection> : ostream_formatter
769struct fmt::formatter<vn::protocol::uart::GpsFix> : ostream_formatter
772struct fmt::formatter<vn::protocol::uart::GpsMode> : ostream_formatter
775struct fmt::formatter<vn::protocol::uart::PpsSource> : ostream_formatter
778struct fmt::formatter<vn::protocol::uart::GpsRate> : ostream_formatter
781struct fmt::formatter<vn::protocol::uart::AntPower> : ostream_formatter
784struct fmt::formatter<vn::protocol::uart::VpeEnable> : ostream_formatter
787struct fmt::formatter<vn::protocol::uart::HeadingMode> : ostream_formatter
790struct fmt::formatter<vn::protocol::uart::VpeMode> : ostream_formatter
793struct fmt::formatter<vn::protocol::uart::Scenario> : ostream_formatter
796struct fmt::formatter<vn::protocol::uart::HsiMode> : ostream_formatter
799struct fmt::formatter<vn::protocol::uart::HsiOutput> : ostream_formatter
802struct fmt::formatter<vn::protocol::uart::VelocityCompensationMode> : ostream_formatter
805struct fmt::formatter<vn::protocol::uart::MagneticMode> : ostream_formatter
808struct fmt::formatter<vn::protocol::uart::ExternalSensorMode> : ostream_formatter
811struct fmt::formatter<vn::protocol::uart::FoamInit> : ostream_formatter
814struct fmt::formatter<vn::protocol::uart::SensSat> : ostream_formatter
817struct fmt::formatter<vn::protocol::uart::InsStatus> : ostream_formatter
821struct fmt::formatter<NAV::vendor::vectornav::SatSys> : ostream_formatter
824struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Chan> : ostream_formatter
827struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Freq> : ostream_formatter
830template<
size_t tdim,
typename T>
831struct fmt::formatter<vn::math::vec<tdim, T>> : ostream_formatter
834template<
size_t m,
size_t n,
typename T>
835struct fmt::formatter<vn::math::mat<m, n, T>> : ostream_formatter
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
@ NotTracking
Not tracking.
@ LossOfGNSS
Loss of GNSS.
@ 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
@ E6
E6(GAL), LEX(QZSS), B3(BDS)
@ L5
L5(GPS,QZSS,SBAS), E5a(GAL)
@ L2
L2(GPS,QZSS), G2(GLO)
@ 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
@ PseudorangeSmoothed
Pseudorange Smoothed.
@ PhaseHalfAmbiguity
Phase Half Ambiguity.
@ PhaseHalfSub
Phase Half Sub.
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
@ Q_Chan
Q chan (GPS,GAL,QZSS,BDS)
@ SemiCodeless
semi-codeless (GPS)
@ I_Chan
I chan (GPS,GAL,QZSS,BDS)
@ 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)
@ Z_Tracking
based on Z-tracking (GPS)
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
@ UsedForRTK
Used for RTK.
@ DifferentialCorrection
Differential Correction.
@ UsedForNavigation
Used for Navigation.
@ AzimuthElevationValid
Azimuth / Elevation Valid.
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.
@ SignalAcquired
Signal acquired.
@ SignalDetectedButUnstable
Signal detected but unstable.
@ CodeAndCarrierLockedAndTimeSynchronized1
Code and carrier locked and time synchronized.
@ CodeAndCarrierLockedAndTimeSynchronized2
Code and carrier locked and time synchronized.
@ SearchingSignal
Searching signal.
@ 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