Public Member Functions | Private Attributes | List of all members
gnss_info::NavLibraryOrbitalDataProvider Class Reference

GNSS satellite orbits provider based on gnsstk::NavLibrary with multi-format data source. More...

#include <nav_library_orbital_data_provider.h>

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

Public Member Functions

virtual void addDataSource (const std::shared_ptr< NavLibraryDataSource > &source)
 Add data source. More...
 
std::unordered_set< std::string > getConstellations () const override
 Get the constellations handled by this provider. More...
 
cras::expected< std::unordered_map< uint32_t, gnss_info_msgs::SatellitePosition >, std::string > getECEFPositions (const ros::Time &time, const std::unordered_map< uint32_t, gnss_info_msgs::SatelliteInfo > &satellites) override
 Compute ECEF positions of the satellites at the given time. More...
 
std::string getName () const override
 Get human-readable name of the provider. More...
 
cras::expected< std::unordered_map< uint32_t, gnss_info_msgs::SatelliteSkyPosition >, std::string > getSkyView (const geographic_msgs::GeoPoint &position, const std::unordered_map< uint32_t, gnss_info_msgs::SatellitePosition > &positions, double elevationMaskDeg) override
 Compute sky view (azimuths, elevations and distances) of satellites from the given receiver position. More...
 
std::pair< ros::Time, ros::TimegetTimeRange () const override
 Get the time range in which this provider can provide information. More...
 
bool isApproximate () const override
 Return whether this provider works with approximate orbit data. More...
 
bool isPrecise () const override
 Return whether this provider works with precise orbit data. More...
 
bool load (const ros::Time &startTime, const ros::Time &endTime, const cras::optional< bool > &precise) override
 Load data for the given time instant. More...
 
bool load (const ros::Time &time, const cras::optional< bool > &precise) override
 Load data for the given time instant. More...
 
 NavLibraryOrbitalDataProvider ()
 
 ~NavLibraryOrbitalDataProvider () override
 
- Public Member Functions inherited from gnss_info::OrbitalDataProvider
 OrbitalDataProvider ()=default
 Constructing the provider should be a cheap and fast operation, ideally without internet access. More...
 
virtual ~OrbitalDataProvider ()=default
 

Private Attributes

std::unique_ptr< NavLibraryOrbitalDataProviderPrivatedata
 Private implementation data (PIMPL). More...
 

Detailed Description

GNSS satellite orbits provider based on gnsstk::NavLibrary with multi-format data source.

Definition at line 26 of file nav_library_orbital_data_provider.h.

Constructor & Destructor Documentation

◆ NavLibraryOrbitalDataProvider()

gnss_info::NavLibraryOrbitalDataProvider::NavLibraryOrbitalDataProvider ( )

Definition at line 51 of file nav_library_orbital_data_provider.cpp.

◆ ~NavLibraryOrbitalDataProvider()

gnss_info::NavLibraryOrbitalDataProvider::~NavLibraryOrbitalDataProvider ( )
overridedefault

Member Function Documentation

◆ addDataSource()

void gnss_info::NavLibraryOrbitalDataProvider::addDataSource ( const std::shared_ptr< NavLibraryDataSource > &  source)
virtual

Add data source.

Parameters
[in]sourceThe data source to add.

Definition at line 59 of file nav_library_orbital_data_provider.cpp.

◆ getConstellations()

std::unordered_set< std::string > gnss_info::NavLibraryOrbitalDataProvider::getConstellations ( ) const
overridevirtual

Get the constellations handled by this provider.

Returns
The constellations.

Implements gnss_info::OrbitalDataProvider.

Definition at line 86 of file nav_library_orbital_data_provider.cpp.

◆ getECEFPositions()

cras::expected< std::unordered_map< uint32_t, gnss_info_msgs::SatellitePosition >, std::string > gnss_info::NavLibraryOrbitalDataProvider::getECEFPositions ( const ros::Time time,
const std::unordered_map< uint32_t, gnss_info_msgs::SatelliteInfo > &  satellites 
)
overridevirtual

