Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
gnsstk::SatMetaDataStore Class Reference

Detailed Description

Provide a class for reading satellite metadata from a comma-separated values (CSV) file and provide methods for looking up information in that file.

There are five different record formats, each starting with a string literal that is one of "SAT", "NORAD", "LAUNCH", "CLOCK" or "SIG".

Satellite status record:

satellite status may be one of the following case sensitive options

Mapping system satellite number to NORAD identifier:

Satellite launch time:

Clock configuration (optional record, defaults to all unknown):

clock type may be one of the following case sensitive options

Signal sets are defined using multiple SIG records as follows

GNSS name may be one of the following case sensitive options

Definition at line 138 of file SatMetaDataStore.hpp.

#include <SatMetaDataStore.hpp>

Classes

class  LaunchConfig
 Launch configuration. More...
 
struct  Signal
 Specifies a single GNSS signal. More...
 
class  SVNID
 Like SatID but for SVN which is a string. More...
 
class  SystemBlock
 Key of GNSS and satellite block. More...
 

Public Types

typedef std::map< SystemBlock, ClockVecClockConfigMap
 Clock configuration information. More...
 
typedef std::vector< SatMetaData::ClockTypeClockVec
 Types of clocks on a satellite (hardware-specific positional idx). More...
 
typedef std::map< SVNID, LaunchConfigLaunchMap
 Map SVN to launch time. More...
 
typedef std::map< SVNID, unsigned long > NORADMap
 Map SVN to NORAD ID. More...
 
typedef std::map< SatelliteSystem, SatSetSatMetaMap
 Satellites grouped by system. More...
 
typedef std::multiset< SatMetaData, SatMetaDataSortSatSet
 Set of satellites ordered by PRN or channel/slotID. More...
 
typedef std::map< std::string, SignalSetSignalMap
 Map of signal set name to signal set. More...
 
typedef std::set< SignalSignalSet
 Set of signals that may be transmitted by a satellite. More...
 

Public Member Functions

bool findSat (const SatID &prn, const gnsstk::CommonTime &when, SatMetaData &sat) const
 
bool findSat (SatelliteSystem sys, uint32_t prn, const gnsstk::CommonTime &when, SatMetaData &sat) const
 
bool findSatBySlotFdma (uint32_t slotID, int32_t channel, const gnsstk::CommonTime &when, SatMetaData &sat) const
 
bool findSatBySVN (SatelliteSystem sys, const std::string &svn, const gnsstk::CommonTime &when, SatMetaData &sat) const
 
bool getPRN (SatelliteSystem sys, const std::string &svn, const gnsstk::CommonTime &when, uint32_t &prn) const
 
SatSet getSatsBySignal (const SignalSet &signals)
 
SatSet getSatsBySignal (const SignalSet &signals, const CommonTime &beginTime, const CommonTime &endTime, const std::set< SatMetaData::Status > &status={ SatMetaData::Status::Operational, SatMetaData::Status::Decommissioned, SatMetaData::Status::Test })
 
SatSet getSatsBySignal (const SignalSet &signals, const CommonTime &when)
 
std::set< std::string > getSignalSet (CarrierBand band, TrackingCode code, NavType nav) const
 
std::set< std::string > getSignalSet (const Signal &sig) const
 
std::set< std::string > getSignalSet (const SignalSet &signals) const
 
bool getSVN (const SatID &sat, const gnsstk::CommonTime &when, std::string &svn) const
 
bool getSVN (SatelliteSystem sys, uint32_t prn, const gnsstk::CommonTime &when, std::string &svn) const
 
virtual bool loadData (const std::string &sourceName)
 
 SatMetaDataStore ()=default
 Nothin doin. More...
 

Public Attributes

ClockConfigMap clkMap
 Map satellite block to clock types. More...
 
LaunchMap launchMap
 Launch time of satellites. More...
 
NORADMap noradMap
 Map SVN to NORAD ID. More...
 
SatMetaMap satMap
 Storage of all the satellite metadata. More...
 
SignalMap sigMap
 Map signal set name to the actual signals. More...
 

Protected Member Functions

bool addClock (const std::vector< std::string > &vals, unsigned long lineNo)
 
