Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Member Functions | List of all members
gnsstk::RinexObsID Class Reference

Detailed Description

class RinexObsID is the set of ObsID's which are valid in RINEX 3.03. This class simply limits possible values of ObsID, plus a little functionality.

Note
it depends critically on map validRinexTrackingCodes, from class ObsID.

This map[sys][freq] = valid codes; e.g. valid['G'][1]="CSLXPWYMN" Only exception is there is no pseudorange (C) on GPS L1/L2 N (codeless) RINEX 3.03 document, section 5.1 sys freq code ObsID = sys+type+freq+code GPS L1 C,S,L,X,P,W,Y,M,N G CLDS 1 CSLXPWYMN (but not C1N) L2 C,D,S,L,X,P,W,Y,M,N G CLDS 2 CDSLXPWYMN (but not C2N) L5 I,Q,X G CLDS 5 IQX GLO G1 C,P R CLDS 1 CP G2 C,P R CLDS 2 CP GAL E1 A,B,C,X,Z E CLDS 1 ABCXZ E5a I,Q,X E CLDS 5 IQX E5b I,Q,X E CLDS 7 IQX E5ab I,Q,X E CLDS 8 IQX E6 A,B,C,X,Z E CLDS 6 ABCXZ SBAS L1 C S CLDS 1 C L5 I,Q,X S CLDS 5 IQX BDS B1 I,Q,X C CLDS 1 IQX B2 I,Q,X C CLDS 7 IQX B3 I,Q,X C CLDS 6 IQX QZSS L1 C,S,L,X,Z J CLDS 1 CSLXZ L2 S,L,X J CLDS 2 SLX L5 I,Q,X J CLDS 5 IQX L6 S,L,X J CLDS 6 SLX IRNSS L5 A,B,C,X I CLDS 5 ABCX L9 A,B,C,X I CLDS 9 ABCX

Definition at line 102 of file RinexObsID.hpp.

#include <RinexObsID.hpp>

Inheritance diagram for gnsstk::RinexObsID:
Inheritance graph
[legend]

Public Member Functions

std::string asString () const
 
std::string asString (double version) const
 
bool equalIndex (const RinexObsID &right) const
 
 RinexObsID ()
 empty constructor, creates an invalid object More...
 
 RinexObsID (const char *id, double version)
 
 RinexObsID (const ObsID &oid, double version=Rinex3ObsBase::currentVersion)
 
 RinexObsID (const RinexObsType &rot)
 Construct this object from the string specifier. More...
 
 RinexObsID (const std::string &strID, double version)
 
 RinexObsID (ObservationType ot, CarrierBand cb, TrackingCode tc, double version=Rinex3ObsBase::currentVersion)
 Explicit constructior. More...
 
- Public Member Functions inherited from gnsstk::ObsID
void clearMcodeMask (uint32_t clearmask)
 Clear bits in mcodeMask that are set in clearmask. More...
 
virtual std::ostream & dump (std::ostream &s) const
 Convenience output method. More...
 
uint32_t getMcodeBits () const
 Return the value of mcode. More...
 
uint32_t getMcodeMask () const
 Return the value of mcodeMask. More...
 
bool isWild () const
 Return true if any of the data are wildcard values. More...
 
void makeWild ()
 Set all data to wildcard values. More...
 
void maskMcodeBits (uint32_t newval, uint32_t newmask)
 
 ObsID ()
 
 ObsID (ObservationType ot, CarrierBand cb, TrackingCode tc, int fo, uint32_t mc, XmitAnt transmitter=XmitAnt::Standard, bool fw=false)
 
 ObsID (ObservationType ot, CarrierBand cb, TrackingCode tc, int fo, XmitAnt transmitter=XmitAnt::Any, bool fw=false)
 
 ObsID (ObservationType ot, CarrierBand cb, TrackingCode tc, XmitAnt transmitter=XmitAnt::Any)
 
bool operator!= (const ObsID &right) const
 
virtual bool operator< (const ObsID &right) const
 
