20#ifndef __FPSDK_COMMON_GNSS_HPP__
21#define __FPSDK_COMMON_GNSS_HPP__
217 return (
Gnss)((sat >> 8) & 0xff);
274 return (
Gnss)((satsig >> 24) & 0xff);
286 return (
SvNr)((satsig >> 16) & 0xff);
298 return (
Band)((satsig >> 8) & 0xff);
310 return (
Signal)(satsig & 0xff);
static constexpr SvNr NUM_QZSS
Number of QZSS satellites (J01-J10, PRN - 192)
static constexpr Gnss SatSigToGnss(const SatSig satsig)
Get GNSS from "satsig".
static constexpr Signal SatSigToSignal(const SatSig satsig)
Get signal from "satsig".
static constexpr SvNr FIRST_GLO
First GLONASS satellite number.
uint32_t SatSig
Satellite plus frequency band and signal ("satsig"), suitable for indexing and sorting.
static constexpr SvNr FIRST_QZSS
First QZSS satellite number.
@ QZSS_L1S
QZSS L1 S (SAIF) signal.
@ BDS_B2A
BeiDou B2a signal (B2 ap and B2 ad)
@ GLO_L2OF
GLONASS L2 OF signal.
@ QZSS_L1CA
QZSS L1 C/A signal.
@ GAL_E5A
Galileo E5a signal (E5 aI and E5 aQ)
@ GPS_L5
GPS L5 signal (L5 I and L5 Q)
@ QZSS_L5
QZSS L5 signal (L5 I and L5 Q)
@ BDS_B1C
BeiDou B1c signal (B1 Cp and B1 Cd)
@ BDS_B2I
BeiDou B2I signal (B2I D1 and B2I D2)
@ GLO_L1OF
GLONASS L1 OF signal.
@ UNKNOWN
Unknown/unspecified signal.
@ GAL_E1
Galileo E1 signal (E1 C and E1 B)
@ SBAS_L1CA
SBAS L1 C/A signal.
@ GAL_E5B
Galileo E5b signal (E5 bI and E5 bQ)
@ GPS_L1CA
GPS L1 C/A signal.
@ GPS_L2C
GPS L2 C signal (L2 CL and L2 CM)
@ BDS_B1I
BeiDou B1I signal (B1I D1 and B1I D2)
@ QZSS_L2C
QZSS L2 C signal (L2 CL and L2 CM)
uint8_t SvNr
Satellite number (within a GNSS)
static constexpr SatSig GnssSvNrBandSignalToSatSig(const Gnss gnss, const SvNr svnr, const Band band, const Signal signal)
Get "satsig" from components.
static constexpr SvNr FIRST_BDS
First BeiDou satellite number.
Sat UbxGnssIdSvIdToSat(const uint8_t gnssId, const uint8_t svId)
Convert UBX gnssId and svId to satellite.
static constexpr SvNr NUM_GLO
Number of GLONASS satellites (R01-R32, slot)
static constexpr SatSig INVALID_SATSIG
Invalid "satsig"".
static constexpr SvNr FIRST_SBAS
First SBAS satellite number.
static constexpr SvNr NUM_SBAS
Number of SBAS satellites (S20-S59, PRN - 100)
static constexpr SvNr NUM_GAL
Number of Galileo satellites (E01-E36, PRN)
Sat StrSat(const char *str)
Satellite from string.
Gnss UbxGnssIdToGnss(const uint8_t gnssId)
Convert UBX gnssId to GNSS.
static constexpr Sat INVALID_SAT
Invalid "sat".
uint16_t Sat
Satellite ("sat"), consisting of GNSS and satellite number, suitable for indexing and sorting.
@ UNKNOWN
Unknown/unspecified GNSS.
const char * BandStr(const Band band)
Stringify frequency band.
const char * GnssFixTypeStr(const GnssFixType fix_type)
Stringify GNSS fix type.
const char * SignalStr(const Signal signal)
Stringify signal.
static constexpr SvNr NUM_GPS
Number of GPS satellites (G01-G32, PRN)
static constexpr SvNr SatSigToSvNr(const SatSig satsig)
Get satellite nr from "satsig".
static constexpr Band SatSigToBand(const SatSig satsig)
Get frequency band from "satsig".
static constexpr SvNr NUM_BDS
Number of BeiDou satellites (C01-C63, PRN)
static constexpr SvNr FIRST_NAVIC
First NavIC satellite number.
const char * GnssStr(const Gnss gnss)
Stringify GNSS.
static constexpr SvNr FIRST_GPS
First GPS satellite number.
static constexpr SvNr SatToSvNr(const Sat sat)
Get satellite nr from "sat".
static constexpr SvNr NUM_NAVIC
Number of NavIC satellites (I01-I14, PRN)
static constexpr SvNr FIRST_GAL
First Galileo satellite number.
const char * SatStr(const Sat sat)
Stringify satellite.
static constexpr Gnss SatToGnss(const Sat sat)
Get GNSS from "sat".
@ UNKNOWN
Unknown/unspecified band.
static constexpr SvNr INAVLID_SVNR
Invalid satellite number (in any GNSS)
GnssFixType
GNSS fix types.
@ DRONLY
Dead-reckoning only fix.
@ SPP_3D_DR
3D + dead-reckoning fix
@ RTK_FLOAT
RTK float fix (implies 3D fix)
@ RTK_FIXED_DR
RTK fixed fix + dead-reckoning (implies RTK_FIXED fix)
@ RTK_FLOAT_DR
RTK float fix + dead-reckoning (implies RTK_FLOAT fix)
@ RTK_FIXED
RTK fixed fix (implies 3D fix)
static constexpr Sat GnssSvNrToSat(const Gnss gnss, const SvNr svnr)
Get "sat" from GNSS and satellite ID.
Band SignalToBand(const Signal signal)
Get frequency band for a signal.
Signal UbxGnssIdSigIdToSignal(const uint8_t gnssId, const uint8_t sigId)
Convert UBX gnssId and sigId to signal.
constexpr std::underlying_type< T >::type EnumToVal(T enum_val)
Convert enum class constant to the underlying integral type value.
Fixposition SDK: Common types.