Provide a high-level interface for finding navigation data. It is recommended that you use MultiFormatNavDataFactory when the intent of the program is to process navigation data from files, as this provides support for a wide variety of input file formats and GNSSes with no additional effort on your part.
Simplified example:
Definition at line 944 of file NavLibrary.hpp.
#include <NavLibrary.hpp>
Static Public Member Functions | |
static std::list< NavMessageID > | getISCNMID (const SatID &sat, const ObsID &oid) |
Protected Attributes | |
NavDataFactoryMap | factories |
void gnsstk::NavLibrary::addFactory | ( | NavDataFactoryPtr & | fact | ) |
Add a new factory to the library.
[in] | fact | The NavDataFactory object to add to the library. |
Definition at line 470 of file NavLibrary.cpp.
void gnsstk::NavLibrary::addTypeFilter | ( | NavMessageType | nmt | ) |
Add a NavMessageType to be processed to each of the factories. This should be used prior to loading data and as an alternate approach to setTypeFilter().
[in] | nmt | The NavMessageType to be processed on the next load. |
Definition at line 459 of file NavLibrary.cpp.
void gnsstk::NavLibrary::clear | ( | ) |
Remove all data from the library's factories.
Definition at line 530 of file NavLibrary.cpp.
void gnsstk::NavLibrary::clearTypeFilter | ( | ) |
Clear the type filters of each of the factories. This should be used prior to loading data, and prior to using addTypeFilter(), if that API is going to be used instead of setTypeFilter().
Definition at line 448 of file NavLibrary.cpp.
void gnsstk::NavLibrary::dump | ( | std::ostream & | s, |
DumpDetail | dl | ||
) | const |
Print the contents of all factories in a human-readable format.
[in,out] | s | The stream to write the data to. |
[in] | dl | The level of detail the output should contain. |
Definition at line 483 of file NavLibrary.cpp.
void gnsstk::NavLibrary::edit | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime | ||
) |
Remove all data from the library's factories in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
Definition at line 495 of file NavLibrary.cpp.
void gnsstk::NavLibrary::edit | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime, | ||
const NavSatelliteID & | satID | ||
) |
Remove data for a specific satellite signal from the library's factories in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
[in] | satID | The complete signal specification for the data to be removed (subject satellite, transmit satellite, system, carrier, code, nav). |
Definition at line 506 of file NavLibrary.cpp.
void gnsstk::NavLibrary::edit | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime, | ||
const NavSignalID & | signal | ||
) |
Remove data for all satellites matching a specific signal from the library's factories in the time span [fromTime,toTime).
[in] | fromTime | The earliest time to be removed. |
[in] | toTime | The earliest time that will NOT be removed. |
[in] | signal | The signal for the data to be removed (system, carrier, code, nav). |
Definition at line 518 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::find | ( | const NavMessageID & | nmid, |
const CommonTime & | when, | ||
NavDataPtr & | navOut, | ||
SVHealth | xmitHealth, | ||
NavValidityType | valid, | ||
NavSearchOrder | order | ||
) |
Search factories to find the navigation message that meets the specified criteria.
[in] | nmid | Specify the message type, satellite and codes to match. |
[in] | when | The time of interest to search for data. |
[out] | navOut | The resulting navigation message. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 390 of file NavLibrary.cpp.
NavMessageIDSet gnsstk::NavLibrary::getAvailableMsgs | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime | ||
) | const |
Obtain a set of satellites+message types for which we have data in the given time span.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 637 of file NavLibrary.cpp.
NavSatelliteIDSet gnsstk::NavLibrary::getAvailableSats | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime | ||
) | const |
Obtain a set of satellites for which we have data in the given time span.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 568 of file NavLibrary.cpp.
NavSatelliteIDSet gnsstk::NavLibrary::getAvailableSats | ( | NavMessageType | nmt, |
const CommonTime & | fromTime, | ||
const CommonTime & | toTime | ||
) | const |
Obtain a set of satellites for which we have data of a specific message type in the given time span.
[in] | nmt | The navigation message type you're looking for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 586 of file NavLibrary.cpp.
std::string gnsstk::NavLibrary::getFactoryFormats | ( | ) | const |
Return a comma-separated list of formats supported by the factories.
Definition at line 671 of file NavLibrary.cpp.
CommonTime gnsstk::NavLibrary::getFinalTime | ( | ) | const |
Determine the latest time for which this object can successfully determine the Xvt for any object.
Definition at line 555 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getHealth | ( | const NavSatelliteID & | sat, |
const CommonTime & | when, | ||
SVHealth & | healthOut, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get the health status of a satellite at a specific time.
[in] | sat | Satellite to get the health status for. |
[in] | when | The time that the health should be retrieved. |
[out] | healthOut | The health status at when. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 112 of file NavLibrary.cpp.
std::set< SatID > gnsstk::NavLibrary::getIndexSet | ( | const CommonTime & | fromTime, |
const CommonTime & | toTime | ||
) | const |
Similar to getAvailableSats() except it only returns the basic subject satellite ID, making no further distinction between codes.
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 606 of file NavLibrary.cpp.
std::set< SatID > gnsstk::NavLibrary::getIndexSet | ( | NavMessageType | nmt, |
const CommonTime & | fromTime, | ||
const CommonTime & | toTime | ||
) | const |
Similar to getAvailableSats() except it only returns the basic subject satellite ID, making no further distinction between codes.
[in] | nmt | The navigation message type you're looking for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 621 of file NavLibrary.cpp.
CommonTime gnsstk::NavLibrary::getInitialTime | ( | ) | const |
Determine the earliest time for which this object can successfully determine the Xvt for any object.
Definition at line 541 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getIonoCorr | ( | const SatID & | sat, |
const CommonTime & | when, | ||
const Position & | rxgeo, | ||
CarrierBand | band, | ||
double & | corrOut, | ||
NavType | nt = NavType::Any , |
||
int | freqOffs = 0 , |
||
bool | freqOffsWild = true |
||
) |
Get ionospheric corrections to be applied for in a single-frequency situation (i.e. when processing observation data from only one carrier frequency). Use this if you haven't already looked up the satellite's position/Xvt or ephemeris for other purposes. This method will look-up the ephemeris or almanac for the specified satellite and generate the Xvt, incurring additional overhead.
[in] | sat | The satellite to be corrected. This also ensures that the correction data comes from the same system as this satellite. |
[in] | when | The time of the observation being corrected. This time is also used to look up ionospheric correction data. |
[in] | rxgeo | The receiver's geodetic position. |
[in] | band | The carrier band of the signal being corrected (must be a valid CarrierBand, i.e. not "Any" or "Unknown", etc.) |
[out] | corrOut | The ionospheric delay, in meters, on band. |
[in] | nt | The navigation message format, e.g. GPSLNAV. This may be specified in order to make sure the ionospheric correction data comes from a specific message structure, otherwise Any is used to indicate that you don't care where it comes from (as long as sys matches). |
[in] | freqOffs | When using GLONASS FDMA satellites, specify the frequency offset for the channel. |
[in] | freqOffsWild | If false, sat is a GLONASS FDMA satellite. |
Definition at line 190 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getIonoCorr | ( | SatelliteSystem | sys, |
const CommonTime & | when, | ||
const Position & | rxgeo, | ||
const Position & | svgeo, | ||
CarrierBand | band, | ||
double & | corrOut, | ||
NavType | nt = NavType::Any |
||
) |
Get ionospheric corrections to be applied for in a single-frequency situation (i.e. when processing observation data from only one carrier frequency).
[in] | sys | The satellite system to be corrected. This also ensures that the correction data comes from this system. |
[in] | when | The time of the observation being corrected. This time is also used to look up ionospheric correction data. |
[in] | rxgeo | The receiver's geodetic position. |
[in] | svgeo | The observed satellite's geodetic position. |
[in] | band | The carrier band of the signal being corrected (must be a valid CarrierBand, i.e. not "Any" or "Unknown", etc.) |
[out] | corrOut | The ionospheric delay, in meters, on band. |
[in] | nt | The navigation message format, e.g. GPSLNAV. This may be specified in order to make sure the ionospheric correction data comes from a specific message structure, otherwise Any is used to indicate that you don't care where it comes from (as long as sys matches). |
Definition at line 162 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getISC | ( | const SatID & | sat, |
const ObsID & | oid, | ||
const CommonTime & | when, | ||
double & | corrOut, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get inter-signal corrections.
[in] | sat | The satellite whose inter-signal corrections are to be obtained. |
[in] | oid | The carrier band and tracking code of the signal to get the correction for. |
[in] | when | The time of the observation being corrected. This time is also used to look up ISC data. |
[out] | corrOut | The correction in seconds for the given band/code. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 225 of file NavLibrary.cpp.
|
static |
Get an appropriate NavMessageID to use to perform a search for ISC data for a given SatID and ObsID.
[in] | sat | The satellite whose inter-signal corrections are to be obtained. |
[in] | oid | The ObsID for which ISCs are desired. |
Definition at line 250 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getOffset | ( | TimeSystem | fromSys, |
TimeSystem | toSys, | ||
const CommonTime & | when, | ||
double & | offset, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly |
||
) |
Get the offset, in seconds, to apply to times when converting them from fromSys to toSys.
[in] | fromSys | The time system to convert from. |
[in] | toSys | The time system to convert to. |
[in] | when | The time being converted, usually in the time system appropriate for a given nav message source. The details of what time system this should be in and any other restrictions will be documented in each leaf class, e.g. GPSLNavTimeOffset. |
[out] | offset | The offset when converting fromSys->toSys where when(toSys)=when(fromSys)-offset. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
Definition at line 128 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getOffset | ( | TimeSystem | fromSys, |
TimeSystem | toSys, | ||
const CommonTime & | when, | ||
NavDataPtr & | navOut, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly |
||
) |
Get the offset as a NavDataPtr that refers to a TimeOffset object, to apply to times when converting them from fromSys to toSys.
[in] | fromSys | The time system to convert from. |
[in] | toSys | The time system to convert to. |
[in] | when | The time being converted, usually in the time system appropriate for a given nav message source. The details of what time system this should be in and any other restrictions will be documented in each leaf class, e.g. GPSLNavTimeOffset. |
[out] | navOut | The offset when converting fromSys->toSys. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
Definition at line 144 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getXvt | ( | const NavSatelliteID & | sat, |
const CommonTime & | when, | ||
Xvt & | xvt, | ||
bool | useAlm, | ||
const ObsID & | oid, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get the position and velocity of a satellite at a specific time, searching either almanac or ephemeris, as dictated by useAlm. Additionally, it allows the user to specify an ObsID to get an antenna phase center that is different from the transmitting antenna, when applicable.
[in] | sat | Satellite to get the position/velocity for. |
[in] | when | The time that the position should be computed for. |
[out] | xvt | The computed position and velocity at when. |
[in] | useAlm | If true, search for and use almanac orbital elements. If false, search for and use ephemeris data instead. |
[in] | oid | When it is possible to have different antenna phase centers on a single SV, this parameter allows you to specify a different APC than the navigation data was being transmitted from. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 64 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getXvt | ( | const NavSatelliteID & | sat, |
const CommonTime & | when, | ||
Xvt & | xvt, | ||
bool | useAlm, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get the position and velocity of a satellite at a specific time, searching either almanac or ephemeris, as dictated by useAlm.
[in] | sat | Satellite to get the position/velocity for. |
[in] | when | The time that the position should be computed for. |
[out] | xvt | The computed position and velocity at when. |
[in] | useAlm | If true, search for and use almanac orbital elements. If false, search for and use ephemeris data instead. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 52 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getXvt | ( | const NavSatelliteID & | sat, |
const CommonTime & | when, | ||
Xvt & | xvt, | ||
const ObsID & | oid, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get the position and velocity of a satellite at a specific time, searching first for a matching ephemeris, and if that fails, then attempting to search for matching almanac (as opposed to one or the other). Additionally, it allows the user to specify an ObsID to get an antenna phase center that is different from the transmitting antenna, when applicable.
[in] | sat | Satellite to get the position/velocity for. |
[in] | when | The time that the position should be computed for. |
[out] | xvt | The computed position and velocity at when. |
[in] | oid | When it is possible to have different antenna phase centers on a single SV, this parameter allows you to specify a different APC than the navigation data was being transmitted from. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 91 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::getXvt | ( | const NavSatelliteID & | sat, |
const CommonTime & | when, | ||
Xvt & | xvt, | ||
SVHealth | xmitHealth = SVHealth::Any , |
||
NavValidityType | valid = NavValidityType::ValidOnly , |
||
NavSearchOrder | order = NavSearchOrder::User |
||
) |
Get the position and velocity of a satellite at a specific time, searching first for a matching ephemeris, and if that fails, then attempting to search for a matching almanac (as opposed to one or the other).
[in] | sat | Satellite to get the position/velocity for. |
[in] | when | The time that the position should be computed for. |
[out] | xvt | The computed position and velocity at when. |
[in] | xmitHealth | The desired health status of the transmitting satellite. |
[in] | valid | Specify whether to search only for valid or invalid messages, or both. |
[in] | order | Specify whether to search by receiver behavior or by nearest to when in time. |
Definition at line 80 of file NavLibrary.cpp.
bool gnsstk::NavLibrary::isPresent | ( | const NavMessageID & | nmid, |
const CommonTime & | fromTime, | ||
const CommonTime & | toTime | ||
) |
Determine if a given message/satellite/signal is available in the factory.
[in] | nmid | The message/satellite/signal to search for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 656 of file NavLibrary.cpp.
|
inline |
Determine if a given satellite/signal is available in the factory.
[in] | nmt | The navigation message type of interest. |
[in] | satID | The satellite/signal to search for. |
[in] | fromTime | The earliest time for which any messages should be available. |
[in] | toTime | The earliest time for which any messages should be NOT available. |
Definition at line 1433 of file NavLibrary.hpp.
void gnsstk::NavLibrary::setTypeFilter | ( | const NavMessageTypeSet & | nmts | ) |
Indicate what nav message types the factories should be loading. This should be called before the factories acquire any data.
[in] | nmts | The set of nav message types to be processed by the factories. |
Definition at line 437 of file NavLibrary.cpp.
void gnsstk::NavLibrary::setValidityFilter | ( | NavValidityType | nvt | ) |
Set the factories' handling of valid and invalid navigation data. This should be called before any find() calls.
[in] | nvt | The new nav data loading filter method. |
Definition at line 426 of file NavLibrary.cpp.
|
protected |
Known nav data factories, organized by signal to make searches simpler and/or quicker.
Definition at line 1445 of file NavLibrary.hpp.