Wrapper around IGS satellite catalog which contains information about all public GNSS satellites. More...
#include <igs_satellite_metadata.h>
Public Member Functions | |
cras::optional< gnss_info_msgs::SatelliteInfo > | getSatellite (const uint32_t &satcatID, const ros::Time &time) |
Get metadata of a satellite at the given time. More... | |
cras::optional< gnss_info_msgs::SatelliteInfo > | getSatelliteByPRN (const std::string &prn, const ros::Time &time) |
Get metadata of a satellite at the given time. More... | |
cras::optional< gnss_info_msgs::SatelliteInfo > | getSatelliteByPRN (int32_t prn, const std::string &constellation, const ros::Time &time) |
Get metadata of a satellite at the given time. More... | |
std::unordered_map< uint32_t, gnss_info_msgs::SatelliteInfo > | getSatellites (const ros::Time &time, bool onlyActive=true, const std::unordered_set< std::string > &onlyConstellations={}, const std::unordered_set< std::string > &onlySignals={}) |
Get all known satellites operating at the given time. If load() was not called or returned false, empty list will be returned. More... | |
IGSSatelliteMetadata () | |
bool | load () |
Load (and possibly also download) the data. More... | |
void | setCacheFile (const std::string &file) |
Set the cache file into which the IGS metadata are downloaded. More... | |
void | setCacheValidity (const ros::WallDuration &validity) |
Set validity period of the cached IGS metadata. More... | |
void | setMetadataURL (const std::string &url) |
Set the URL from which IGS metadata are downloaded. More... | |
virtual | ~IGSSatelliteMetadata () |
Protected Attributes | |
std::unique_ptr< IGSSatelliteMetadataPrivate > | data |
Private implementation details (PIMPL). More... | |
Wrapper around IGS satellite catalog which contains information about all public GNSS satellites.
The following environment variables are considered. If not set, a sensible default is used.
GNSS_INFO_CACHE_DIR
: The directory into which cache will be downloaded.XDG_CACHE_HOME
and otherwise ~/.cache
.GNSS_INFO_IGS_METADATA_URL
: The URL from which the satellite catalog should be downloaded.GNSS_INFO_SIGNALS_PATH
: The directories containing the YAML files defining which signals are transmitted by which satellite blocks. Either a single directory path, or a colon-delimited path list. Definition at line 32 of file igs_satellite_metadata.h.
gnss_info::IGSSatelliteMetadata::IGSSatelliteMetadata | ( | ) |
Definition at line 514 of file igs_satellite_metadata.cpp.
|
virtualdefault |
cras::optional< gnss_info_msgs::SatelliteInfo > gnss_info::IGSSatelliteMetadata::getSatellite | ( | const uint32_t & | satcatID, |
const ros::Time & | time | ||
) |
Get metadata of a satellite at the given time.
[in] | satcatID | The satcat ID of the satellite. |
[in] | time | The reference time (epoch). |
active
set to false. Definition at line 636 of file igs_satellite_metadata.cpp.
cras::optional< gnss_info_msgs::SatelliteInfo > gnss_info::IGSSatelliteMetadata::getSatelliteByPRN | ( | const std::string & | prn, |
const ros::Time & | time | ||
) |
Get metadata of a satellite at the given time.
[in] | prn | The PRN of the satellite at the reference time. This should be the IGS catalog-style PRN that starts with constellation letter, e.g. E001 for Galileo PRN 1. |
[in] | time | The reference time (epoch). |
active
set to false. Definition at line 699 of file igs_satellite_metadata.cpp.
cras::optional< gnss_info_msgs::SatelliteInfo > gnss_info::IGSSatelliteMetadata::getSatelliteByPRN | ( | int32_t | prn, |
const std::string & | constellation, | ||
const ros::Time & | time | ||
) |
Get metadata of a satellite at the given time.
[in] | prn | The PRN of the satellite at the reference time. This should be the numeric PRN only, without any artificial offsets like those gpsd or NMEA add. However, the algorithm will try its best if it encounters some non-standard PRN. |
[in] | constellation | The constellation the satellite belongs to. |
[in] | time | The reference time (epoch). |
active
set to false. Definition at line 717 of file igs_satellite_metadata.cpp.
std::unordered_map< uint32_t, gnss_info_msgs::SatelliteInfo > gnss_info::IGSSatelliteMetadata::getSatellites | ( | const ros::Time & | time, |
bool | onlyActive = true , |
||
const std::unordered_set< std::string > & | onlyConstellations = {} , |
||
const std::unordered_set< std::string > & | onlySignals = {} |
||
) |
Get all known satellites operating at the given time. If load() was not called or returned false, empty list will be returned.
[in] | time | The reference time (epoch). |
[in] | onlyActive | If true, only active satellites will be returned. |
[in] | onlyConstellations | If set, only satellites from the given constellations will be returned. |
[in] | onlySignals | If set, only satellites transmitting the given signals will be returned. |
Definition at line 601 of file igs_satellite_metadata.cpp.
bool gnss_info::IGSSatelliteMetadata::load | ( | ) |
Load (and possibly also download) the data.
Definition at line 541 of file igs_satellite_metadata.cpp.
void gnss_info::IGSSatelliteMetadata::setCacheFile | ( | const std::string & | file | ) |
Set the cache file into which the IGS metadata are downloaded.
This has no effect if load() has already been called.
[in] | file | The new file. |
Definition at line 531 of file igs_satellite_metadata.cpp.
void gnss_info::IGSSatelliteMetadata::setCacheValidity | ( | const ros::WallDuration & | validity | ) |
Set validity period of the cached IGS metadata.
[in] | validity | How long the cache will be valid. |
Definition at line 536 of file igs_satellite_metadata.cpp.
void gnss_info::IGSSatelliteMetadata::setMetadataURL | ( | const std::string & | url | ) |
Set the URL from which IGS metadata are downloaded.
This has no effect if load() has already been called.
[in] | url | The new URL. |
Definition at line 526 of file igs_satellite_metadata.cpp.
|
protected |
Private implementation details (PIMPL).
Definition at line 119 of file igs_satellite_metadata.h.