20 #include <SDKDDKVer.h>
22 #include <boost/asio.hpp>
28#include <fmt/format.h>
29#include <fmt/ostream.h>
61 [[nodiscard]]
constexpr uint8_t&
status()
67 [[nodiscard]]
constexpr uint8_t
timeOk()
const
69 return ((
_status & (1U << 0U)) >> 0U);
72 [[nodiscard]]
constexpr uint8_t
dateOk()
const
74 return ((
_status & (1U << 1U)) >> 1U);
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()
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()
651 return static_cast<Mode>((
_status & (1U << 0U | 1U << 1U)) >> 0U);
654 [[nodiscard]]
constexpr bool gpsFix()
const
656 return ((
_status & (1U << 2U)) >> 2U);
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
Mode
Indicates the current mode of the INS filter.
@ NotTracking
Not tracking.
@ LossOfGNSS
Loss of GNSS.
@ Aligning
INS Filter is dynamically aligning.
constexpr uint16_t & status()
Returns a reference to the status.
constexpr Mode mode() const
Extract the current mode of the INS filter from the ins status.
constexpr bool errorIMU() const
Extract the IMU Error from the ins status.
constexpr bool gpsFix() const
Extract the GPS Fix from the ins status.
InsStatus()=default
Default constructor.
constexpr bool errorMagPres() const
Extract the Mag/Pres Error from the ins status.
InsStatus & operator=(const uint16_t &status)
Assignment operator.
constexpr bool errorGnss() const
Extract the GNSS Error from the ins status.
constexpr bool gpsCompass() const
Extract the GPS Compass from the ins status.
InsStatus(uint16_t status)
uint16_t _status
The storage field.
constexpr bool gpsHeadingIns() const
Extract the GPS Heading INS from the ins status.
constexpr uint8_t & status()
Returns a reference to the status.
constexpr uint8_t timeOk() const
GpsTow is valid.
TimeStatus(uint8_t status)
uint8_t _status
The storage field.
TimeStatus()=default
Default constructor.
constexpr uint8_t dateOk() const
TimeGps and GpsWeek are valid.
constexpr uint8_t utcTimeValid() const
UTC time is valid.
TimeStatus & operator=(const uint8_t &status)
Assignment operator.
uint16_t _status
The storage field.
constexpr uint8_t magDisturbance() const
Extract the magnetic disturbance from the vpe status.
constexpr uint8_t gyroSaturation() const
Extract the gyro saturation from the vpe status.
VpeStatus & operator=(const uint16_t &status)
Assignment operator.
constexpr uint16_t & status()
Returns a reference to the status.
VpeStatus(uint16_t status)
constexpr uint8_t accSaturation() const
Extract the acceleration saturation from the vpe status.
constexpr uint8_t attitudeQuality() const
Extract the attitude quality from the vpe status.
constexpr uint8_t gyroSaturationRecovery() const
Extract the gyro saturation recovery from the vpe status.
VpeStatus()=default
Default constructor.
constexpr uint8_t accDisturbance() const
Extract the acceleration disturbance from the vpe status.
constexpr uint8_t knownAccelDisturbance() const
Extract the known acceleration disturbance from the vpe status.
constexpr uint8_t knownMagDisturbance() const
Extract the known magnetic disturbance from the vpe status.
constexpr uint8_t magSaturation() const
Extract the magnetic saturation from the vpe status.
constexpr SatInfo::SatInfoElement::Flags operator&(SatInfo::SatInfoElement::Flags lhs, SatInfo::SatInfoElement::Flags rhs)
Allows combining flags of the SatInfo::SatInfoElement::Flags enum.
std::ostream & operator<<(std::ostream &os, const SatSys &satSys)
Stream insertion operator overload.
SatSys
Satellite Constellation.
@ GnssFix_TimeOnly
Time only.
@ GnssFix_RTK_Float
RTK Float (only GNSS1)
@ GnssFix_RTK_Fixed
RTK Fixed (only GNSS1)
float tDop
Time DOP (time precision)
float pDop
Positional DOP (Overall 3D position precision)
float hDop
Horizontal DOP (2D position precision)
float vDop
Vertical DOP (vertical position precision)
float dp
Doppler measurement in Hz. Positive sign for approaching satellites.
Flags flags
Tracking info flags.
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.
@ 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.
friend std::ostream & operator<<(std::ostream &os, const Freq &freq)
Stream insertion operator overload.
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.
SatRawElement()=default
Default Constructor.
Flags
Tracking info flags.
@ PseudorangeSmoothed
Pseudorange Smoothed.
@ PhaseHalfAmbiguity
Phase Half Ambiguity.
@ PhaseHalfSub
Phase Half Sub.
Chan chan
Channel Indicator.
SatSys sys
GNSS constellation indicator.
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Freq freq
Frequency indicator.
double cp
Carrier phase measurement in cycles.
double pr
Pseudorange measurement in meters.
@ 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.
Raw measurements pertaining to each GNSS satellite in view.
double tow
Time of week in seconds.
uint8_t numSats
Number of measurements to follow.
uint16_t week
GPS week number.
std::vector< SatRawElement > satellites
SatRaw container.
uint8_t cno
Carrier-to-noise density ratio (signal strength) [dB-Hz].
Flags flags
Tracking info flags.
SatSys sys
GNSS constellation indicator.
SatInfoElement()=default
Default Constructor.
QualityIndicator qi
Quality Indicator.
SatInfoElement(uint8_t sys, uint8_t svId, uint8_t flags, uint8_t cno, uint8_t qi, int8_t el, int16_t az)
Constructor.
friend Flags operator|(Flags lhs, Flags rhs)
Binary or-operator.
Flags
Tracking info flags.
@ UsedForRTK
Used for RTK.
@ DifferentialCorrection
Differential Correction.
@ UsedForNavigation
Used for Navigation.
@ AzimuthElevationValid
Azimuth / Elevation Valid.
int8_t el
Elevation in degrees.
int16_t az
Azimuth angle in degrees.
uint8_t svId
Space vehicle Id.
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.
QualityIndicator
Quality Indicator.
@ 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.
std::vector< SatInfoElement > satellites
SatInfo container.
uint8_t numSats
Number of measurements to follow.
Flags for valid GPS TOW, week number and UTC and current leap seconds.
int8_t leapSeconds
Amount of leap seconds.
Storage class for UTC Time.
int8_t year
The year is given as a signed byte year offset from the year 2000. For example the year 2013 would be...