Fixposition SDK 0.0.0-heads/main-0-g408dc89
Collection of c++ libraries and apps for use with Fixposition products on Linux
Loading...
Searching...
No Matches
fpsdk::common::gnss Namespace Reference

GNSS types and utilities. More...

Classes

struct  Sat
 Satellite ("sat"), consisting of GNSS and satellite number, suitable for indexing and sorting. More...
struct  SatSig
 Satellite plus frequency band and signal ("satsig"), suitable for indexing and sorting. More...

Typedefs

using SvNr = uint8_t
 Satellite number (within a GNSS)

Enumerations

enum class  FixType : uint8_t {
  UNKNOWN = 0 , NOFIX = 1 , DRONLY = 2 , TIME = 3 ,
  SPP_2D = 4 , SPP_3D = 5 , SPP_3D_DR = 6 , RTK_FLOAT = 7 ,
  RTK_FIXED = 8 , RTK_FLOAT_DR = 9 , RTK_FIXED_DR = 10
}
 GNSS fix types. More...
enum class  Gnss : uint8_t {
  UNKNOWN = 0 , GPS , SBAS , GAL ,
  BDS , QZSS , GLO , NAVIC
}
 GNSS. More...
enum class  Signal : uint8_t {
  UNKNOWN = 0 , GPS_L1CA , GPS_L2C , GPS_L5 ,
  SBAS_L1CA , GAL_E1 , GAL_E6 , GAL_E5B ,
  GAL_E5A , BDS_B1C , BDS_B1I , BDS_B3I ,
  BDS_B2I , BDS_B2A , QZSS_L1CA , QZSS_L1S ,
  QZSS_L2C , QZSS_L5 , GLO_L1OF , GLO_L2OF ,
  NAVIC_L5A
}
 Signals. More...
enum class  Band : uint8_t {
  UNKNOWN = 0 , L1 , E6 , L2 ,
  L5
}
 Frequency bands. More...
enum class  SigUse : uint8_t {
  UNKNOWN = 0 , NONE , SEARCH , ACQUIRED ,
  UNUSABLE , CODELOCK , CARRLOCK
}
 Signal use. More...
enum class  SigCorr : uint8_t {
  UNKNOWN = 0 , NONE , SBAS , BDS ,
  RTCM2 , RTCM3_OSR , RTCM3_SSR , QZSS_SLAS ,
  SPARTN
}
 Signal correction data availability. More...
enum class  SigIono : uint8_t {
  UNKNOWN = 0 , NONE , KLOB_GPS , KLOB_BDS ,
  SBAS , DUAL_FREQ
}
 Ionosphere corrections. More...
enum class  SigHealth : uint8_t { UNKNOWN = 0 , HEALTHY , UNHEALTHY }
 Signal health. More...
enum class  SatOrb : uint8_t {
  UNKNOWN = 0x00 , NONE = 0x01 , EPH = 0x02 , ALM = 0x04 ,
  PRED = 0x08 , OTHER = 0x10
}
 Satellite orbit source. More...

Functions

const char * FixTypeStr (const FixType fix_type)
 Stringify GNSS fix type.
const char * GnssStr (const Gnss gnss)
 Stringify GNSS.
char GnssChar (const Gnss gnss)
 Get GNSS char.
const char * SignalStr (const Signal signal, const bool kurz=false)
 Stringify signal.
const char * BandStr (const Band band)
 Stringify frequency band.
const char * SigUseStr (const SigUse use)
 Stringify signal use.
const char * SigCorrStr (const SigCorr corr)
 Stringify signal correction data availability.
const char * SigIonoStr (const SigIono iono)
 Stringify ionosphere corrections.
const char * SigHealthStr (const SigHealth health)
 Stringify signal health.
const char * SatOrbStr (const SatOrb orb)
 Stringify satellite orbit source.
Band SignalToBand (const Signal signal)
 Get frequency band for a signal.
Gnss SignalToGnss (const Signal signal)
 Get GNSS for a signal.
Gnss UbxGnssIdToGnss (const uint8_t gnssId)
 Convert UBX gnssId to GNSS.
Sat UbxGnssIdSvIdToSat (const uint8_t gnssId, const uint8_t svId)
 Convert UBX gnssId and svId to satellite.
Signal UbxGnssIdSigIdToSignal (const uint8_t gnssId, const uint8_t sigId)
 Convert UBX gnssId and sigId to signal.
FixType NmeaQualityGgaToFixType (const parser::nmea::NmeaQualityGga quality)
 Convert NMEA GGA quality to fix type.
