0.4.1
Loading...
Searching...
No Matches
NAV::Frequency Class Reference

Frequency definition for different satellite systems. More...

Public Types

enum  Enum : uint8_t {
  Enum_G01 ,
  Enum_G02 ,
  Enum_G05 ,
  Enum_E01 ,
  Enum_E05 ,
  Enum_E06 ,
  Enum_E07 ,
  Enum_E08 ,
  Enum_R01 ,
  Enum_R02 ,
  Enum_R03 ,
  Enum_R04 ,
  Enum_R06 ,
  Enum_B01 ,
  Enum_B02 ,
  Enum_B05 ,
  Enum_B06 ,
  Enum_B07 ,
  Enum_B08 ,
  Enum_J01 ,
  Enum_J02 ,
  Enum_J05 ,
  Enum_J06 ,
  Enum_I05 ,
  Enum_I09 ,
  Enum_S01 ,
  Enum_S05 ,
  Enum_COUNT ,
  Enum_None
}
 Satellite System enumeration with continuous range. Not usable as a mask. More...
 

Public Member Functions

size_t count () const
 Counts the amount of frequencies contained.
 
constexpr Frequency ()=default
 Default Constructor.
 
 Frequency (Enum enumeration)
 Implicit Constructor from Enum type.
 
constexpr Frequency (Frequency_ type)
 Implicit Constructor from Value type.
 
double getFrequency (int8_t num) const
 Get the frequency in [Hz].
 
Frequency getL1 () const
 Returns the L1 Frequency for each constellation.
 
SatelliteSystem getSatSys () const
 Get the satellite system for which this frequency is defined.
 
bool isFirstFrequency (const Frequency &filter) const
 Checks wether the frequency is the first in the filter (per system)
 
constexpr operator bool ()=delete
 Prevent usage: if(...)
 
constexpr operator Frequency_ () const
 Allow switch(Frequency_(type)) and comparisons.
 
 operator std::string () const
 std::string conversion operator
 
constexpr operator uint64_t () const
 int conversion operator
 
constexpr bool operator< (const Frequency &rhs) const
 Less than comparison (needed for map)
 
constexpr Frequencyoperator= (Frequency_ v)
 Assignment operator from Value type.
 
Enum toEnumeration () const
 Returns a continuous enumeration of the object.
 
std::vector< FrequencytoVector () const
 Get a vector representation of the specified Frequency.
 

Static Public Member Functions

static Frequency fromEnum (Enum enumeration)
 Constructs a new object from continuous enumeration.
 
static Frequency fromString (const std::string &typeString)
 Construct new object from std::string.
 
static constexpr std::array< Frequency, 27 > GetAll ()
 Returns a list with all possible frequencies.
 
static double GetFrequency (Frequency freq, int8_t num)
 Get the frequency in [Hz].
 
static Frequency GetL1 (Frequency freq)
 Returns the L1 Frequency for each constellation.
 
static SatelliteSystem GetSatelliteSystemForFrequency (Frequency freq)
 Get the Time System of the specified Frequency.
 
static bool IsFirstFrequency (const Frequency &freq, const Frequency &filter)
 Checks wether the given frequency is the first in the filter (per system)
 
static Enum ToEnumeration (Frequency freq)
 Get the continuous enumeration of the specified frequency.
 
static std::vector< FrequencyToVector (Frequency freq)
 Get a vector representation of the specified Frequency.
 

Private Attributes

Frequency_ value
 Internal value.
 

Friends

constexpr bool operator== (const Frequency &lhs, const Frequency &rhs)
 Equal compares values.
 

Detailed Description

Frequency definition for different satellite systems.

Definition at line 58 of file Frequency.hpp.

Member Enumeration Documentation

◆ Enum

enum NAV::Frequency::Enum : uint8_t

Satellite System enumeration with continuous range. Not usable as a mask.

Enumerator
Enum_G01 

GPS L1 (1575.42 MHz).

Enum_G02 

GPS L2 (1227.6 MHz).

Enum_G05 

GPS L5 (1176.45 MHz).