bool operator<= (const ObsID &right) const
 
virtual bool operator== (const ObsID &right) const
 Equality requires all fields to be the same. More...
 
bool operator> (const ObsID &right) const
 
bool operator>= (const ObsID &right) const
 
void setMcodeBits (uint32_t newval, uint32_t newmask=-1)
 Set the value of mcode while simultaneously setting the mask. More...
 
void setMcodeMask (uint32_t newmask=-1)
 Set the value of mcodeMask on its own. More...
 
virtual ~ObsID ()
 Destructor. More...
 

Static Public Member Functions

static std::ostream & dumpCheck (std::ostream &s)
 
static std::string getCBChars ()
 
static std::string getCBDescFromChar (char c)
 
static std::string getOTChars ()
 
static std::string getOTDescFromChar (char c)
 
static std::string getTCChars ()
 
static std::string getTCDescFromChar (char c)
 
static RinexObsID newID (const std::string &id, const std::string &desc="")
 
- Static Public Member Functions inherited from gnsstk::ObsID
static std::string getDescCB (CarrierBand e)
 SWIG accessor. Not overloaded, because SWIG. More...
 
static std::string getDescOT (ObservationType e)
 SWIG accessor. Not overloaded, because SWIG. More...
 
static std::string getDescTC (TrackingCode e)
 SWIG accessor. Not overloaded, because SWIG. More...
 

Public Attributes

double rinexVersion
 
- Public Attributes inherited from gnsstk::ObsID
CarrierBand band
 
TrackingCode code
 
int freqOffs
 GLONASS frequency offset. More...
 
bool freqOffsWild
 True=Treat freqOffs as a wildcard when matching. More...
 
ObservationType type
 
XmitAnt xmitAnt
 Identify the transmitting antenna. More...
 

Static Public Attributes

static GNSSTK_EXPORT std::map< CarrierBand, char > cb2char
 
static GNSSTK_EXPORT std::map< char, CarrierBandchar2cb
 
static GNSSTK_EXPORT std::map< char, ObservationTypechar2ot
 
static GNSSTK_EXPORT std::map< char, TrackingCodechar2tc
 
static GNSSTK_EXPORT std::map< std::string, std::string > map1to3sys
 
static GNSSTK_EXPORT std::map< std::string, std::string > map3to1sys
 
static GNSSTK_EXPORT std::map< ObservationType, char > ot2char
 
static GNSSTK_EXPORT std::map< TrackingCode, char > tc2char
 
static GNSSTK_EXPORT std::string validRinexFrequencies
 
static GNSSTK_EXPORT std::string validRinexSystems
 This string contains the system characters for all RINEX systems. More...
 
static GNSSTK_EXPORT std::map< char, std::map< char, std::string > > validRinexTrackingCodes
 
- Static Public Attributes inherited from gnsstk::ObsID
static GNSSTK_EXPORT std::map< CarrierBand, std::string > cbDesc
 
static GNSSTK_EXPORT std::map< ObservationType, std::string > otDesc
 
static GNSSTK_EXPORT std::map< TrackingCode, std::string > tcDesc
 These strings are for forming a somewhat verbose description. More...
 
static GNSSTK_EXPORT bool verbose = false
 

Static Private Member Functions

static RinexObsID idCreator (const std::string &id, const std::string &desc="")
 

Constructor & Destructor Documentation

◆ RinexObsID() [1/6]

gnsstk::RinexObsID::RinexObsID ( )
inline

empty constructor, creates an invalid object

Definition at line 106 of file RinexObsID.hpp.

◆ RinexObsID() [2/6]

gnsstk::RinexObsID::RinexObsID ( ObservationType  ot,
CarrierBand  cb,
TrackingCode  tc,
double  version = Rinex3ObsBase::currentVersion 
)
inline

Explicit constructior.

Definition at line 112 of file RinexObsID.hpp.

◆ RinexObsID() [3/6]

gnsstk::RinexObsID::RinexObsID ( const std::string &  strID,
double  version 
)
explicit