bool addLaunch (const std::vector< std::string > &vals, unsigned long lineNo)
 
bool addNORAD (const std::vector< std::string > &vals, unsigned long lineNo)
 
bool addSat (const std::vector< std::string > &vals, unsigned long lineNo)
 
bool addSignal (const std::vector< std::string > &vals, unsigned long lineNo)
 

Member Typedef Documentation

◆ ClockConfigMap

Clock configuration information.

Definition at line 202 of file SatMetaDataStore.hpp.

◆ ClockVec

Types of clocks on a satellite (hardware-specific positional idx).

Definition at line 200 of file SatMetaDataStore.hpp.

◆ LaunchMap

Map SVN to launch time.

Definition at line 204 of file SatMetaDataStore.hpp.

◆ NORADMap

typedef std::map<SVNID, unsigned long> gnsstk::SatMetaDataStore::NORADMap

Map SVN to NORAD ID.

Definition at line 206 of file SatMetaDataStore.hpp.

◆ SatMetaMap

Satellites grouped by system.

Definition at line 198 of file SatMetaDataStore.hpp.

◆ SatSet

Set of satellites ordered by PRN or channel/slotID.

Definition at line 196 of file SatMetaDataStore.hpp.

◆ SignalMap

typedef std::map<std::string, SignalSet> gnsstk::SatMetaDataStore::SignalMap

Map of signal set name to signal set.

Definition at line 194 of file SatMetaDataStore.hpp.

◆ SignalSet

Set of signals that may be transmitted by a satellite.

Definition at line 192 of file SatMetaDataStore.hpp.

Constructor & Destructor Documentation

◆ SatMetaDataStore()

gnsstk::SatMetaDataStore::SatMetaDataStore ( )
default

Nothin doin.

Member Function Documentation

◆ addClock()

bool gnsstk::SatMetaDataStore::addClock ( const std::vector< std::string > &  vals,
unsigned long  lineNo 
)
protected

Add a CLOCK record to clkMap.

Parameters
[in]valsCLOCK record in the form of an array of columns.
[in]lineNoThe line number of the input file being processed.
Returns
true if successful, false on error.

Definition at line 348 of file SatMetaDataStore.cpp.

◆ addLaunch()

bool gnsstk::SatMetaDataStore::addLaunch ( const std::vector< std::string > &  vals,
unsigned long  lineNo 
)
protected

Add a LAUNCH record to launchMap.

Parameters
[in]valsLAUNCH record in the form of an array of columns.
[in]lineNoThe line number of the input file being processed.
Returns
true if successful, false on error.

Definition at line 380 of file SatMetaDataStore.cpp.

◆ addNORAD()

bool gnsstk::SatMetaDataStore::addNORAD ( const std::vector< std::string > &  vals,
unsigned long  lineNo 
)
protected

Add a NORAD record to noradMap.

Parameters
[in]valsNORAD record in the form of an array of columns.
[in]lineNoThe line number of the input file being processed.
Returns
true if successful, false on error.

Definition at line 420 of file SatMetaDataStore.cpp.

◆ addSat()

bool gnsstk::SatMetaDataStore::addSat ( const std::vector< std::string > &  vals,
unsigned long  lineNo 
)
protected

Convert a SAT record to a SatMetaData record and store it.

Parameters
[in]valsSAT record in the form of an array of columns.
[in]lineNoThe line number of the input file being processed.
Returns
true if successful, false on error.

Definition at line 181 of file SatMetaDataStore.cpp.

◆ addSignal()

bool gnsstk::SatMetaDataStore::addSignal ( const std::vector< std::string > &  vals,
unsigned long  lineNo 
)
protected

Convert a SIG record to a Signal object and store it.

Parameters
[in]valsSIG record in the form of an array of columns.
[in]lineNoThe line number of the input file being processed.
Returns
true if successful, false on error.

Definition at line 298 of file SatMetaDataStore.cpp.

◆ findSat() [1/2]

bool gnsstk::SatMetaDataStore::findSat ( const SatID prn,
const gnsstk::CommonTime when,
SatMetaData sat 
) const
inline

Find a satellite in the map by searching by PRN.