FixType NmeaModeRmcGnsToFixType (const parser::nmea::NmeaModeRmcGns mode)
 Convert NMEA RMC/GNS mode to fix type.
FixType NmeaModeGllVtgToFixType (const parser::nmea::NmeaModeGllVtg mode)
 Convert NMEA GLL/VTG mode to fix type.
Sat NmeaSystemIdSvIdToSat (const parser::nmea::NmeaSystemId systemId, const uint8_t svId, const parser::nmea::NmeaVersion nmeaVersion=parser::nmea::NmeaVersion::V411)
 Convert NMEA system ID and satellite number to satellite.
Signal NmeaSignalIdToSignal (const parser::nmea::NmeaSignalId signalId)
 Convert NMEA signal ID to signal.

Variables

static constexpr SvNr NUM_GPS = 32
 Number of GPS satellites (G01-G32, PRN)
static constexpr SvNr NUM_SBAS = 39
 Number of SBAS satellites (S20-S59, PRN - 100)
static constexpr SvNr NUM_GAL = 36
 Number of Galileo satellites (E01-E36, PRN)
static constexpr SvNr NUM_BDS = 63
 Number of BeiDou satellites (C01-C63, PRN)
static constexpr SvNr NUM_QZSS = 10
 Number of QZSS satellites (J01-J10, PRN - 192)
static constexpr SvNr NUM_GLO = 32
 Number of GLONASS satellites (R01-R32, slot)
static constexpr SvNr NUM_NAVIC = 14
 Number of NavIC satellites (I01-I14, PRN)
static constexpr SvNr FIRST_GPS = 1
 First GPS satellite number.
static constexpr SvNr FIRST_SBAS = 20
 First SBAS satellite number.
static constexpr SvNr FIRST_GAL = 1
 First Galileo satellite number.
static constexpr SvNr FIRST_BDS = 1
 First BeiDou satellite number.
static constexpr SvNr FIRST_QZSS = 1
 First QZSS satellite number.
static constexpr SvNr FIRST_GLO = 1
 First GLONASS satellite number.
static constexpr SvNr FIRST_NAVIC = 1
 First NavIC satellite number.
static constexpr SvNr INAVLID_SVNR = 0
 Invalid satellite number (in any GNSS)
static constexpr Sat INVALID_SAT
 Invalid "sat".
static constexpr SatSig INVALID_SATSIG
 Invalid SatSig.

Detailed Description

GNSS types and utilities.

Typedef Documentation

◆ SvNr

using fpsdk::common::gnss::SvNr = uint8_t

Satellite number (within a GNSS)

Definition at line 303 of file gnss.hpp.

Enumeration Type Documentation

◆ FixType

enum class fpsdk::common::gnss::FixType : uint8_t
strong

GNSS fix types.

Enumerator
UNKNOWN 

Unknown fix.

NOFIX 

No fix.

DRONLY 

Dead-reckoning only fix.

TIME 

Time only fix.

SPP_2D 

2D fix

SPP_3D 

3D fix

SPP_3D_DR 

3D + dead-reckoning fix

RTK_FLOAT 

RTK float fix (implies 3D fix)

RTK_FIXED 

RTK fixed fix (implies 3D fix)

RTK_FLOAT_DR 

RTK float fix + dead-reckoning (implies RTK_FLOAT fix)

RTK_FIXED_DR 

RTK fixed fix + dead-reckoning (implies RTK_FIXED fix)

Definition at line 44 of file gnss.hpp.

◆ Gnss

enum class fpsdk::common::gnss::Gnss : uint8_t
strong

GNSS.

Enumerator
UNKNOWN 

Unknown/unspecified GNSS.

GPS 

GPS (G)

SBAS 

SBAS (S)

GAL 

Galileo (E)

BDS 

BeiDou (C)

QZSS 

QZSS (J)

GLO 

GLONASS (R)

NAVIC 

NavIC (IRNSS) (I)

Definition at line 71 of file gnss.hpp.

◆ Signal

enum class fpsdk::common::gnss::Signal : uint8_t
strong

Signals.

Enumerator
UNKNOWN 

Unknown/unspecified signal.

GPS_L1CA 

[L1] GPS L1 C/A signal

GPS_L2C 

[L2] GPS L2 C signal (L2 CL and L2 CM)

GPS_L5 

[L5] GPS L5 signal (L5 I and L5 Q)

SBAS_L1CA 

[L1] SBAS L1 C/A signal

GAL_E1 

[L1] Galileo E1 signal (E1 C and E1 B)

GAL_E6 

[E6] Galileo E6 signal (E6A, E6B, and E6C)

GAL_E5B 