Construct this object from the string specifier.

Parameters
[in]strIDThe RINEX observation identifier to decode. This must be a RINEX 3 ID, three or four characters in length. Three character obs codes are assumed to be from GPS. Four character obs codes use the first character for the system.
[in]versionThe RINEX version of the obs ID in strID. This is used for oddball special cases like CC1* in RINEX 3.02, to make sure that the codes are properly interpreted. When reading the obs ID from a RINEX header, one should use the header version here. When interpreting command-line options or other contexts where a RINEX version is not specified, use Rinex3ObsBase::currentVersion.
Exceptions
InvalidParameter
Bug:
Not convinced this is an appropriate value, but it's what has been used in the past.

Definition at line 282 of file RinexObsID_Generated.cpp.

◆ RinexObsID() [4/6]

gnsstk::RinexObsID::RinexObsID ( const char *  id,
double  version 
)
inlineexplicit

Construct this object from the C-style string specifier.

Parameters
[in]idThe RINEX observation identifier to decode. This must be a RINEX 3 ID, three or four characters in length. Three character obs codes are assumed to be from GPS. Four character obs codes use the first character for the system.
[in]versionThe RINEX version of the obs ID in strID. This is used for oddball special cases like CC1* in RINEX 3.02, to make sure that the codes are properly interpreted. When reading the obs ID from a RINEX header, one should use the header version here. When interpreting command-line options or other contexts where a RINEX version is not specified, use Rinex3ObsBase::currentVersion.
Exceptions
InvalidParameter

Definition at line 152 of file RinexObsID.hpp.

◆ RinexObsID() [5/6]

gnsstk::RinexObsID::RinexObsID ( const ObsID oid,
double  version = Rinex3ObsBase::currentVersion 
)
inline

Constructor from ObsID.

Exceptions
InvalidParameter

Definition at line 159 of file RinexObsID.hpp.

◆ RinexObsID() [6/6]

gnsstk::RinexObsID::RinexObsID ( const RinexObsType rot)

Construct this object from the string specifier.

a conversion constructor, giving a fixed one-way mapping from RINEX ver 2 obstypes to RinexObsIDs. L1 -> L1P; P1 -> C1P; C1 -> C1C; S1 -> S1P; D1 -> D1P L2 -> L2P; P2 -> C2P; C2 -> C2X; S2 -> S2P; D2 -> D2P

Deprecated:
RinexHeader does the conversion with more care for tracking code, and does not use this routine.

Definition at line 81 of file RinexObsID.cpp.

Member Function Documentation

◆ asString() [1/2]

std::string gnsstk::RinexObsID::asString ( ) const
inline

This returns a representation of this object using the observation codes described in section 5.1 of the Rinex 3 specification. Note that this always returns a three character identifier so some information is lost because some codes are shared between satellite systems.

Note
This method defaults to using the obs ID representation defined in the RINEX version set in rinexVersion.
See also
asString(double)
ObsID::rinexVersion

Definition at line 190 of file RinexObsID.hpp.

◆ asString() [2/2]

std::string gnsstk::RinexObsID::asString ( double  version) const

This returns a representation of this object using the observation codes described in section 5.1 of the Rinex 3 specification. Note that this always returns a three character identifier so some information is lost because some codes are shared between satellite systems.

Parameters
[in]versionThe RINEX format version to use when generating the string (e.g. 3.02 has different codes for BDS than other versions).

Definition at line 152 of file RinexObsID.cpp.

◆ dumpCheck()

std::ostream & gnsstk::RinexObsID::dumpCheck ( std::ostream &  s)
static
Exceptions
Exception

Definition at line 302 of file RinexObsID.cpp.

◆ equalIndex()

bool gnsstk::RinexObsID::equalIndex ( const RinexObsID right) const

This is used by Rinex3ObsHeader::getObsIndex to determine a pseudo-equality that takes into account handling of pseudo-observables like ionospheric delay and channel numbers.

Returns
true if this and right are the same, ignoring tracking codes for ionospheric delay, and tracking codes and band for channel numbers.

Definition at line 356 of file RinexObsID.cpp.

◆ getCBChars()

std::string gnsstk::RinexObsID::getCBChars ( )
static

Return a string containing all the keys of char2cb. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 450 of file RinexObsID.cpp.

◆ getCBDescFromChar()

static std::string gnsstk::RinexObsID::getCBDescFromChar ( char  c)
inlinestatic

Return a string containing the description of a given RINEX 3 character tracking code. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 314 of file RinexObsID.hpp.

◆ getOTChars()

std::string gnsstk::RinexObsID::getOTChars ( )
static

Return a string containing all the keys of char2ot. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 438 of file RinexObsID.cpp.

◆ getOTDescFromChar()

static std::string gnsstk::RinexObsID::getOTDescFromChar ( char  c)
inlinestatic

Return a string containing the description of a given RINEX 3 character tracking code. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 302 of file RinexObsID.hpp.

◆ getTCChars()

std::string gnsstk::RinexObsID::getTCChars ( )
static

Return a string containing all the keys of char2tc. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 462 of file RinexObsID.cpp.

◆ getTCDescFromChar()

static std::string gnsstk::RinexObsID::getTCDescFromChar ( char  c)
inlinestatic

Return a string containing the description of a given RINEX 3 character tracking code. Intended for use by SWIG/Python where the mappings of enums are a bit sketchy when used in container templates.

Definition at line 326 of file RinexObsID.hpp.

◆ idCreator()

RinexObsID gnsstk::RinexObsID::idCreator ( const std::string &  id,
const std::string &  desc = "" 
)
staticprivate

Definition at line 395 of file RinexObsID.cpp.

◆ newID()

RinexObsID gnsstk::RinexObsID::newID ( const std::string &  id,
const std::string &  desc = "" 
)
static

Extend the standard identifiers with a new Rinex 3 style identifier. If the specified id is already defined, an exception is thrown and the existing definitions are not touched. If not then each character of the specification is examined and the new ones are created. The returned ObsID can then be examined for the assigned values.

Exceptions
InvalidParameter

Definition at line 380 of file RinexObsID.cpp.

Member Data Documentation

◆ cb2char

std::map< CarrierBand, char > gnsstk::RinexObsID::cb2char
static
Initial value:
{
{ CarrierBand::Any, '*' },
{ CarrierBand::L1, '1' },
{ CarrierBand::L2, '2' },
{ CarrierBand::L5, '5' },
{ CarrierBand::G1, '1' },
{ CarrierBand::G1a, '4' },
{ CarrierBand::G2a, '6' },
{ CarrierBand::G2, '2' },
{ CarrierBand::G3, '3' },
{ CarrierBand::E5b, '7' },
{ CarrierBand::E6, '6' },
{ CarrierBand::B1, '2' },
{ CarrierBand::B2, '7' },
{ CarrierBand::B3, '6' },
{ CarrierBand::I9, '9' },
}

Definition at line 289 of file RinexObsID.hpp.

◆ char2cb

std::map< char, CarrierBand > gnsstk::RinexObsID::char2cb
static
Initial value:
{
{ '*', CarrierBand::Any },
{ '1', CarrierBand::L1 },
{ '2', CarrierBand::L2 },
{ '5', CarrierBand::L5 },
{ '4', CarrierBand::G1a },
{ '6', CarrierBand::G2a },
{ '3', CarrierBand::G3 },
{ '7', CarrierBand::E5b },
{ '9', CarrierBand::I9 },
}

Definition at line 286 of file RinexObsID.hpp.

◆ char2ot

std::map< char, ObservationType > gnsstk::RinexObsID::char2ot
static
Initial value:

These strings are used to translate this object to and from a string id

Definition at line 285 of file RinexObsID.hpp.

◆ char2tc

std::map< char, TrackingCode > gnsstk::RinexObsID::char2tc
static
Initial value:

Definition at line 287 of file RinexObsID.hpp.

◆ map1to3sys

std::map< std::string, std::string > gnsstk::RinexObsID::map1to3sys
static
Initial value:
{
{ "G", "GPS" },
{ "R", "GLO" },
{ "E", "GAL" },
{ "S", "GEO" },
{ "C", "BDS" },
{ "J", "QZS" },
{ "I", "IRN" }
}

These maps transform between 1-char and 3-char system descriptors, e.g. map1to3sys["G"] = "GPS" and map3to1sys["GPS"] = "G"

Definition at line 266 of file RinexObsID.hpp.

◆ map3to1sys

std::map< std::string, std::string > gnsstk::RinexObsID::map3to1sys
static
Initial value:
{
{ "GPS", "G" },
{ "GLO", "R" },
{ "GAL", "E" },
{ "GEO", "S" },
{ "BDS", "C" },
{ "QZS", "J" },
{ "IRN", "I" }
}

Definition at line 267 of file RinexObsID.hpp.

◆ ot2char

std::map< ObservationType, char > gnsstk::RinexObsID::ot2char
static
Initial value:

Definition at line 288 of file RinexObsID.hpp.

◆ rinexVersion

double gnsstk::RinexObsID::rinexVersion

Kludge for Rinex 3.02. This defaults to Rinex3ObsBase::currentVersion. When constructed from a RINEX 3 obs ID string, the version is specified in that constructor and retained here so that when returning this object to a string, it returns to its original form by default. This can be overridden in a multitude of ways:

  • Change the value of rinexVersion. This is a little tedious as it would need to be done for each object being rendered (rinexVersion is not and should not be a static data member).
  • RinexObsID::asString(double) overrides the value of rinexVersion, allowing you to render the RINEX obs ID as a specific version without changing the object being rendered.
  • Rinex3ObsHeader::dump() and Rinex3ObsHeader::operator<<() will automatically use RinexObsID::asString(double) with the RINEX version defined in the Rinex3ObsHeader object. This means when using Rinex3ObsHeader to output obs IDs, it will automatically use the appropriate version for the header. The upshot of this is that if you read a 3.02 header, you can simply change Rinex3ObsHeader::version to 3.04 and when you output the object, it will correctly use 3.04 obs IDs.
  • Rinex3ObsHeader::dump(double) allows you to dump the header contents using a specific RINEX version format (including header fields) without changing the header object itself.
    Todo:
    move this into RinexObsID along with all the other RINEX-specific code at some point.

Definition at line 259 of file RinexObsID.hpp.

◆ tc2char

std::map< TrackingCode, char > gnsstk::RinexObsID::tc2char
static

Definition at line 290 of file RinexObsID.hpp.

◆ validRinexFrequencies

std::string gnsstk::RinexObsID::validRinexFrequencies
static

This string contains the (1-digit) frequency code for all RINEX systems.

Definition at line 271 of file RinexObsID.hpp.

◆ validRinexSystems

std::string gnsstk::RinexObsID::validRinexSystems
static

This string contains the system characters for all RINEX systems.

Definition at line 262 of file RinexObsID.hpp.

◆ validRinexTrackingCodes

std::map< char, std::map< char, std::string > > gnsstk::RinexObsID::validRinexTrackingCodes
static

This map[sys][freq] = valid codes gives valid tracking codes for RINEX observations given the system and frequency; eg. validRinexTrackingCodes['G']['1']="CSLXPWYMN* " The only exception is there is no pseudorange (C) on GPS L1/L2 N (codeless)

Note
These tracking code characters are ORDERED, basically 'best' to 'worst'

Definition at line 281 of file RinexObsID.hpp.


The documentation for this class was generated from the following files:
gnsstk::ObservationType::Undefined
@ Undefined
Observation type is known to be undefined (as opposed to unknown)
gnsstk::TrackingCode::YCodeless
@ YCodeless
Encrypted legacy GPS precise code, squaring codeless tracking.
gnsstk::TrackingCode::L5Q
@ L5Q
Modernized GPS L5 civil quadrature.
gnsstk::CarrierBand::G1
@ G1
GLONASS G1.
gnsstk::TrackingCode::L1OCD
@ L1OCD
GLONASS L1 OCd code.
gnsstk::TrackingCode::L2CL
@ L2CL
Modernized GPS L2 civil L code.
gnsstk::TrackingCode::L6E
@ L6E
QZSS L6 Block II E code.
gnsstk::CarrierBand::I9
@ I9
NavIC S.
gnsstk::CarrierBand::E5b
@ E5b
Galileo E5b.
gnsstk::ObservationType::Phase
@ Phase
accumulated phase, in cycles
gnsstk::TrackingCode::Y
@ Y
Encrypted legacy GPS precise code.
gnsstk::CarrierBand::Any
@ Any
Used to match any carrier band.
gnsstk::TrackingCode::L5I
@ L5I
Modernized GPS L5 civil in-phase.
gnsstk::ObservationType::Channel
@ Channel
Channel number.
gnsstk::TrackingCode::L1OCP
@ L1OCP
GLONASS L1 OCp code.
gnsstk::ObservationType::SNR
@ SNR
Signal strength, in dB-Hz.
gnsstk::ObservationType::Range
@ Range
pseudorange, in meters
gnsstk::TrackingCode::MDP
@ MDP
Modernized GPS military unique code.
gnsstk::CarrierBand::Unknown
@ Unknown
Uninitialized value.
gnsstk::CarrierBand::L2
@ L2
GPS L2, QZSS L2.
gnsstk::TrackingCode::CA
@ CA
Legacy GPS civil code.
gnsstk::ObservationType::Any
@ Any
Used to match any observation type.
gnsstk::CarrierBand::B3
@ B3
BeiDou B3.
gnsstk::CarrierBand::B1
@ B1
BeiDou B1.
gnsstk::CarrierBand::G3
@ G3
GLONASS G3.
gnsstk::TrackingCode::L2CML
@ L2CML
Modernized GPS L2 civil M+L combined tracking.
gnsstk::CarrierBand::G1a
@ G1a
GLONASS G1a.
gnsstk::TrackingCode::Ztracking
@ Ztracking
Encrypted legacy GPS precise code, codeless Z tracking.
gnsstk::CarrierBand::E5ab
@ E5ab
Galileo E5, BeiDou B2.
gnsstk::CarrierBand::L1
@ L1
GPS L1, Galileo E1, SBAS L1, QZSS L1, BeiDou L1.
gnsstk::TrackingCode::P
@ P
Legacy GPS precise code.
gnsstk::CarrierBand::G2a
@ G2a
GLONASS G2a.
gnsstk::CarrierBand::B2
@ B2
BeiDou B2b.
gnsstk::TrackingCode::L2CM
@ L2CM
Modernized GPS L2 civil M code.
gnsstk::TrackingCode::Semicodeless
@ Semicodeless
Encrypted legacy GPS precise code, other codeless tracking.
gnsstk::CarrierBand::Undefined
@ Undefined
Code is known to be undefined (as opposed to unknown)
gnsstk::ObservationType::Doppler
@ Doppler
Doppler, in Hz.
gnsstk::ObservationType::Unknown
@ Unknown
gnsstk::TrackingCode::E1ABC
@ E1ABC
Galileo E1 A+B+C combined tracking.
gnsstk::ObservationType::Iono
@ Iono
Ionospheric delay.
gnsstk::CarrierBand::E6
@ E6
Galileo E6, QZSS L6.
gnsstk::TrackingCode::Undefined
@ Undefined
Code is known to be undefined (as opposed to unknown)
gnsstk::TrackingCode::Any
@ Any
Used to match any tracking code.
gnsstk::TrackingCode::Unknown
@ Unknown
Uninitialized value.
gnsstk::CarrierBand::L5
@ L5
GPS L5, Galileo E5a, SBAS L5, QZSS L5, BeiDou B2a, NavIC L5.
gnsstk::CarrierBand::G2
@ G2
GLONASS G2.


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45