Store antenna phase center offset information, in AntexData objects, in a std::map with receiver/satellite name.
An entire ANTEX format file may be added to the store with a call to the function addANTEXfile(); optional input arguments allow the caller to add only receiver antennas in a given list (std::vector) and only satellites that are valid at a given time. Calling the include/exclude functions (e.g. void includeAllSatellites()) before calling addANTEXfile() controls whether satellite antennas are excluded from the store.
Names are formed by the AntexData member function name(); these names are strictly follow the IGS conventions found in the file rcvr_ant.tab and are equal to the string AntexData::type, except in the case of satellite names. Satellite names, which would be ambiguous if only AntexData::type were used, are defined to be the string AntexData::type + "/" + AntexData::serialNo. The AntexData serial number for a satellite is typically the system character followed by the PRN number, e.g. G17 or R24. Thus example names are: "ASH701945D_M SCIS" "ASH701975.01A NONE" "JPSREGANT_DD_E NONE" "LEIAT504GG NONE" "NAVAN2004T NONE" "BLOCK IIR-A/G21" "BLOCK IIR-B/G02" "BLOCK IIR-M/G12" "BLOCK IIR-M/G31" "GLONASS-M/R15" Note there is no leading or trailing, but there may be embedded, whitespace.
Definition at line 94 of file AntennaStore.hpp.
#include <AntennaStore.hpp>
Public Member Functions | |
void | addAntenna (const std::string &name, AntexData &antdata) |
int | addANTEXfile (const std::string &filename, CommonTime time=CommonTime::BEGINNING_OF_TIME) |
AntennaStore () | |
Empty constructor. More... | |
void | clear () |
clear the store of all information More... | |
Triple | ComToPcVector (const char sys, const int n, const CommonTime &ct, const Triple &satVector, bool inputPRN=true) const |
Triple | ComToPcVector (const SatID &sidr, const CommonTime &ct, const Triple &satVector) const |
void | dump (std::ostream &s=std::cout, short detail=0) |
dump the store More... | |
void | excludeAllSatellites () |
bool | getAntenna (const std::string &name, AntexData &antdata) |
void | getNames (std::vector< std::string > &names) |
Get a vector of all antenna names in the store. More... | |
void | getReceiverNames (std::vector< std::string > &names) |
Get a vector of all receiver antenna names in the store. More... | |
bool | getSatelliteAntenna (const char sys, const int n, std::string &name, AntexData &data, bool inputPRN=true) const |
void | includeAllSatellites () |
void | includeGPSSatellites () |
void | includeReceivers (std::vector< std::string > &names) |
unsigned int | size () const |
get the number of antennas stored More... | |
~AntennaStore () | |
Destructor. More... | |
Private Attributes | |
std::map< std::string, AntexData > | antennaMap |
map from name of antenna to AntexData object More... | |
int | includeSats |
std::vector< std::string > | namesToInclude |
List of receiver names to include in store. More... | |
|
inline |
Empty constructor.
Definition at line 98 of file AntennaStore.hpp.
|
inline |
Destructor.
Definition at line 101 of file AntennaStore.hpp.
Add the given name, AntexData pair. If the name already exists in the store, replace the data for it with the input object.
Definition at line 59 of file AntennaStore.cpp.
int gnsstk::AntennaStore::addANTEXfile | ( | const std::string & | filename, |
CommonTime | time = CommonTime::BEGINNING_OF_TIME |
||
) |
Open and read an ANTEX format file with the given name, and read it. Add to the store all the receivers with names in the given std::vector, if it has been provided in a previous call to includeReceivers(), otherwise include all receiver antennas found. NB. call includeSats() or includeGPSsats() to include satellite antennas, before calling this routine.
filename | the name of the ANTEX file to read. |
time | the time (any) of interest, used to choose valid satellites |
any | exception caught during reading the file. |
Definition at line 214 of file AntennaStore.cpp.
|
inline |
clear the store of all information
Definition at line 149 of file AntennaStore.hpp.
Triple gnsstk::AntennaStore::ComToPcVector | ( | const char | sys, |
const int | n, | ||
const CommonTime & | ct, | ||
const Triple & | satVector, | ||
bool | inputPRN = true |
||
) | const |
Compute the vector from the SV Center of Mass (COM) to the phase center of the antenna. Satellites are identified by two things: system character: G or blank GPS, R GLONASS, E GALILEO, M MIXED, C BeiDou and integer PRN or SVN number. NB. PRNs apply to GLONASS as well as GPS NB. Typically there is more than one antenna per satellite in ANTEX files; after calling include...Satellites(), when the store is loaded using addANTEXfile(), a time tag should be passed as input; this will load only the satellites valid at that time tag - most likely exactly one per sys/PRN.
sys | System character for the satellite: G,R,E or M |
n | PRN (or SVN) of the satellite |
inputPRN | If false, parameter n is SVN not PRN (default true). |
InvalidRequest | if no data available |
Definition at line 342 of file AntennaStore.cpp.
Triple gnsstk::AntennaStore::ComToPcVector | ( | const SatID & | sidr, |
const CommonTime & | ct, | ||
const Triple & | satVector | ||
) | const |
Same as above except with different calling sequence for convenience
Definition at line 471 of file AntennaStore.cpp.
void gnsstk::AntennaStore::dump | ( | std::ostream & | s = std::cout , |
short | detail = 0 |
||
) |
dump the store
Definition at line 520 of file AntennaStore.cpp.
|
inline |
call to have satellite antennas excluded from store (the default). NB. call before addAntenna() or addANTEXfile()
Definition at line 167 of file AntennaStore.hpp.
Get the antenna data for the given name from the store.
Definition at line 82 of file AntennaStore.cpp.
void gnsstk::AntennaStore::getNames | ( | std::vector< std::string > & | names | ) |
Get a vector of all antenna names in the store.
Definition at line 142 of file AntennaStore.cpp.
void gnsstk::AntennaStore::getReceiverNames | ( | std::vector< std::string > & | names | ) |
Get a vector of all receiver antenna names in the store.
Definition at line 151 of file AntennaStore.cpp.
bool gnsstk::AntennaStore::getSatelliteAntenna | ( | const char | sys, |
const int | n, | ||
std::string & | name, | ||
AntexData & | data, | ||
bool | inputPRN = true |
||
) | const |
Get the antenna data for the given satellite from the store. Satellites are identified by two things: system character: G or blank GPS, R GLONASS, E GALILEO, M MIXED and integer PRN or SVN number. NB. PRNs apply to GLONASS as well as GPS NB. Typically there is more than one antenna per satellite in ANTEX files; after calling include...Satellites(), when the store is loaded using addANTEXfile(), a time tag should be passed as input; this will load only the satellites valid at that time tag - most likely exactly one per sys/PRN.
sys | System character for the satellite: G,R,E or M |
n | PRN (or SVN) of the satellite |
name | Output antenna (ANTEX) name for the given satellite |
data | Output antenna data for the given satellite |
inputPRN | If false, parameter n is SVN not PRN (default true). |
Definition at line 110 of file AntennaStore.cpp.
|
inline |
call to have satellite antennas included in store NB. call before addAntenna() or addANTEXfile()
Definition at line 155 of file AntennaStore.hpp.
|
inline |
call to have satellite antennas included in store NB. call before addAntenna() or addANTEXfile()
Definition at line 161 of file AntennaStore.hpp.
void gnsstk::AntennaStore::includeReceivers | ( | std::vector< std::string > & | names | ) |
call to give the store a list of receiver antenna names so that only those names will be included in the store (not applicable to satellites). If there are already other names in the store, they will be removed. NB. call before addAntenna() or addANTEXfile()
Definition at line 169 of file AntennaStore.cpp.
|
inline |
get the number of antennas stored
Definition at line 146 of file AntennaStore.hpp.
|
private |
map from name of antenna to AntexData object
Definition at line 232 of file AntennaStore.hpp.
|
private |
flags determining which types of satellite antennas will be added 0 = no sats; 1 = GPS sats only; >1 = all sats
Definition at line 229 of file AntennaStore.hpp.
|
private |
List of receiver names to include in store.
Definition at line 223 of file AntennaStore.hpp.