[L2] Galileo E5b signal (E5 bI and E5 bQ)

GAL_E5A 

[L5] Galileo E5a signal (E5 aI and E5 aQ)

BDS_B1C 

[L1] BeiDou B1c signal (B1 Cp and B1 Cd)

BDS_B1I 

[L1] BeiDou B1I signal (B1I D1 and B1I D2)

BDS_B3I 

[E6] BeiDou B3I signal (B3I D1 and B3I D2)

BDS_B2I 

[L2] BeiDou B2I signal (B2I D1 and B2I D2)

BDS_B2A 

[L5] BeiDou B2a signal (B2 ap and B2 ad)

QZSS_L1CA 

[L1] QZSS L1 C/A signal

QZSS_L1S 

[L1] QZSS L1 S (SAIF) signal

QZSS_L2C 

[L2] QZSS L2 C signal (L2 CL and L2 CM)

QZSS_L5 

[L5] QZSS L5 signal (L5 I and L5 Q)

GLO_L1OF 

[L1] GLONASS L1 OF signal

GLO_L2OF 

[L2] GLONASS L2 OF signal

NAVIC_L5A 

[L5] NavIC L5 A

Definition at line 104 of file gnss.hpp.

◆ Band

enum class fpsdk::common::gnss::Band : uint8_t
strong

Frequency bands.

Enumerator
UNKNOWN 

Unknown/unspecified band.

L1 

L1 (E1) band (~1.5GHz)

E6 

E6 band (~1.3GHz)

L2 

L2 band (~1.2GHz)

L5 

L5 (E5) band (~1.1GHz)

Definition at line 149 of file gnss.hpp.

◆ SigUse

enum class fpsdk::common::gnss::SigUse : uint8_t
strong

Signal use.

Enumerator
UNKNOWN 

Unknown or unspecified use of the signal.

NONE 

Signal not used.

SEARCH 

Signal is being searched.

ACQUIRED 

Signal was acquired.

UNUSABLE 

Signal tracked but unused.

CODELOCK 

Signal tracked and code locked.

CARRLOCK 

Signal tracked and carrier locked.

Definition at line 170 of file gnss.hpp.

◆ SigCorr

enum class fpsdk::common::gnss::SigCorr : uint8_t
strong

Signal correction data availability.

Enumerator
UNKNOWN 

Unknown or unspecified corrections.

NONE 

No corrections available.

SBAS 

SBAS (DGNSS) corrections available.

BDS 

BeiDou (DGNSS) corrections available.

RTCM2 

RTCM v2 (DGNSS) corrections available.

RTCM3_OSR 

RTCM v3.x OSR type RTK corrections available.

RTCM3_SSR 

RTCM v3.x SSR type RTK corrections available.

QZSS_SLAS 

QZSS SLAS corrections available.

SPARTN 

SPARTN corrections available.

Definition at line 193 of file gnss.hpp.

◆ SigIono

enum class fpsdk::common::gnss::SigIono : uint8_t
strong

Ionosphere corrections.

Enumerator
UNKNOWN 

Unknown or unspecified corrections.

NONE 

No corrections.

KLOB_GPS 

GPS style Klobuchar corrections.

KLOB_BDS 

BeiDou style Klobuchar corrections.

SBAS 

SBAS corrections.

DUAL_FREQ 

Dual frequency iono-free combination.

Definition at line 218 of file gnss.hpp.

◆ SigHealth

enum class fpsdk::common::gnss::SigHealth : uint8_t
strong

Signal health.

Enumerator
UNKNOWN 

Unknown or unspecified health.

HEALTHY 

Signal is healthy.

UNHEALTHY 

Signal is unhealthy.

Definition at line 240 of file gnss.hpp.

◆ SatOrb

enum class fpsdk::common::gnss::SatOrb : uint8_t
strong

Satellite orbit source.

Enumerator
UNKNOWN 

Unknown.

NONE 

No orbit available.

EPH 

Ephemeris.

ALM 

Almanac.

PRED 

Predicted orbit.

OTHER 

Other, unspecified orbit source.

Definition at line 259 of file gnss.hpp.

Function Documentation

◆ FixTypeStr()

const char * fpsdk::common::gnss::FixTypeStr ( const FixType fix_type)

Stringify GNSS fix type.

Parameters
[in]fix_typeThe fix type
Returns
a concise and unique string for the fix types, "?" for bad values

◆ GnssStr()

const char * fpsdk::common::gnss::GnssStr ( const Gnss gnss)

Stringify GNSS.

Parameters
[in]gnssThe GNSS
Returns
a concise and unique string for the GNSS ("GPS", "GAL", etc.), "?" for bad values