Enum_E01 

Galileo, "E1" (1575.42 MHz).

Enum_E05 

Galileo E5a (1176.45 MHz).

Enum_E06 

Galileo E6 (1278.75 MHz).

Enum_E07 

Galileo E5b (1207.14 MHz).

Enum_E08 

Galileo E5 (E5a + E5b) (1191.795MHz).

Enum_R01 

GLONASS, "G1" (1602 MHZ).

Enum_R02 

GLONASS, "G2" (1246 MHz).

Enum_R03 

GLONASS, "G3" (1202.025 MHz).

Enum_R04 

GLONASS, "G1a" (1600.995 MHZ).

Enum_R06 

GLONASS, "G2a" (1248.06 MHz).

Enum_B01 

Beidou B1 (1575.42 MHz).

Enum_B02 

Beidou B1-2 (1561.098 MHz).

Enum_B05 

Beidou B2a (1176.45 MHz).

Enum_B06 

Beidou B3 (1268.52 MHz).

Enum_B07 

Beidou B2b (1207.14 MHz).

Enum_B08 

Beidou B2 (B2a + B2b) (1191.795MHz).

Enum_J01 

QZSS L1 (1575.42 MHz).

Enum_J02 

QZSS L2 (1227.6 MHz).

Enum_J05 

QZSS L5 (1176.45 MHz).

Enum_J06 

QZSS L6 / LEX (1278.75 MHz).

Enum_I05 

IRNSS L5 (1176.45 MHz).

Enum_I09 

IRNSS S (2492.028 MHz).

Enum_S01 

SBAS L1 (1575.42 MHz).

Enum_S05 

SBAS L5 (1176.45 MHz).

Enum_COUNT 

Count variable.

Enum_None 

No Frequency.

Definition at line 62 of file Frequency.hpp.

Constructor & Destructor Documentation

◆ Frequency() [1/3]

NAV::Frequency::Frequency ( )
constexprdefault

Default Constructor.

◆ Frequency() [2/3]

NAV::Frequency::Frequency ( Frequency_ type)
inlineconstexpr

Implicit Constructor from Value type.

Parameters
[in]typeValue type to construct from

Definition at line 100 of file Frequency.hpp.

◆ Frequency() [3/3]

NAV::Frequency::Frequency ( Enum enumeration)
inline

Implicit Constructor from Enum type.

Parameters
[in]enumerationEnum type to construct from

Definition at line 106 of file Frequency.hpp.

Member Function Documentation

◆ count()

size_t NAV::Frequency::count ( ) const
nodiscard

Counts the amount of frequencies contained.

Definition at line 362 of file Frequency.cpp.

◆ fromEnum()

Frequency NAV::Frequency::fromEnum ( Frequency::Enum enumeration)
static

Constructs a new object from continuous enumeration.

Parameters
[in]enumerationContinuous enumeration of the frequency

Definition at line 55 of file Frequency.cpp.

◆ fromString()

Frequency NAV::Frequency::fromString ( const std::string & typeString)
static

Construct new object from std::string.

Parameters
[in]typeStringString representation of the frequency

Definition at line 22 of file Frequency.cpp.

◆ GetAll()

static constexpr std::array< Frequency, 27 > NAV::Frequency::GetAll ( )
inlinestaticconstexpr

Returns a list with all possible frequencies.

Definition at line 183 of file Frequency.hpp.

◆ GetFrequency()

double NAV::Frequency::GetFrequency ( Frequency freq,
int8_t num )
static

Get the frequency in [Hz].

Parameters
[in]freqFrequency to get the value for
[in]numFrequency number. Only used for GLONASS G1 and G2

Definition at line 250 of file Frequency.cpp.

◆ getFrequency()

double NAV::Frequency::getFrequency ( int8_t num) const
inlinenodiscard

Get the frequency in [Hz].

Parameters
[in]numFrequency number. Only used for GLONASS G1 and G2

Definition at line 164 of file Frequency.hpp.

◆ GetL1()

Frequency NAV::Frequency::GetL1 ( Frequency freq)
static

