Public Member Functions | Private Attributes | List of all members
gnsstk::AntennaStore Class Reference

Detailed Description

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, AntexDataantennaMap
 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...
 

Constructor & Destructor Documentation

◆ AntennaStore()

gnsstk::AntennaStore::AntennaStore ( )
inline

Empty constructor.

Definition at line 98 of file AntennaStore.hpp.

◆ ~AntennaStore()

gnsstk::AntennaStore::~AntennaStore ( )
inline

Destructor.

Definition at line 101 of file AntennaStore.hpp.

Member Function Documentation

◆ addAntenna()

void gnsstk::AntennaStore::addAntenna ( const std::string &  name,
AntexData antdata 
)

Add the given name, AntexData pair. If the name already exists in the store, replace the data for it with the input object.

Exceptions
Exceptionif the AntexData is invalid.

Definition at line 59 of file AntennaStore.cpp.

◆ addANTEXfile()

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.

Parameters
filenamethe name of the ANTEX file to read.
timethe time (any) of interest, used to choose valid satellites
Returns
the number of antennas added.
Exceptions
anyexception caught during reading the file.

Definition at line 214 of file AntennaStore.cpp.

◆ clear()

void gnsstk::AntennaStore::clear ( )
inline

clear the store of all information

Definition at line 149 of file AntennaStore.hpp.

◆ ComToPcVector() [1/2]

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.

Parameters
sysSystem character for the satellite: G,R,E or M
nPRN (or SVN) of the satellite
inputPRNIf false, parameter n is SVN not PRN (default true).
Returns
vector (m) from COM to PC
Exceptions
InvalidRequestif no data available

Definition at line 342 of file AntennaStore.cpp.

◆ ComToPcVector() [2/2]

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.

◆ dump()

void gnsstk::AntennaStore::dump ( std::ostream &  s = std::cout,
short  detail = 0 
)

dump the store

Definition at line 520 of file AntennaStore.cpp.

◆ excludeAllSatellites()

void gnsstk::AntennaStore::excludeAllSatellites ( )
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.

◆ getAntenna()

bool gnsstk::AntennaStore::getAntenna ( const std::string &  name,
AntexData antdata 
)

Get the antenna data for the given name from the store.

Returns
true if successful, false if input name was not found in the store

Definition at line 82 of file AntennaStore.cpp.

◆ getNames()

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.

◆ getReceiverNames()

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.

◆ getSatelliteAntenna()

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.

Parameters
sysSystem character for the satellite: G,R,E or M
nPRN (or SVN) of the satellite
nameOutput antenna (ANTEX) name for the given satellite
dataOutput antenna data for the given satellite
inputPRNIf false, parameter n is SVN not PRN (default true).
Returns
true if successful, false if satellite was not found in the store

Definition at line 110 of file AntennaStore.cpp.

◆ includeAllSatellites()

void gnsstk::AntennaStore::includeAllSatellites ( )
inline

call to have satellite antennas included in store NB. call before addAntenna() or addANTEXfile()

Definition at line 155 of file AntennaStore.hpp.

◆ includeGPSSatellites()

void gnsstk::AntennaStore::includeGPSSatellites ( )
inline

call to have satellite antennas included in store NB. call before addAntenna() or addANTEXfile()

Definition at line 161 of file AntennaStore.hpp.

◆ includeReceivers()

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.

◆ size()

unsigned int gnsstk::AntennaStore::size ( ) const
inline

get the number of antennas stored

Definition at line 146 of file AntennaStore.hpp.

Member Data Documentation

◆ antennaMap

std::map<std::string, AntexData> gnsstk::AntennaStore::antennaMap
private

map from name of antenna to AntexData object

Definition at line 232 of file AntennaStore.hpp.

◆ includeSats

int gnsstk::AntennaStore::includeSats
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.

◆ namesToInclude

std::vector<std::string> gnsstk::AntennaStore::namesToInclude
private

List of receiver names to include in store.

Definition at line 223 of file AntennaStore.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44