Fixposition SDK 0.0.0-heads/main-0-g90a51ff
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
gnss.hpp File Reference

Fixposition SDK: GNSS types and utilities. More...

#include <cstdint>
#include "types.hpp"
Include dependency graph for gnss.hpp:

Go to the source code of this file.

Namespaces

namespace  fpsdk
 Fixposition SDK.
 
namespace  fpsdk::common
 Fixposition SDK: Common library.
 
namespace  fpsdk::common::gnss
 GNSS types and utilities.
 

Typedefs

using fpsdk::common::gnss::SvNr = uint8_t
 Satellite number (within a GNSS)
 
using fpsdk::common::gnss::Sat = uint16_t
 Satellite ("sat"), consisting of GNSS and satellite number, suitable for indexing and sorting.
 
using fpsdk::common::gnss::SatSig = uint32_t
 Satellite plus frequency band and signal ("satsig"), suitable for indexing and sorting.
 

Enumerations

enum class  fpsdk::common::gnss::GnssFixType : uint8_t {
  fpsdk::common::gnss::UNKNOWN = 0 , fpsdk::common::gnss::NOFIX = 1 , fpsdk::common::gnss::DRONLY = 2 , fpsdk::common::gnss::TIME = 3 ,
  fpsdk::common::gnss::SPP_2D = 4 , fpsdk::common::gnss::SPP_3D = 5 , fpsdk::common::gnss::SPP_3D_DR = 6 , fpsdk::common::gnss::RTK_FLOAT = 7 ,
  fpsdk::common::gnss::RTK_FIXED = 8 , fpsdk::common::gnss::RTK_FLOAT_DR = 9 , fpsdk::common::gnss::RTK_FIXED_DR = 10
}
 GNSS fix types. More...
 
enum class  fpsdk::common::gnss::Gnss : uint8_t {
  fpsdk::common::gnss::UNKNOWN = 0 , fpsdk::common::gnss::GPS = 'G' , fpsdk::common::gnss::SBAS = 'S' , fpsdk::common::gnss::GAL = 'E' ,
  fpsdk::common::gnss::BDS = 'C' , fpsdk::common::gnss::QZSS = 'J' , fpsdk::common::gnss::GLO = 'R' , fpsdk::common::gnss::NAVIC = 'I'
}
 GNSS. More...
 
enum class  fpsdk::common::gnss::Signal : uint8_t {
  fpsdk::common::gnss::UNKNOWN = 0 , fpsdk::common::gnss::BDS_B1C , fpsdk::common::gnss::BDS_B1I , fpsdk::common::gnss::BDS_B2A ,
  fpsdk::common::gnss::BDS_B2I , fpsdk::common::gnss::GAL_E1 , fpsdk::common::gnss::GAL_E5A , fpsdk::common::gnss::GAL_E5B ,
  fpsdk::common::gnss::GLO_L1OF , fpsdk::common::gnss::GLO_L2OF , fpsdk::common::gnss::GPS_L1CA , fpsdk::common::gnss::GPS_L2C ,
  fpsdk::common::gnss::GPS_L5 , fpsdk::common::gnss::QZSS_L1CA , fpsdk::common::gnss::QZSS_L1S , fpsdk::common::gnss::QZSS_L2C ,
  fpsdk::common::gnss::QZSS_L5 , fpsdk::common::gnss::SBAS_L1CA , fpsdk::common::gnss::NAVIC_L5A
}
 Signals. More...
 
enum class  fpsdk::common::gnss::Band : uint8_t { fpsdk::common::gnss::UNKNOWN = 0 , fpsdk::common::gnss::L1 , fpsdk::common::gnss::L2 , fpsdk::common::gnss::L5 }
 Frequency bands. More...
 

Functions

const char * fpsdk::common::gnss::GnssFixTypeStr (const GnssFixType fix_type)
 Stringify GNSS fix type.
 
const char * fpsdk::common::gnss::GnssStr (const Gnss gnss)
 Stringify GNSS.
 
const char * fpsdk::common::gnss::SignalStr (const Signal signal)
 Stringify signal.
 
const char * fpsdk::common::gnss::BandStr (const Band band)
 Stringify frequency band.
 
Band fpsdk::common::gnss::SignalToBand (const Signal signal)
 Get frequency band for a signal.
 
static constexpr Sat fpsdk::common::gnss::GnssSvNrToSat (const Gnss gnss, const SvNr svnr)
 Get "sat" from GNSS and satellite ID.
 
static constexpr Gnss fpsdk::common::gnss::SatToGnss (const Sat sat)
 Get GNSS from "sat".
 
static constexpr SvNr fpsdk::common::gnss::SatToSvNr (const Sat sat)
 Get satellite nr from "sat".
 
static constexpr SatSig fpsdk::common::gnss::GnssSvNrBandSignalToSatSig (const Gnss gnss, const SvNr svnr, const Band band, const Signal signal)
 Get "satsig" from components.
 
static constexpr Gnss fpsdk::common::gnss::SatSigToGnss (const SatSig satsig)
 Get GNSS from "satsig".
 
static constexpr SvNr fpsdk::common::gnss::SatSigToSvNr (const SatSig satsig)
 Get satellite nr from "satsig".
 
static constexpr Band fpsdk::common::gnss::SatSigToBand (const SatSig satsig)
 Get frequency band from "satsig".
 
static constexpr Signal fpsdk::common::gnss::SatSigToSignal (const SatSig satsig)
 Get signal from "satsig".
 
const char * fpsdk::common::gnss::SatStr (const Sat sat)
 Stringify satellite.
 
Sat fpsdk::common::gnss::StrSat (const char *str)
 Satellite from string.
 
Gnss fpsdk::common::gnss::UbxGnssIdToGnss (const uint8_t gnssId)
 Convert UBX gnssId to GNSS.
 
Sat fpsdk::common::gnss::UbxGnssIdSvIdToSat (const uint8_t gnssId, const uint8_t svId)
 Convert UBX gnssId and svId to satellite.
 
Signal fpsdk::common::gnss::UbxGnssIdSigIdToSignal (const uint8_t gnssId, const uint8_t sigId)
 Convert UBX gnssId and sigId to signal.
 

Variables

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

Detailed Description

Fixposition SDK: GNSS types and utilities.

* ___    ___
* \  \  /  /
*  \  \/  /   Copyright (c) Fixposition AG (www.fixposition.com) and contributors
*  /  /\  \   License: see the LICENSE file
* /__/  \__\
*
* Based on work by flipflip (https://github.com/phkehl)
* 

Definition in file gnss.hpp.