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, ClockVec > | ClockConfigMap |
Clock configuration information. More... | |
typedef std::vector< SatMetaData::ClockType > | ClockVec |
Types of clocks on a satellite (hardware-specific positional idx). More... | |
typedef std::map< SVNID, LaunchConfig > | LaunchMap |
Map SVN to launch time. More... | |
typedef std::map< SVNID, unsigned long > | NORADMap |
Map SVN to NORAD ID. More... | |
typedef std::map< SatelliteSystem, SatSet > | SatMetaMap |
Satellites grouped by system. More... | |
typedef std::multiset< SatMetaData, SatMetaDataSort > | SatSet |
Set of satellites ordered by PRN or channel/slotID. More... | |
typedef std::map< std::string, SignalSet > | SignalMap |
Map of signal set name to signal set. More... | |
typedef std::set< Signal > | SignalSet |
Set of signals that may be transmitted by a satellite. 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) |
typedef std::map<SystemBlock, ClockVec> gnsstk::SatMetaDataStore::ClockConfigMap |
Clock configuration information.
Definition at line 202 of file SatMetaDataStore.hpp.
typedef std::vector<SatMetaData::ClockType> gnsstk::SatMetaDataStore::ClockVec |
Types of clocks on a satellite (hardware-specific positional idx).
Definition at line 200 of file SatMetaDataStore.hpp.
typedef std::map<SVNID, LaunchConfig> gnsstk::SatMetaDataStore::LaunchMap |
Map SVN to launch time.
Definition at line 204 of file SatMetaDataStore.hpp.
typedef std::map<SVNID, unsigned long> gnsstk::SatMetaDataStore::NORADMap |
Map SVN to NORAD ID.
Definition at line 206 of file SatMetaDataStore.hpp.
typedef std::map<SatelliteSystem, SatSet> gnsstk::SatMetaDataStore::SatMetaMap |
Satellites grouped by system.
Definition at line 198 of file SatMetaDataStore.hpp.
typedef std::multiset<SatMetaData, SatMetaDataSort> gnsstk::SatMetaDataStore::SatSet |
Set of satellites ordered by PRN or channel/slotID.
Definition at line 196 of file SatMetaDataStore.hpp.
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.
typedef std::set<Signal> gnsstk::SatMetaDataStore::SignalSet |
Set of signals that may be transmitted by a satellite.
Definition at line 192 of file SatMetaDataStore.hpp.
|
default |
Nothin doin.
|
protected |
Add a CLOCK record to clkMap.
[in] | vals | CLOCK record in the form of an array of columns. |
[in] | lineNo | The line number of the input file being processed. |
Definition at line 348 of file SatMetaDataStore.cpp.
|
protected |
Add a LAUNCH record to launchMap.
[in] | vals | LAUNCH record in the form of an array of columns. |
[in] | lineNo | The line number of the input file being processed. |
Definition at line 380 of file SatMetaDataStore.cpp.
|
protected |
Add a NORAD record to noradMap.
[in] | vals | NORAD record in the form of an array of columns. |
[in] | lineNo | The line number of the input file being processed. |
Definition at line 420 of file SatMetaDataStore.cpp.
|
protected |
Convert a SAT record to a SatMetaData record and store it.
[in] | vals | SAT record in the form of an array of columns. |
[in] | lineNo | The line number of the input file being processed. |
Definition at line 181 of file SatMetaDataStore.cpp.
|
protected |
Convert a SIG record to a Signal object and store it.
[in] | vals | SIG record in the form of an array of columns. |
[in] | lineNo | The line number of the input file being processed. |
Definition at line 298 of file SatMetaDataStore.cpp.
|
inline |
Find a satellite in the map by searching by PRN.
[in] | prn | The satellite to find, identified by PRN (i.e. not FDMA channel/slot). |
[in] | when | The time of interest of the desired satellite. |
[out] | sat | If found the satellite's metadata. |
Definition at line 237 of file SatMetaDataStore.hpp.
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.
[in] | sys | The GNSS of the desired satellite. |
[in] | prn | The pseudo-random number identifying the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | sat | If found the satellite's metadata. |
Definition at line 447 of file SatMetaDataStore.cpp.
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
[in] | slotID | The GLONASS orbit slot ID identifying the desired satellite. |
[in] | channel | The FDMA channel identifying the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | sat | If found the satellite's metadata. |
Definition at line 531 of file SatMetaDataStore.cpp.
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.
[in] | sys | The GNSS of the desired satellite. |
[in] | svn | The system-unique space vehicle number identifying the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | sat | If found the satellite's metadata. |
Definition at line 496 of file SatMetaDataStore.cpp.
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.
[in] | sys | The GNSS of the desired satellite. |
[in] | svn | The space vehicle number identifying the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | prn | If found the satellite's pseudo-random number. |
Definition at line 585 of file SatMetaDataStore.cpp.
SatMetaDataStore::SatSet gnsstk::SatMetaDataStore::getSatsBySignal | ( | const SignalSet & | signals | ) |
Get a set of all of the SAT records that match ALL of the specified signals.
[in] | signals | The signals to match. |
Definition at line 661 of file SatMetaDataStore.cpp.
SatMetaDataStore::SatSet gnsstk::SatMetaDataStore::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 } |
||
) |
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.
[in] | signals | The signals to match. |
[in] | beginTime | The earliest time for which a SAT record may match. |
[in] | endTime | The latest time for which a SAT record may match. |
[in] | status | The desired status values of the satellite at the time range of interest (default=all). |
Definition at line 696 of file SatMetaDataStore.cpp.
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.
[in] | signals | The signals to match. |
[in] | when | The time of interest of the desired satellites. |
Definition at line 680 of file SatMetaDataStore.cpp.
|
inline |
Get the names of signal sets that include the specified signal. The "Any" enum value may be used to match as a wildcard.
[in] | band | The carrier band to match. |
[in] | code | The tracking code to match. |
[in] | nav | The navigation message format to match. |
Definition at line 338 of file SatMetaDataStore.hpp.
Get the names of signal sets that include the specified signal. The "Any" enum value may be used to match as a wildcard.
[in] | sig | The signal to match. |
Definition at line 601 of file SatMetaDataStore.cpp.
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.
[in] | signals | The signals to match. |
Definition at line 623 of file SatMetaDataStore.cpp.
|
inline |
Get the space vehicle number of a satellite in the map by searching by PRN.
[in] | sat | The ID of the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | svn | If found the satellite's vehicle number. |
Definition at line 264 of file SatMetaDataStore.hpp.
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.
[in] | sys | The GNSS of the desired satellite. |
[in] | prn | The pseudo-random number identifying the desired satellite. |
[in] | when | The time of interest of the desired satellite. |
[out] | svn | If found the satellite's vehicle number. |
Definition at line 569 of file SatMetaDataStore.cpp.
|
virtual |
Attempt to load satellite metadata from the store.
[in] | sourceName | The path to the input CSV-format file. |
Definition at line 79 of file SatMetaDataStore.cpp.
ClockConfigMap gnsstk::SatMetaDataStore::clkMap |
Map satellite block to clock types.
Definition at line 387 of file SatMetaDataStore.hpp.
LaunchMap gnsstk::SatMetaDataStore::launchMap |
Launch time of satellites.
Definition at line 389 of file SatMetaDataStore.hpp.
NORADMap gnsstk::SatMetaDataStore::noradMap |
Map SVN to NORAD ID.
Definition at line 391 of file SatMetaDataStore.hpp.
SatMetaMap gnsstk::SatMetaDataStore::satMap |
Storage of all the satellite metadata.
Definition at line 383 of file SatMetaDataStore.hpp.
SignalMap gnsstk::SatMetaDataStore::sigMap |
Map signal set name to the actual signals.
Definition at line 385 of file SatMetaDataStore.hpp.