Public Types | Public Member Functions | List of all members
gnss_info::NavLibraryDataSource Class Referenceabstract

Generic interface for various data sources for gnsstk::NavLibrary. More...

#include <nav_library_data_source.h>

Inheritance diagram for gnss_info::NavLibraryDataSource:
Inheritance graph
[legend]

Public Types

typedef std::function< bool(const std::string &file)> DataSourceLoadCb
 Callback to be called when a new source file is introduced. More...
 

Public Member Functions

virtual std::unordered_set< std::string > getConstellations () const =0
 Get the constellations handled by this data source. More...
 
virtual std::string getName () const =0
 Get human-readable name of the data source. More...
 
virtual std::pair< ros::Time, ros::TimegetTimeRange () const =0
 Get the time range in which this datasource can provide information. More...
 
virtual bool isApproximate () const =0
 Return whether this datasource works with approximate orbit data. More...
 
virtual bool isPrecise () const =0
 Return whether this datasource works with precise orbit data. More...
 
virtual bool load (const ros::Time &startTime, const ros::Time &endTime, const DataSourceLoadCb &cb)=0
 Load data for the given time interval. More...
 
virtual bool load (const ros::Time &time, const DataSourceLoadCb &cb)=0
 Load data for the given time instant. More...
 
 NavLibraryDataSource ()=default
 Construct the data source. More...
 
virtual ~NavLibraryDataSource ()=default
 

Detailed Description

Generic interface for various data sources for gnsstk::NavLibrary.

Definition at line 20 of file nav_library_data_source.h.

Member Typedef Documentation

◆ DataSourceLoadCb

typedef std::function<bool(const std::string& file)> gnss_info::NavLibraryDataSource::DataSourceLoadCb

Callback to be called when a new source file is introduced.

Parameters
[in]filePath to the source file.
Returns
Whether reading the source file succeeded.

Definition at line 28 of file nav_library_data_source.h.

Constructor & Destructor Documentation

◆ NavLibraryDataSource()

gnss_info::NavLibraryDataSource::NavLibraryDataSource ( )
default

Construct the data source.

Also make sure the data source is registered via gnsstk::MultiFormatNavDataFactory::addFactory() (but only once).

◆ ~NavLibraryDataSource()

virtual gnss_info::NavLibraryDataSource::~NavLibraryDataSource ( )
virtualdefault

Member Function Documentation

◆ getConstellations()

virtual std::unordered_set<std::string> gnss_info::NavLibraryDataSource::getConstellations ( ) const
pure virtual

Get the constellations handled by this data source.

Returns
The constellations.

Implemented in gnss_info::EthzSatdbDataSource.

◆ getName()

virtual std::string gnss_info::NavLibraryDataSource::getName ( ) const
pure virtual

Get human-readable name of the data source.

Returns
The name.

Implemented in gnss_info::EthzSatdbDataSource.

◆ getTimeRange()

virtual std::pair<ros::Time, ros::Time> gnss_info::NavLibraryDataSource::getTimeRange ( ) const
pure virtual

Get the time range in which this datasource can provide information.

Returns
The time range (first, latest).

Implemented in gnss_info::EthzSatdbDataSource.

◆ isApproximate()

virtual bool gnss_info::NavLibraryDataSource::isApproximate ( ) const
pure virtual

Return whether this datasource works with approximate orbit data.

Returns
Whether this datasource works with approximate orbit data.

Implemented in gnss_info::EthzSatdbDataSource.

◆ isPrecise()

virtual bool gnss_info::NavLibraryDataSource::isPrecise ( ) const
pure virtual

Return whether this datasource works with precise orbit data.

Returns
Whether this datasource works with precise orbit data.

Implemented in gnss_info::EthzSatdbDataSource.

◆ load() [1/2]

virtual bool gnss_info::NavLibraryDataSource::load ( const ros::Time startTime,
const ros::Time endTime,
const DataSourceLoadCb cb 
)
pure virtual

Load data for the given time interval.

Parameters
[in]startTimeThe time to start loading at.
[in]endTimeThe time to stop loading at.
[in]cbCallback to call for each found and downloaded data file.
Returns
Whether loading succeeded.

Implemented in gnss_info::EthzSatdbDataSource.

◆ load() [2/2]

virtual bool gnss_info::NavLibraryDataSource::load ( const ros::Time time,
const DataSourceLoadCb cb 
)
pure virtual

Load data for the given time instant.

Parameters
[in]timeThe time to load at.
[in]cbCallback to call for each found and downloaded data file.
Returns
Whether loading succeeded.

Implemented in gnss_info::EthzSatdbDataSource.


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


gnss_info
Author(s): Martin Pecka
autogenerated on Fri Nov 24 2023 03:50:35