Parameters
[in]prnThe satellite to find, identified by PRN (i.e. not FDMA channel/slot).
[in]whenThe time of interest of the desired satellite.
[out]satIf found the satellite's metadata.
Returns
true if the requested satellite mapping was found.

Definition at line 237 of file SatMetaDataStore.hpp.

◆ findSat() [2/2]

bool gnsstk::SatMetaDataStore::findSat ( SatelliteSystem  sys,
uint32_t  prn,
const gnsstk::CommonTime when,
SatMetaData sat 
) const

Find a satellite in the map by searching by PRN.

Parameters
[in]sysThe GNSS of the desired satellite.
[in]prnThe pseudo-random number identifying the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]satIf found the satellite's metadata.
Returns
true if the requested satellite mapping was found.

Definition at line 447 of file SatMetaDataStore.cpp.

◆ findSatBySlotFdma()

bool gnsstk::SatMetaDataStore::findSatBySlotFdma ( uint32_t  slotID,
int32_t  channel,
const gnsstk::CommonTime when,
SatMetaData sat 
) const

Find a GLONASS satellite in the map by searching by its orbit slotID and FDMA channel. To be a unique identification, both are necessary. This is only applicable to GLONASS FDMA SVs

Parameters
[in]slotIDThe GLONASS orbit slot ID identifying the desired satellite.
[in]channelThe FDMA channel identifying the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]satIf found the satellite's metadata.
Returns
true if the requested satellite mapping was found.

Definition at line 531 of file SatMetaDataStore.cpp.

◆ findSatBySVN()

bool gnsstk::SatMetaDataStore::findSatBySVN ( SatelliteSystem  sys,
const std::string &  svn,
const gnsstk::CommonTime when,
SatMetaData sat 
) const

Find a satellite in the map by searching by SVN.

Parameters
[in]sysThe GNSS of the desired satellite.
[in]svnThe system-unique space vehicle number identifying the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]satIf found the satellite's metadata.
Returns
true if the requested satellite mapping was found.

Definition at line 496 of file SatMetaDataStore.cpp.

◆ getPRN()

bool gnsstk::SatMetaDataStore::getPRN ( SatelliteSystem  sys,
const std::string &  svn,
const gnsstk::CommonTime when,
uint32_t &  prn 
) const

Get the pseudo-random number of a satellite in the map by searching by SVN.

Parameters
[in]sysThe GNSS of the desired satellite.
[in]svnThe space vehicle number identifying the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]prnIf found the satellite's pseudo-random number.
Returns
true if the requested satellite mapping was found.

Definition at line 585 of file SatMetaDataStore.cpp.

◆ getSatsBySignal() [1/3]

SatMetaDataStore::SatSet gnsstk::SatMetaDataStore::getSatsBySignal ( const SignalSet signals)

Get a set of all of the SAT records that match ALL of the specified signals.

Parameters
[in]signalsThe signals to match.
Returns
A set of the satellites that broadcast all of the specified signals.

Definition at line 661 of file SatMetaDataStore.cpp.

◆ getSatsBySignal() [2/3]

SatMetaDataStore::SatSet gnsstk::SatMetaDataStore::getSatsBySignal ( const SignalSet signals,
const CommonTime beginTime,
const CommonTime endTime,
const std::set< SatMetaData::Status > &  status = SatMetaData::Status::OperationalSatMetaData::Status::DecommissionedSatMetaData::Status::Test } 
)

Get a set of all of the SAT records that match ALL of the specified signals and the specified status at any time during the specified time range. Specifically, if the startTime and endTime of the SAT record overlap at all with the specified beginTime and endTime, that is considered a match.

Parameters
[in]signalsThe signals to match.
[in]beginTimeThe earliest time for which a SAT record may match.
[in]endTimeThe latest time for which a SAT record may match.
[in]statusThe desired status values of the satellite at the time range of interest (default=all).
Returns
A set of the satellites that broadcast all of the specified signals during the time range of interest.

Definition at line 696 of file SatMetaDataStore.cpp.

◆ getSatsBySignal() [3/3]

SatMetaDataStore::SatSet gnsstk::SatMetaDataStore::getSatsBySignal ( const SignalSet signals,
const CommonTime when 
)

Get a set of all of the SAT records that match ALL of the specified signals and the specified time is between the start and end time for the record.

Parameters
[in]signalsThe signals to match.
[in]whenThe time of interest of the desired satellites.
Returns
A set of the satellites that broadcast all of the specified signals at the time of interest.

Definition at line 680 of file SatMetaDataStore.cpp.

◆ getSignalSet() [1/3]

std::set<std::string> gnsstk::SatMetaDataStore::getSignalSet ( CarrierBand  band,
TrackingCode  code,
NavType  nav 
) const
inline

Get the names of signal sets that include the specified signal. The "Any" enum value may be used to match as a wildcard.

Parameters
[in]bandThe carrier band to match.
[in]codeThe tracking code to match.
[in]navThe navigation message format to match.
Returns
A set of the signal set names that include the specified signal.

Definition at line 338 of file SatMetaDataStore.hpp.

◆ getSignalSet() [2/3]

std::set< std::string > gnsstk::SatMetaDataStore::getSignalSet ( const Signal sig) const

Get the names of signal sets that include the specified signal. The "Any" enum value may be used to match as a wildcard.

Parameters
[in]sigThe signal to match.
Returns
A set of the signal set names that include the specified signal.

Definition at line 601 of file SatMetaDataStore.cpp.

◆ getSignalSet() [3/3]

std::set< std::string > gnsstk::SatMetaDataStore::getSignalSet ( const SignalSet signals) const

Get the names of signal sets that include ALL of the specified signals. The "Any" enum value may be used to match as a wildcard.

Parameters
[in]signalsThe signals to match.
Returns
A set of the signal set names that include all of the specified signals.

Definition at line 623 of file SatMetaDataStore.cpp.

◆ getSVN() [1/2]

bool gnsstk::SatMetaDataStore::getSVN ( const SatID sat,
const gnsstk::CommonTime when,
std::string &  svn 
) const
inline

Get the space vehicle number of a satellite in the map by searching by PRN.

Parameters
[in]satThe ID of the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]svnIf found the satellite's vehicle number.
Returns
true if the requested satellite mapping was found.

Definition at line 264 of file SatMetaDataStore.hpp.

◆ getSVN() [2/2]

bool gnsstk::SatMetaDataStore::getSVN ( SatelliteSystem  sys,
uint32_t  prn,
const gnsstk::CommonTime when,
std::string &  svn 
) const

Get the space vehicle number of a satellite in the map by searching by PRN.

Parameters
[in]sysThe GNSS of the desired satellite.
[in]prnThe pseudo-random number identifying the desired satellite.
[in]whenThe time of interest of the desired satellite.
[out]svnIf found the satellite's vehicle number.
Returns
true if the requested satellite mapping was found.

Definition at line 569 of file SatMetaDataStore.cpp.

◆ loadData()

bool gnsstk::SatMetaDataStore::loadData ( const std::string &  sourceName)
virtual

Attempt to load satellite metadata from the store.

Parameters
[in]sourceNameThe path to the input CSV-format file.
Returns
true if successful, false on error.

Definition at line 79 of file SatMetaDataStore.cpp.

Member Data Documentation

◆ clkMap

ClockConfigMap gnsstk::SatMetaDataStore::clkMap

Map satellite block to clock types.

Definition at line 387 of file SatMetaDataStore.hpp.

◆ launchMap

LaunchMap gnsstk::SatMetaDataStore::launchMap

Launch time of satellites.

Definition at line 389 of file SatMetaDataStore.hpp.

◆ noradMap

NORADMap gnsstk::SatMetaDataStore::noradMap

Map SVN to NORAD ID.

Definition at line 391 of file SatMetaDataStore.hpp.

◆ satMap

SatMetaMap gnsstk::SatMetaDataStore::satMap

Storage of all the satellite metadata.

Definition at line 383 of file SatMetaDataStore.hpp.

◆ sigMap

SignalMap gnsstk::SatMetaDataStore::sigMap

Map signal set name to the actual signals.

Definition at line 385 of file SatMetaDataStore.hpp.


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


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