Ginan
Loading...
Searching...
No Matches
common.hpp File Reference

Data Structures

struct  Average
 
struct  descope
 
struct  Dops
 
struct  IteratorType< OUTTYPE, INTYPE, VOIDTYPE >
 An iterator that trys to cast elements to the desired type before using them. More...
 
struct  MapIteratorType< OUTTYPE, INTYPE, KEYTYPE >
 An iterator that trys to cast elements to the desired type before using them. More...
 
struct  Typer< ITERATOR, TYPE, KEYTYPE, INTYPE >
 An object just for templating the other functions without over-verbosity. More...
 

Functions

template<typename T >
constexpr T SQR (T x)
 
template<typename T >
constexpr T POW4 (T x)
 
template<typename T >
constexpr T SQRT (T x)
 
template<typename T >
constexpr T ROUND (T x)
 
template<typename T >
constexpr T SGN (T x)
 
void lowPassFilter (Average &avg, double meas, double procNoise, double measVar=1)
 Low pass filter values.
 
void wrapPlusMinusPi (double &angle)
 Wrap angle between (-pi, pi].
 
void wrap2Pi (double &angle)
 Wrap angle between [0, 2pi)
 
double geodist (Vector3d &rs, Vector3d &rr, Vector3d &e)
 geometric distance compute geometric distance and receiver-to-satellite unit vector notes : distance includes sagnac effect correction
 
double sagnac (Vector3d &rSource, Vector3d &rDest, Vector3d vel=Vector3d::Zero())
 
void satazel (const VectorPos &pos, const VectorEcef &e, AzEl &azel)
 satellite azimuth/elevation angle
 
unsigned int crc24q (const unsigned char *buff, int len)
 crc-24q parity compute crc-24q parity for sbas, rtcm3 see reference [2] A.4.3.3 Parity
 
Dops dopCalc (const vector< AzEl > &azels)
 compute DOP (dilution of precision)
 
bool satFreqs (E_Sys sys, E_FType &frq1, E_FType &frq2, E_FType &frq3)
 Select up to three configured frequency bands for a satellite system.
 
int sisaToSva (double sisa)
 Galileo SISA value (m) to SISA index.
 
double svaToSisa (int sva)
 Galileo SISA index to SISA value (m) EUROPEAN GNSS (GALILEO) OPEN SERVICE SIGNAL-IN-SPACE INTERFACE CONTROL DOCUMENT Issue 2.0, January 2021 See Section, 5.1.12.
 
int uraToSva (double ura)
 URA value (m) to URA index.
 
double svaToUra (int sva)
 URA index to URA value (m) GLOBAL POSITIONING SYSTEM STANDARD POSITIONING SERVICE SIGNAL SPECIFICATION 2nd Ed, June 2,1995 see section - 2.5.3 User Range Accuracy.
 
void updateLamMap (const GTime &time, SatPos &obs)
 
template<typename OUT_ , typename KEYTYPE , typename VALUE >
Typer< MapIteratorType, OUT_, KEYTYPE, std::multimap< KEYTYPE, VALUE > > only (std::multimap< KEYTYPE, VALUE > &in)
 Use only a subset of a map that can be cast to a desired type.
 

Function Documentation

◆ crc24q()

unsigned int crc24q ( const unsigned char * buff,
int len )

crc-24q parity compute crc-24q parity for sbas, rtcm3 see reference [2] A.4.3.3 Parity

Parameters
buffdata
lendata length (bytes)
Here is the caller graph for this function:

◆ dopCalc()

Dops dopCalc ( const vector< AzEl > & azels)

compute DOP (dilution of precision)

Parameters
azelssatellite azimuth/elevation angles
Here is the call graph for this function:
Here is the caller graph for this function:

◆ geodist()

double geodist ( Vector3d & rs,
Vector3d & rr,
Vector3d & e )

geometric distance compute geometric distance and receiver-to-satellite unit vector notes : distance includes sagnac effect correction