◆ GnssChar()

char fpsdk::common::gnss::GnssChar ( const Gnss gnss)

Get GNSS char.

Parameters
[in]gnssThe GNSS
Returns
the character for the GNSS ('G', 'E', etc.), '?' for bad values

◆ SignalStr()

const char * fpsdk::common::gnss::SignalStr ( const Signal signal,
const bool kurz = false )

Stringify signal.

Parameters
[in]signalThe signal
[in]kurzGet short string (for example, "L1CA" instead of "GPS_L1CA")
Returns
a concise and unique string for the signal, "?" for bad values

◆ BandStr()

const char * fpsdk::common::gnss::BandStr ( const Band band)

Stringify frequency band.

Parameters
[in]bandThe frequency band
Returns
a concise and unique string for the frequency band, "?" for bad values

◆ SigUseStr()

const char * fpsdk::common::gnss::SigUseStr ( const SigUse use)

Stringify signal use.

Parameters
[in]useThe signal use
Returns
a concise and unique string for the signal use, "?" for bad values

◆ SigCorrStr()

const char * fpsdk::common::gnss::SigCorrStr ( const SigCorr corr)

Stringify signal correction data availability.

Parameters
[in]corrThe signal correction data availability
Returns
a concise and unique string for the signal correction data availability, "?" for bad values

◆ SigIonoStr()

const char * fpsdk::common::gnss::SigIonoStr ( const SigIono iono)

Stringify ionosphere corrections.

Parameters
[in]ionoThe ionosphere corrections
Returns
a concise and unique string for the ionosphere corrections, "?" for bad values

◆ SigHealthStr()

const char * fpsdk::common::gnss::SigHealthStr ( const SigHealth health)

Stringify signal health.

Parameters
[in]healthThe signal health
Returns
a concise and unique string for the signal health, "?" for bad values

◆ SatOrbStr()

const char * fpsdk::common::gnss::SatOrbStr ( const SatOrb orb)

Stringify satellite orbit source.

Parameters
[in]orbThe satellite orbit source
Returns
a concise and unique string for the satellite orbit source, "?" for bad values

◆ SignalToBand()

Band fpsdk::common::gnss::SignalToBand ( const Signal signal)

Get frequency band for a signal.

Parameters
[in]signalThe signal
Returns
the frequency band for the signal

Referenced by fpsdk::common::gnss::SatSig::SatSig().

◆ SignalToGnss()

Gnss fpsdk::common::gnss::SignalToGnss ( const Signal signal)

Get GNSS for a signal.

Parameters
[in]signalThe signal
Returns
the GNSS for the signal

◆ UbxGnssIdToGnss()

Gnss fpsdk::common::gnss::UbxGnssIdToGnss ( const uint8_t gnssId)

Convert UBX gnssId to GNSS.

Parameters
[in]gnssIdUBX gnssId
Returns
the GNSS

◆ UbxGnssIdSvIdToSat()

Sat fpsdk::common::gnss::UbxGnssIdSvIdToSat ( const uint8_t gnssId,
const uint8_t svId )

Convert UBX gnssId and svId to satellite.

Parameters
[in]gnssIdUBX gnssId
[in]svIdUBX svId
Returns
the satellite, INVALID_SAT for invalid gnssId/svId

◆ UbxGnssIdSigIdToSignal()

Signal fpsdk::common::gnss::UbxGnssIdSigIdToSignal ( const uint8_t gnssId,
const uint8_t sigId )

Convert UBX gnssId and sigId to signal.

Parameters
[in]gnssIdUBX gnssId
[in]sigIdUBX sigId
Returns
the signal

◆ NmeaQualityGgaToFixType()

FixType fpsdk::common::gnss::NmeaQualityGgaToFixType ( const parser::nmea::NmeaQualityGga quality)

Convert NMEA GGA quality to fix type.

Parameters
[in]qualityNMEA GGA quality
Returns
the fix type corresponding to the quality

◆ NmeaModeRmcGnsToFixType()

FixType fpsdk::common::gnss::NmeaModeRmcGnsToFixType ( const parser::nmea::NmeaModeRmcGns mode)

Convert NMEA RMC/GNS mode to fix type.

Parameters
[in]modeNMEA RMC/GNS mode
Returns
the fix type corresponding to the mode

◆ NmeaModeGllVtgToFixType()

FixType fpsdk::common::gnss::NmeaModeGllVtgToFixType ( const parser::nmea::NmeaModeGllVtg mode)

Convert NMEA GLL/VTG mode to fix type.

Parameters
[in]modeNMEA GLL/VTG mode
Returns
the fix type corresponding to the mode