Compute ECEF positions of the satellites at the given time.

Parameters
[in]timeThe time to get positions for.
[in]satellitesThe satellites to get positions for.
Returns
ECEF positions of the satellites, or an error string.

Implements gnss_info::OrbitalDataProvider.

Definition at line 123 of file nav_library_orbital_data_provider.cpp.

◆ getName()

std::string gnss_info::NavLibraryOrbitalDataProvider::getName ( ) const
overridevirtual

Get human-readable name of the provider.

Returns
The name.

Implements gnss_info::OrbitalDataProvider.

Definition at line 244 of file nav_library_orbital_data_provider.cpp.

◆ getSkyView()

cras::expected< std::unordered_map< uint32_t, gnss_info_msgs::SatelliteSkyPosition >, std::string > gnss_info::NavLibraryOrbitalDataProvider::getSkyView ( const geographic_msgs::GeoPoint &  position,
const std::unordered_map< uint32_t, gnss_info_msgs::SatellitePosition > &  positions,
double  elevationMaskDeg 
)
overridevirtual

Compute sky view (azimuths, elevations and distances) of satellites from the given receiver position.

Parameters
[in]positionGeographic position of the receiver.
[in]positionsECEF positions of the satellites.
[in]elevationMaskDegMinimum elevation of satellites to return (in degrees).
Returns
Sky view corresponding to the given configuration, or an error string.

Implements gnss_info::OrbitalDataProvider.

Definition at line 204 of file nav_library_orbital_data_provider.cpp.

◆ getTimeRange()

std::pair< ros::Time, ros::Time > gnss_info::NavLibraryOrbitalDataProvider::getTimeRange ( ) const
overridevirtual

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

Returns
The time range (first, latest).

Implements gnss_info::OrbitalDataProvider.

Definition at line 81 of file nav_library_orbital_data_provider.cpp.

◆ isApproximate()

bool gnss_info::NavLibraryOrbitalDataProvider::isApproximate ( ) const
overridevirtual

Return whether this provider works with approximate orbit data.

Returns
Whether this provider works with approximate orbit data.

Implements gnss_info::OrbitalDataProvider.

Definition at line 238 of file nav_library_orbital_data_provider.cpp.

◆ isPrecise()

bool gnss_info::NavLibraryOrbitalDataProvider::isPrecise ( ) const
overridevirtual

Return whether this provider works with precise orbit data.

Returns
Whether this provider works with precise orbit data.

Implements gnss_info::OrbitalDataProvider.

Definition at line 232 of file nav_library_orbital_data_provider.cpp.

◆ load() [1/2]

bool gnss_info::NavLibraryOrbitalDataProvider::load ( const ros::Time startTime,
const ros::Time endTime,
const cras::optional< bool > &  precise 
)
overridevirtual

Load data for the given time instant.

Parameters
[in]startTimeEarliest time to load.
[in]endTimeLatest time to load.
[in]preciseIf set, selects whether precise or approximate data should be loaded.
Returns
Whether loading succeeded.

Implements gnss_info::OrbitalDataProvider.

Definition at line 106 of file nav_library_orbital_data_provider.cpp.

◆ load() [2/2]

bool gnss_info::NavLibraryOrbitalDataProvider::load ( const ros::Time time,
const cras::optional< bool > &  precise 
)
overridevirtual

Load data for the given time instant.

Parameters
[in]timeThe time to load at.
[in]preciseIf set, selects whether precise or approximate data should be loaded.
Returns
Whether loading succeeded.

Implements gnss_info::OrbitalDataProvider.

Definition at line 91 of file nav_library_orbital_data_provider.cpp.

Member Data Documentation

◆ data

std::unique_ptr<NavLibraryOrbitalDataProviderPrivate> gnss_info::NavLibraryOrbitalDataProvider::data
private

Private implementation data (PIMPL).

Definition at line 57 of file nav_library_orbital_data_provider.h.


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


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