Parameters
rssatellilte position (ecef at transmission) (m)
rrreceiver position (ecef at reception) (m)
eline-of-sight vector (ecef)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowPassFilter()

void lowPassFilter ( Average & avg,
double meas,
double procNoise,
double measVar = 1 )

Low pass filter values.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ only()

template<typename OUT_ , typename KEYTYPE , typename VALUE >
Typer< MapIteratorType, OUT_, KEYTYPE, std::multimap< KEYTYPE, VALUE > > only ( std::multimap< KEYTYPE, VALUE > & in)

Use only a subset of a map that can be cast to a desired type.

◆ POW4()

template<typename T >
T POW4 ( T x)
constexpr
Here is the caller graph for this function:

◆ ROUND()

template<typename T >
T ROUND ( T x)
constexpr

◆ sagnac()

double sagnac ( Vector3d & rSource,
Vector3d & rDest,
Vector3d vel = Vector3d::Zero() )
Here is the caller graph for this function:

◆ satazel()

void satazel ( const VectorPos & pos,
const VectorEcef & e,
AzEl & azel )

satellite azimuth/elevation angle

Parameters
posgeodetic position
ereceiver-to-satellilte unit vector
azelazimuth/elevation {az,el} (rad)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ satFreqs()

bool satFreqs ( E_Sys sys,
E_FType & ft1,
E_FType & ft2,
E_FType & ft3 )

Select up to three configured frequency bands for a satellite system.

This is the legacy frequency selector used by several modelling paths outside slip detection. It follows acsConfig.code_priorities[sys] and converts the first unique codes into frequency bands, but it does not inspect a particular observation to confirm that measurements are present.

The outputs retain historical defaults (F1, F2, F5) when priorities are incomplete. Do not use this helper when the algorithm must know which frequencies are actually observed at the current epoch; use obsFreqs() for slip detection.

Parameters
[in]sysSatellite system.
[out]ft1First configured frequency band.
[out]ft2Second configured frequency band.
[out]ft3Third configured frequency band.
Returns
false only when no code priorities exist for sys; true otherwise.
Here is the caller graph for this function:

◆ SGN()

template<typename T >
T SGN ( T x)
constexpr
Here is the caller graph for this function:

◆ sisaToSva()

int sisaToSva ( double sisa)

Galileo SISA value (m) to SISA index.

Here is the caller graph for this function:

◆ SQR()

template<typename T >
T SQR ( T x)
constexpr

◆ SQRT()

template<typename T >
T SQRT ( T x)
constexpr
Here is the caller graph for this function:

◆ svaToSisa()

double svaToSisa ( int sva)

Galileo SISA index to SISA value (m) EUROPEAN GNSS (GALILEO) OPEN SERVICE SIGNAL-IN-SPACE INTERFACE CONTROL DOCUMENT Issue 2.0, January 2021 See Section, 5.1.12.

Signal In Space Accuracy (SISA)

Here is the caller graph for this function:

◆ svaToUra()

double svaToUra ( int sva)

URA index to URA value (m) GLOBAL POSITIONING SYSTEM STANDARD POSITIONING SERVICE SIGNAL SPECIFICATION 2nd Ed, June 2,1995 see section - 2.5.3 User Range Accuracy.

Here is the caller graph for this function:

◆ updateLamMap()

void updateLamMap ( const GTime & time,
SatPos & obs )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uraToSva()

int uraToSva ( double ura)

URA value (m) to URA index.

Here is the caller graph for this function:

◆ wrap2Pi()

void wrap2Pi ( double & angle)

Wrap angle between [0, 2pi)

Parameters
angleAngle to wrap
Here is the caller graph for this function:

◆ wrapPlusMinusPi()

void wrapPlusMinusPi ( double & angle)

Wrap angle between (-pi, pi].

Parameters
angleAngle to wrap
Here is the caller graph for this function: