19#include <fmt/format.h>
20#include <fmt/ostream.h>
25namespace NAV::vendor::vectornav
52 [[nodiscard]]
constexpr uint8_t&
status()
58 [[nodiscard]]
constexpr uint8_t
timeOk()
const
60 return ((_status & (1U << 0U)) >> 0U);
63 [[nodiscard]]
constexpr uint8_t
dateOk()
const
65 return ((_status & (1U << 1U)) >> 1U);
70 return ((_status & (1U << 2U)) >> 2U);
179 return Flags(
int(lhs) |
int(rhs));
224 uint8_t healthy, uint8_t almanac, uint8_t ephemeris, uint8_t differentialCorrection, uint8_t usedForNavigation, uint8_t azimuthElevationValid, uint8_t usedForRTK,
225 uint8_t
cno, uint8_t
qi, int8_t
el, int16_t
az)
280 return Flags(
int(lhs) |
int(rhs));
315 os <<
"C/A-Code or C-Chan";
318 os <<
"Semi-codeless";
342 os <<
"M Chan or D Chan";
345 os <<
"L Chan or P Chan";
348 os <<
"B+C Chan, I+Q Chan, M+L Chan or D+P Chan";
351 os <<
"based on Z-tracking";
384 os <<
"L1, G1, E2-L1-E1 or B1";
393 os <<
"E6, LEX or B3";
442 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,
443 double pr,
double cp,
double dp)
509 [[nodiscard]]
constexpr uint16_t&
status()
517 return ((_status & (1U << 0U | 1U << 1U)) >> 0U);
522 return ((_status & (1U << 2U)) >> 2U);
527 return ((_status & (1U << 3U)) >> 3U);
532 return ((_status & (1U << 4U | 1U << 5U)) >> 4U);
537 return ((_status & (1U << 6U)) >> 6U);
542 return ((_status & (1U << 7U | 1U << 8U)) >> 7U);
547 return ((_status & (1U << 9U)) >> 9U);
552 return ((_status & (1U << 11U)) >> 11U);
557 return ((_status & (1U << 12U)) >> 12U);
634 [[nodiscard]]
constexpr uint16_t&
status()
642 return static_cast<Mode>((_status & (1U << 0U | 1U << 1U)) >> 0U);
645 [[nodiscard]]
constexpr bool gpsFix()
const
647 return ((_status & (1U << 2U)) >> 2U);
652 return ((_status & (1U << 4U)) >> 4U);
657 return ((_status & (1U << 5U)) >> 5U);
662 return ((_status & (1U << 6U)) >> 6U);
667 return ((_status & (1U << 8U)) >> 8U);
672 return ((_status & (1U << 9U)) >> 9U);
682#ifndef DOXYGEN_IGNORE
685struct fmt::formatter<vn::protocol::uart::ErrorDetectionMode> : ostream_formatter
688struct fmt::formatter<vn::protocol::uart::AsciiAsync> : ostream_formatter
691struct fmt::formatter<vn::protocol::uart::AsyncMode> : ostream_formatter
694struct fmt::formatter<vn::protocol::uart::BinaryGroup> : ostream_formatter
697struct fmt::formatter<vn::protocol::uart::CommonGroup> : ostream_formatter
700struct fmt::formatter<vn::protocol::uart::TimeGroup> : ostream_formatter
703struct fmt::formatter<vn::protocol::uart::ImuGroup> : ostream_formatter
706struct fmt::formatter<vn::protocol::uart::GpsGroup> : ostream_formatter
709struct fmt::formatter<vn::protocol::uart::AttitudeGroup> : ostream_formatter
712struct fmt::formatter<vn::protocol::uart::InsGroup> : ostream_formatter
715struct fmt::formatter<vn::protocol::uart::SensorError> : ostream_formatter
718struct fmt::formatter<vn::protocol::uart::BootloaderError> : ostream_formatter
721struct fmt::formatter<vn::protocol::uart::SyncInMode> : ostream_formatter
724struct fmt::formatter<vn::protocol::uart::SyncInEdge> : ostream_formatter
727struct fmt::formatter<vn::protocol::uart::SyncOutMode> : ostream_formatter
730struct fmt::formatter<vn::protocol::uart::SyncOutPolarity> : ostream_formatter
733struct fmt::formatter<vn::protocol::uart::CountMode> : ostream_formatter
736struct fmt::formatter<vn::protocol::uart::StatusMode> : ostream_formatter
739struct fmt::formatter<vn::protocol::uart::ChecksumMode> : ostream_formatter
742struct fmt::formatter<vn::protocol::uart::ErrorMode> : ostream_formatter
745struct fmt::formatter<vn::protocol::uart::FilterMode> : ostream_formatter
748struct fmt::formatter<vn::protocol::uart::IntegrationFrame> : ostream_formatter
751struct fmt::formatter<vn::protocol::uart::CompensationMode> : ostream_formatter
754struct fmt::formatter<vn::protocol::uart::AccCompensationMode> : ostream_formatter
757struct fmt::formatter<vn::protocol::uart::EarthRateCorrection> : ostream_formatter
760struct fmt::formatter<vn::protocol::uart::GpsFix> : ostream_formatter
763struct fmt::formatter<vn::protocol::uart::GpsMode> : ostream_formatter
766struct fmt::formatter<vn::protocol::uart::PpsSource> : ostream_formatter
769struct fmt::formatter<vn::protocol::uart::GpsRate> : ostream_formatter
772struct fmt::formatter<vn::protocol::uart::AntPower> : ostream_formatter
775struct fmt::formatter<vn::protocol::uart::VpeEnable> : ostream_formatter
778struct fmt::formatter<vn::protocol::uart::HeadingMode> : ostream_formatter
781struct fmt::formatter<vn::protocol::uart::VpeMode> : ostream_formatter
784struct fmt::formatter<vn::protocol::uart::Scenario> : ostream_formatter
787struct fmt::formatter<vn::protocol::uart::HsiMode> : ostream_formatter
790struct fmt::formatter<vn::protocol::uart::HsiOutput> : ostream_formatter
793struct fmt::formatter<vn::protocol::uart::VelocityCompensationMode> : ostream_formatter
796struct fmt::formatter<vn::protocol::uart::MagneticMode> : ostream_formatter
799struct fmt::formatter<vn::protocol::uart::ExternalSensorMode> : ostream_formatter
802struct fmt::formatter<vn::protocol::uart::FoamInit> : ostream_formatter
805struct fmt::formatter<vn::protocol::uart::SensSat> : ostream_formatter
808struct fmt::formatter<vn::protocol::uart::InsStatus> : ostream_formatter
812struct fmt::formatter<NAV::vendor::vectornav::SatSys> : ostream_formatter
815struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Chan> : ostream_formatter
818struct fmt::formatter<NAV::vendor::vectornav::RawMeas::SatRawElement::Freq> : ostream_formatter
821template<
size_t tdim,
typename T>
822struct fmt::formatter<vn::math::vec<tdim, T>> : ostream_formatter
825template<
size_t m,
size_t n,
typename T>
826struct 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:32
@ QZSS
Quasi-Zenith Satellite System.
Definition SatelliteSystem.hpp:36
@ SBAS
Satellite Based Augmentation System.
Definition SatelliteSystem.hpp:38
SatSys
Satellite Constellation.
Definition VectorNavTypes.hpp:133
GnssFix
GNSS fix.
Definition VectorNavTypes.hpp:92
@ GnssFix_NoFix
No fix.
Definition VectorNavTypes.hpp:93
@ GnssFix_2D
2D
Definition VectorNavTypes.hpp:95
@ GnssFix_TimeOnly
Time only.
Definition VectorNavTypes.hpp:94
@ GnssFix_SBAS
SBAS.
Definition VectorNavTypes.hpp:97
@ GnssFix_RTK_Float
RTK Float (only GNSS1)
Definition VectorNavTypes.hpp:98
@ GnssFix_3D
3D
Definition VectorNavTypes.hpp:96
@ GnssFix_RTK_Fixed
RTK Fixed (only GNSS1)
Definition VectorNavTypes.hpp:99
The INS status bitfield.
Definition VectorNavTypes.hpp:589
Mode
Indicates the current mode of the INS filter.
Definition VectorNavTypes.hpp:593
@ 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:634
constexpr Mode mode() const
Extract the current mode of the INS filter from the ins status.
Definition VectorNavTypes.hpp:640
constexpr bool errorIMU() const
Extract the IMU Error from the ins status.
Definition VectorNavTypes.hpp:650
constexpr bool gpsFix() const
Extract the GPS Fix from the ins status.
Definition VectorNavTypes.hpp:645
InsStatus()=default
Default constructor.
constexpr bool errorMagPres() const
Extract the Mag/Pres Error from the ins status.
Definition VectorNavTypes.hpp:655
InsStatus & operator=(const uint16_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:624
constexpr bool errorGnss() const
Extract the GNSS Error from the ins status.
Definition VectorNavTypes.hpp:660
constexpr bool gpsCompass() const
Extract the GPS Compass from the ins status.
Definition VectorNavTypes.hpp:670
InsStatus(uint16_t status)
Definition VectorNavTypes.hpp:620
constexpr bool gpsHeadingIns() const
Extract the GPS Heading INS from the ins status.
Definition VectorNavTypes.hpp:665
The VPE status bitfield.
Definition VectorNavTypes.hpp:34
constexpr uint8_t & status()
Returns a reference to the status.
Definition VectorNavTypes.hpp:52
constexpr uint8_t timeOk() const
GpsTow is valid.
Definition VectorNavTypes.hpp:58
TimeStatus(uint8_t status)
Definition VectorNavTypes.hpp:38
TimeStatus()=default
Default constructor.
constexpr uint8_t dateOk() const
TimeGps and GpsWeek are valid.
Definition VectorNavTypes.hpp:63
constexpr uint8_t utcTimeValid() const
UTC time is valid.
Definition VectorNavTypes.hpp:68
TimeStatus & operator=(const uint8_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:42
The VPE status bitfield.
Definition VectorNavTypes.hpp:491
constexpr uint8_t magDisturbance() const
Extract the magnetic disturbance from the vpe status.
Definition VectorNavTypes.hpp:530
constexpr uint8_t gyroSaturation() const
Extract the gyro saturation from the vpe status.
Definition VectorNavTypes.hpp:520
VpeStatus & operator=(const uint16_t &status)
Assignment operator.
Definition VectorNavTypes.hpp:499
constexpr uint16_t & status()
Returns a reference to the status.
Definition VectorNavTypes.hpp:509
VpeStatus(uint16_t status)
Definition VectorNavTypes.hpp:495
constexpr uint8_t accSaturation() const
Extract the acceleration saturation from the vpe status.
Definition VectorNavTypes.hpp:545
constexpr uint8_t attitudeQuality() const
Extract the attitude quality from the vpe status.
Definition VectorNavTypes.hpp:515
constexpr uint8_t gyroSaturationRecovery() const
Extract the gyro saturation recovery from the vpe status.
Definition VectorNavTypes.hpp:525
VpeStatus()=default
Default constructor.
constexpr uint8_t accDisturbance() const
Extract the acceleration disturbance from the vpe status.
Definition VectorNavTypes.hpp:540
constexpr uint8_t knownAccelDisturbance() const
Extract the known acceleration disturbance from the vpe status.
Definition VectorNavTypes.hpp:555
constexpr uint8_t knownMagDisturbance() const
Extract the known magnetic disturbance from the vpe status.
Definition VectorNavTypes.hpp:550
constexpr uint8_t magSaturation() const
Extract the magnetic saturation from the vpe status.
Definition VectorNavTypes.hpp:535
Dilution of precision.
Definition VectorNavTypes.hpp:121
float tDop
Time DOP (time precision)
Definition VectorNavTypes.hpp:124
float pDop
Positional DOP (Overall 3D position precision)
Definition VectorNavTypes.hpp:123
float nDop
North DOP.
Definition VectorNavTypes.hpp:127
float hDop
Horizontal DOP (2D position precision)
Definition VectorNavTypes.hpp:126
float gDop
Geometric DOP.
Definition VectorNavTypes.hpp:122
float vDop
Vertical DOP (vertical position precision)
Definition VectorNavTypes.hpp:125
float eDop
East DOP.
Definition VectorNavTypes.hpp:128
Raw measurements for a certain satellite.
Definition VectorNavTypes.hpp:258
float dp
Doppler measurement in Hz. Positive sign for approaching satellites.
Definition VectorNavTypes.hpp:455
Flags flags
Tracking info flags.
Definition VectorNavTypes.hpp:452
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:419
Freq
Frequency indicator.
Definition VectorNavTypes.hpp:362
@ 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:307
friend std::ostream & operator<<(std::ostream &os, const Freq &freq)
Stream insertion operator overload.
Definition VectorNavTypes.hpp:376
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:441
SatRawElement()=default
Default Constructor.
Flags
Tracking info flags.
Definition VectorNavTypes.hpp:261
@ PseudorangeSmoothed
Pseudorange Smoothed.
@ PhaseHalfAmbiguity
Phase Half Ambiguity.
@ PhaseHalfSub
Phase Half Sub.
int8_t slot
Slot Id.
Definition VectorNavTypes.hpp:450
Chan chan
Channel Indicator.
Definition VectorNavTypes.hpp:449
SatSys sys
GNSS constellation indicator.
Definition VectorNavTypes.hpp:446
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
Definition VectorNavTypes.hpp:451
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Definition VectorNavTypes.hpp:278
Freq freq
Frequency indicator.
Definition VectorNavTypes.hpp:448
double cp
Carrier phase measurement in cycles.
Definition VectorNavTypes.hpp:454
double pr
Pseudorange measurement in meters.
Definition VectorNavTypes.hpp:453
Chan
Channel Indicator.
Definition VectorNavTypes.hpp:285
@ 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:447
Raw measurements pertaining to each GNSS satellite in view.
Definition VectorNavTypes.hpp:255
double tow
Time of week in seconds.
Definition VectorNavTypes.hpp:459
uint8_t numSats
Number of measurements to follow.
Definition VectorNavTypes.hpp:463
uint16_t week
GPS week number.
Definition VectorNavTypes.hpp:461
std::vector< SatRawElement > satellites
SatRaw container.
Definition VectorNavTypes.hpp:465
Information for a certain satellite.
Definition VectorNavTypes.hpp:159
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
Definition VectorNavTypes.hpp:231
Flags flags
Tracking info flags.
Definition VectorNavTypes.hpp:230
SatSys sys
GNSS constellation indicator.
Definition VectorNavTypes.hpp:228
SatInfoElement()=default
Default Constructor.
QualityIndicator qi
Quality Indicator.
Definition VectorNavTypes.hpp:232
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:206
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Definition VectorNavTypes.hpp:177
Flags
Tracking info flags.
Definition VectorNavTypes.hpp:162
@ UsedForRTK
Used for RTK.
@ DifferentialCorrection
Differential Correction.
@ UsedForNavigation
Used for Navigation.
@ AzimuthElevationValid
Azimuth / Elevation Valid.
int8_t el
Elevation in degrees.
Definition VectorNavTypes.hpp:233
int16_t az
Azimuth angle in degrees.
Definition VectorNavTypes.hpp:234
uint8_t svId
Space vehicle Id.
Definition VectorNavTypes.hpp:229
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:223
QualityIndicator
Quality Indicator.
Definition VectorNavTypes.hpp:184
@ 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:156
std::vector< SatInfoElement > satellites
SatInfo container.
Definition VectorNavTypes.hpp:240
uint8_t numSats
Number of measurements to follow.
Definition VectorNavTypes.hpp:238
Flags for valid GPS TOW, week number and UTC and current leap seconds.
Definition VectorNavTypes.hpp:104
int8_t leapSeconds
Amount of leap seconds.
Definition VectorNavTypes.hpp:116
TimeStatus status
Definition VectorNavTypes.hpp:114
Storage class for UTC Time.
Definition VectorNavTypes.hpp:80
uint8_t hour
Hours.
Definition VectorNavTypes.hpp:84
uint8_t min
Minutes.
Definition VectorNavTypes.hpp:85
uint8_t day
Days.
Definition VectorNavTypes.hpp:83
uint8_t sec
Seconds.
Definition VectorNavTypes.hpp:86
uint8_t month
Months.
Definition VectorNavTypes.hpp:82
uint16_t ms
Milliseconds.
Definition VectorNavTypes.hpp:87
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:81