◆ NmeaSystemIdSvIdToSat()

Sat fpsdk::common::gnss::NmeaSystemIdSvIdToSat ( const parser::nmea::NmeaSystemId systemId,
const uint8_t svId,
const parser::nmea::NmeaVersion nmeaVersion = parser::nmea::NmeaVersion::V411 )

Convert NMEA system ID and satellite number to satellite.

Parameters
[in]systemIdNMEA system ID
[in]svIdNMEA satellite ID
[in]nmeaVersionNMEA version
Returns
the satellite, INVALID_SAT for invalid systemId/svId

References fpsdk::common::parser::nmea::NmeaVersion::V411.

◆ NmeaSignalIdToSignal()

Signal fpsdk::common::gnss::NmeaSignalIdToSignal ( const parser::nmea::NmeaSignalId signalId)

Convert NMEA signal ID to signal.

Parameters
[in]signalIdNMEA signal ID
Returns
the signal

Variable Documentation

◆ NUM_GPS

SvNr fpsdk::common::gnss::NUM_GPS = 32
staticconstexpr

Number of GPS satellites (G01-G32, PRN)

Definition at line 308 of file gnss.hpp.

◆ NUM_SBAS

SvNr fpsdk::common::gnss::NUM_SBAS = 39
staticconstexpr

Number of SBAS satellites (S20-S59, PRN - 100)

Definition at line 309 of file gnss.hpp.

◆ NUM_GAL

SvNr fpsdk::common::gnss::NUM_GAL = 36
staticconstexpr

Number of Galileo satellites (E01-E36, PRN)

Definition at line 310 of file gnss.hpp.

◆ NUM_BDS

SvNr fpsdk::common::gnss::NUM_BDS = 63
staticconstexpr

Number of BeiDou satellites (C01-C63, PRN)

Definition at line 311 of file gnss.hpp.

◆ NUM_QZSS

SvNr fpsdk::common::gnss::NUM_QZSS = 10
staticconstexpr

Number of QZSS satellites (J01-J10, PRN - 192)

Definition at line 312 of file gnss.hpp.

◆ NUM_GLO

SvNr fpsdk::common::gnss::NUM_GLO = 32
staticconstexpr

Number of GLONASS satellites (R01-R32, slot)

Definition at line 313 of file gnss.hpp.

◆ NUM_NAVIC

SvNr fpsdk::common::gnss::NUM_NAVIC = 14
staticconstexpr

Number of NavIC satellites (I01-I14, PRN)

Definition at line 314 of file gnss.hpp.

◆ FIRST_GPS

SvNr fpsdk::common::gnss::FIRST_GPS = 1
staticconstexpr

First GPS satellite number.

Definition at line 315 of file gnss.hpp.

◆ FIRST_SBAS

SvNr fpsdk::common::gnss::FIRST_SBAS = 20
staticconstexpr

First SBAS satellite number.

Definition at line 316 of file gnss.hpp.

◆ FIRST_GAL

SvNr fpsdk::common::gnss::FIRST_GAL = 1
staticconstexpr

First Galileo satellite number.

Definition at line 317 of file gnss.hpp.

◆ FIRST_BDS

SvNr fpsdk::common::gnss::FIRST_BDS = 1
staticconstexpr

First BeiDou satellite number.

Definition at line 318 of file gnss.hpp.

◆ FIRST_QZSS

SvNr fpsdk::common::gnss::FIRST_QZSS = 1
staticconstexpr

First QZSS satellite number.

Definition at line 319 of file gnss.hpp.

◆ FIRST_GLO

SvNr fpsdk::common::gnss::FIRST_GLO = 1
staticconstexpr

First GLONASS satellite number.

Definition at line 320 of file gnss.hpp.

◆ FIRST_NAVIC

SvNr fpsdk::common::gnss::FIRST_NAVIC = 1
staticconstexpr

First NavIC satellite number.

Definition at line 321 of file gnss.hpp.

◆ INAVLID_SVNR

SvNr fpsdk::common::gnss::INAVLID_SVNR = 0
staticconstexpr

Invalid satellite number (in any GNSS)

Definition at line 322 of file gnss.hpp.

◆ INVALID_SAT

Sat fpsdk::common::gnss::INVALID_SAT
staticconstexpr

Invalid "sat".

Note
This is not the only invalid combination of GNSS and satellite number!

Definition at line 390 of file gnss.hpp.

◆ INVALID_SATSIG

SatSig fpsdk::common::gnss::INVALID_SATSIG
staticconstexpr

Invalid SatSig.

Definition at line 469 of file gnss.hpp.