Returns the L1 Frequency for each constellation.

Parameters
[in]freqFrequency to get the value for

Definition at line 317 of file Frequency.cpp.

◆ getL1()

Frequency NAV::Frequency::getL1 ( ) const
inlinenodiscard

Returns the L1 Frequency for each constellation.

Definition at line 174 of file Frequency.hpp.

◆ GetSatelliteSystemForFrequency()

SatelliteSystem NAV::Frequency::GetSatelliteSystemForFrequency ( Frequency freq)
static

Get the Time System of the specified Frequency.

Parameters
[in]freqFrequency to get the satellite system for

Definition at line 240 of file Frequency.cpp.

◆ getSatSys()

SatelliteSystem NAV::Frequency::getSatSys ( ) const
inlinenodiscard

Get the satellite system for which this frequency is defined.

Definition at line 152 of file Frequency.hpp.

◆ IsFirstFrequency()

bool NAV::Frequency::IsFirstFrequency ( const Frequency & freq,
const Frequency & filter )
static

Checks wether the given frequency is the first in the filter (per system)

Parameters
[in]freqSingle Frequency
[in]filterFilter of multiple frequencies

Definition at line 480 of file Frequency.cpp.

◆ isFirstFrequency()

bool NAV::Frequency::isFirstFrequency ( const Frequency & filter) const
nodiscard

Checks wether the frequency is the first in the filter (per system)

Parameters
[in]filterFilter of multiple frequencies

Definition at line 485 of file Frequency.cpp.

◆ operator bool()

NAV::Frequency::operator bool ( )
explicitconstexprdelete

Prevent usage: if(...)

◆ operator Frequency_()

NAV::Frequency::operator Frequency_ ( ) const
inlineexplicitconstexpr

Allow switch(Frequency_(type)) and comparisons.

Definition at line 135 of file Frequency.hpp.

◆ operator std::string()

NAV::Frequency::operator std::string ( ) const
explicit

std::string conversion operator

Returns
A std::string representation of the type

Definition at line 120 of file Frequency.cpp.

◆ operator uint64_t()

NAV::Frequency::operator uint64_t ( ) const
inlineexplicitconstexpr

int conversion operator

Returns
A int representation of the type

Definition at line 141 of file Frequency.hpp.

◆ operator<()

bool NAV::Frequency::operator< ( const Frequency & rhs) const
inlineconstexpr

Less than comparison (needed for map)

Parameters
[in]rhsRight hand side of the operator
Returns
True if lhs < rhs

Definition at line 132 of file Frequency.hpp.

◆ operator=()

Frequency & NAV::Frequency::operator= ( Frequency_ v)
inlineconstexpr

Assignment operator from Value type.

Parameters
[in]vValue type to construct from
Returns
The Type type from the value type

Definition at line 121 of file Frequency.hpp.

◆ ToEnumeration()

Frequency::Enum NAV::Frequency::ToEnumeration ( Frequency freq)
static

Get the continuous enumeration of the specified frequency.

Parameters
[in]freqFrequency to get the continuous enumeration for

Definition at line 396 of file Frequency.cpp.

◆ toEnumeration()

Frequency::Enum NAV::Frequency::toEnumeration ( ) const
nodiscard

Returns a continuous enumeration of the object.

Definition at line 460 of file Frequency.cpp.

◆ ToVector()

std::vector< Frequency > NAV::Frequency::ToVector ( Frequency freq)
static

Get a vector representation of the specified Frequency.

Parameters
[in]freqFrequency to get the vector for

Definition at line 465 of file Frequency.cpp.

◆ toVector()

std::vector< Frequency > NAV::Frequency::toVector ( ) const
nodiscard

Get a vector representation of the specified Frequency.

Definition at line 475 of file Frequency.cpp.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const Frequency & lhs,
const Frequency & rhs )
friend

Equal compares values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 394 of file Frequency.hpp.

Field Documentation

◆ value

Frequency_ NAV::Frequency::value
private

Internal value.

Definition at line 219 of file Frequency.hpp.


The documentation for this class was generated from the following files: