Classes | List of all members
gnsstk::AntexData Class Reference

Detailed Description

Antex antenna data record: PCOs and PCVs for one antenna. Do not attempt to use an object that is not valid (cf. isValid()).

Note
Optional data should be accessed only if the corresponding 'valid' string is true; e.g. if(valid & validFromValid) then validFrom may be used.
In calls to the 'get' routines, freq = string("G01"); double total_PCO = getTotalPhaseCenterOffset(freq, az, el_nad); Triple PCO = getPhaseCenterOffset(freq); double PCV = getPhaseCenterVariation(freq, az, el_nad); receivers and satellites (transmitters) are treated differently, in that receivers call with elevation angle (from North-East plane toward Up) while satellites call with nadir angle (from Z axis - the bore-sight direction).
The return value of getPhaseCenterOffset is a vector (Triple) PCO, in the appropriate coordinate system (NEU for Rx, XYZ or body for SV), that is defined as the vector from the reference point (RP) to the actual phase center (PC). The RP is the ARP (Antenna Reference Point) for receivers and the COM (Center Of Mass) for satellites.
The PCV and total_PCO value returned by the other two routines has the same sense as the PCO vector; that is the total offset is defined as PCO vector - PCV * LOS where LOS is a unit vector along the line of sight (defined by the azimuth and elevation/nadir angle passed into the routines), all in the appropriate coordinate system (receiver NEU or satellite body XYZ).
Thus when correcting a measured range for the Receiver's total phase center offset one would subtract the total_PCO value (along the line of sight) from the measured range, that is (scalar equation, millimeters): Range(corr) = Range(meas) + total_PCO; // OR --> --> Range(corr) = Range(meas) + [PCO dot LOS - PCV]; however when correcting the satellite (COM) position for the Satellite's total phase center offset one would add the total vector offset (PCO - PCV*LOS) to the satellite COM (vector) position (in a consistent coordinate system, e.g. ECEF XYZ), that is (vector equation): --> --> --> --> SV(corr) = SV(COM) + [PCO - PCV * LOS]
the PCV data is stored in a map <zenith angle, value> and the getPhaseCenterVariation() routine simply interpolates this map WITHOUT changing the sign of the value - it is the same as that in the ANTEX file.
See also
gnsstk::AntexStream and gnsstk::AntexHeader.

Definition at line 120 of file AntexData.hpp.

#include <AntexData.hpp>

Inheritance diagram for gnsstk::AntexData:
Inheritance graph
[legend]

Classes

class  antennaPCOandPCVData
 

AntexDataFormatStrings

ANTEX Data Formatting Strings

enum  validBits {
  startAntennaValid = 0x00001, typeSerNumValid = 0x00002, methodValid = 0x00004, daziValid = 0x00008,
  zenithValid = 0x00010, numFreqValid = 0x00020, validFromValid = 0x00040, validUntilValid = 0x00080,
  sinexCodeValid = 0x00100, dataCommentValid = 0x00200, startFreqValid = 0x00400, neuFreqValid = 0x00800,
  endOfFreqValid = 0x01000, startFreqRMSValid = 0x02000, neuFreqRMSValid = 0x04000, endOfFreqRMSValid = 0x08000,
  endOfAntennaValid = 0x10000, allValid13 = 0x11C3F
}
 
typedef std::map< double, double > zenOffsetMap
 map from zenith angle (degrees) to PC offset (millimeters) More...
 
typedef std::map< double, zenOffsetMapazimZenMap
 
static const GNSSTK_EXPORT std::string startAntennaString = "START OF ANTENNA"
 "START OF ANTENNA" More...
 
static const GNSSTK_EXPORT std::string typeSerNumString = "TYPE / SERIAL NO"
 "TYPE / SERIAL NO" More...
 
static const GNSSTK_EXPORT std::string methodString = "METH / BY / # / DATE"
 "METH / BY / # / DATE" More...
 
static const GNSSTK_EXPORT std::string daziString = "DAZI"
 "DAZI" More...
 
static const GNSSTK_EXPORT std::string zenithString = "ZEN1 / ZEN2 / DZEN"
 "ZEN1 / ZEN2 / DZEN" More...
 
static const GNSSTK_EXPORT std::string numFreqString = "# OF FREQUENCIES"
 "# OF FREQUENCIES" More...
 
static const GNSSTK_EXPORT std::string validFromString = "VALID FROM"
 "VALID FROM" More...
 
static const GNSSTK_EXPORT std::string validUntilString = "VALID UNTIL"
 "VALID UNTIL" More...
 
static const GNSSTK_EXPORT std::string sinexCodeString = "SINEX CODE"
 "SINEX CODE" More...
 
static const GNSSTK_EXPORT std::string dataCommentString = "COMMENT"
 "COMMENT" More...
 
static const GNSSTK_EXPORT std::string startFreqString = "START OF FREQUENCY"
 "START OF FREQUENCY" More...
 
static const GNSSTK_EXPORT std::string neuFreqString = "NORTH / EAST / UP"
 "NORTH / EAST / UP" More...
 
static const GNSSTK_EXPORT std::string endOfFreqString = "END OF FREQUENCY"
 "END OF FREQUENCY" More...
 
static const GNSSTK_EXPORT std::string startFreqRMSString = "START OF FREQ RMS"
 "START OF FREQ RMS" More...
 
static const GNSSTK_EXPORT std::string neuFreqRMSString
 "NORTH / EAST / UP" More...
 
static const GNSSTK_EXPORT std::string endOfFreqRMSString = "END OF FREQ RMS"
 "END OF FREQ RMS" More...
 
static const GNSSTK_EXPORT std::string endOfAntennaString = "END OF ANTENNA"
 "END OF ANTENNA" More...
 
static const GNSSTK_EXPORT std::vector< std::string > SatelliteTypes
 
unsigned long valid
 
bool absolute
 
bool isRxAntenna
 
int PRN
 
int SVN
 
char systemChar
 
unsigned int nFreq
 
double azimDelta
 
double zenRange [3]
 
CommonTime validFrom
 
CommonTime validUntil
 
std::string stringValidFrom
 
std::string stringValidUntil
 
std::map< std::string, antennaPCOandPCVDatafreqPCVmap
 map from frequency to antennaPCOandPCVData More...
 
std::string type
 antenna type from "TYPE / SERIAL NO" More...
 
std::string serialNo
 antenna serial number from "TYPE / SERIAL NO" More...
 
std::string satCode
 satellite code from "TYPE / SERIAL NO" More...
 
std::string cospar
 satellite COSPAR ID from "TYPE / SERIAL NO" More...
 
std::string method
 calibration method from "METH / BY / # / DATE" More...
 
std::string agency
 agency from "METH / BY / # / DATE" More...
 
int noAntCalibrated
 
std::string date
 date from "METH / BY / # / DATE" More...
 
std::string sinexCode
 name of ant. cal. model from "SINEX CODE" OPTIONAL More...
 
std::vector< std::string > commentList
 comments found in the data portion of the file More...
 
 AntexData ()
 Constructor. More...
 
virtual ~AntexData ()
 Destructor. More...
 
virtual bool isData () const
 AntexData is a "data", so this function always returns true. More...
 
bool isValid () const
 Convenience function returns true only if a valid object. More...
 
bool isValid (CommonTime &time) const
 
std::string name () const
 Generate a name from type and serial number. More...
 
double getTotalPhaseCenterOffset (const std::string &freq, double azimuth, double elevation) const
 
Triple getPhaseCenterOffset (const std::string &freq) const
 
double getPhaseCenterVariation (const std::string &freq, double azimuth, double elev_nadir) const
 
virtual void dump (std::ostream &s, int detail=0) const
 
void evaluateZenithMap (double zen, const zenOffsetMap &eomap, double &zen_lo, double &zen_hi, double &pco_lo, double &pco_hi) const
 
virtual void reallyPutRecord (FFStream &s) const
 
virtual void reallyGetRecord (FFStream &s)
 
void throwRecordOutOfOrder (unsigned long test, std::string &label)
 
void ParseDataRecord (std::string &line)
 
std::string writeTime (const CommonTime &dt) const
 
CommonTime parseTime (const std::string &line) const
 

Additional Inherited Members

- Public Member Functions inherited from gnsstk::AntexBase
virtual ~AntexBase ()
 Destructor per the coding standards. More...
 
- Public Member Functions inherited from gnsstk::FFData
virtual void dump (std::ostream &s) const
 
void getRecord (FFStream &s)
 
virtual bool isHeader () const
 
void putRecord (FFStream &s) const
 
virtual ~FFData (void)
 virtual desctuctor More...
 

Member Typedef Documentation

◆ azimZenMap

typedef std::map<double, zenOffsetMap> gnsstk::AntexData::azimZenMap

map from azimuth angle (deg) to zenOffsetMap the zenOffsetMap WITHOUT azimuth dependence (NOAZI) will be azimZenMap[-1.0] (this may be the only entry)

Definition at line 197 of file AntexData.hpp.

◆ zenOffsetMap

typedef std::map<double, double> gnsstk::AntexData::zenOffsetMap

map from zenith angle (degrees) to PC offset (millimeters)

Definition at line 192 of file AntexData.hpp.

Member Enumeration Documentation

◆ validBits

Validity bits for the ANTEX Data

Note
if version is updated, add allValid<ver> and update isValid()
Enumerator
startAntennaValid 

"START OF ANTENNA" Required

typeSerNumValid 

"TYPE / SERIAL NO" Required

methodValid 

"METH / BY / # / DATE" Required

daziValid 

"DAZI" Required

zenithValid 

"ZEN1 / ZEN2 / DZEN" Required

numFreqValid 

"# OF FREQUENCIES" Required

validFromValid 

"VALID FROM"

validUntilValid 

"VALID UNTIL"

sinexCodeValid 

"SINEX CODE"

dataCommentValid 

"COMMENT"

startFreqValid 

"START OF FREQUENCY" Required

neuFreqValid 

"NORTH / EAST / UP" Required

endOfFreqValid 

"END OF FREQUENCY" Required

startFreqRMSValid 

"START OF FREQ RMS"

neuFreqRMSValid 

"NORTH / EAST / UP"

endOfFreqRMSValid 

"END OF FREQ RMS"

endOfAntennaValid 

"END OF ANTENNA" Required

allValid13 

mask for all required valid fields

Definition at line 165 of file AntexData.hpp.

Constructor & Destructor Documentation

◆ AntexData()

gnsstk::AntexData::AntexData ( )
inline

Constructor.

Definition at line 298 of file AntexData.hpp.

◆ ~AntexData()

virtual gnsstk::AntexData::~AntexData ( )
inlinevirtual

Destructor.

Definition at line 305 of file AntexData.hpp.

Member Function Documentation

◆ dump()

void gnsstk::AntexData::dump ( std::ostream &  s,
int  detail = 0 
) const
virtual

Dump AntexData. Set detail = 0 for type, serial no., sat codes only.

Parameters
[in]detail1 for all information except phase center offsets, 2 for all data.

Definition at line 378 of file AntexData.cpp.

◆ evaluateZenithMap()

void gnsstk::AntexData::evaluateZenithMap ( double  zen,
const zenOffsetMap eomap,
double &  zen_lo,
double &  zen_hi,
double &  pco_lo,
double &  pco_hi 
) const
protected

Find zenith angles bracketing the input zenith angle within the given map, and the corresponding PCOs.

Definition at line 532 of file AntexData.cpp.

◆ getPhaseCenterOffset()

Triple gnsstk::AntexData::getPhaseCenterOffset ( const std::string &  freq) const

Get the PC offset values in mm (only, NOT the phase center variations, which should be computed using getPhaseCenterVariations() and added to the PCOs to get the total phase center offset).

Note
see documentation of the class for coordinates, signs and application.
Parameters
freqfrequency (usually G01 or G02)
Returns
Triple containing offsets in millimeters, in appropriate coordinate system (satellite-based XYZ or receiver-based NEU).
Exceptions
Exceptionif this object is invalid if frequency does not exist for this data

Definition at line 205 of file AntexData.cpp.

◆ getPhaseCenterVariation()

double gnsstk::AntexData::getPhaseCenterVariation ( const std::string &  freq,
double  azimuth,
double  elev_nadir 
) const

Compute the phase center variation at the given azimuth and elev_nadir

Note
see documentation of the class for coordinates, signs and application.
Parameters
freqfrequency (usually G01 or G02)
azimuththe azimuth angle in degrees, from N going toward E for receivers, or from X going toward Y for satellites
elev_nadirelevation in deg from horizontal (North-East) plane for receivers, or nadir angle in degrees from Z axis for satellites
Returns
phase center offset in millimeters
Exceptions
Exceptionif this object is invalid if frequency does not exist for this data if azimuth is out of range, azimuth is replaced with azim % 360

Definition at line 234 of file AntexData.cpp.

◆ getTotalPhaseCenterOffset()

double gnsstk::AntexData::getTotalPhaseCenterOffset ( const std::string &  freq,
double  azimuth,
double  elevation 
) const

Compute the total phase center offset at the given azimuth and elev_nadir, including both nominal offset (PCO) and variation (PCV).

Note
see documentation of the class for coordinates, signs and application.
Parameters
freqfrequency e.g. G01
azimuththe azimuth angle in degrees, from N going toward E for receivers, or from X going toward Y for satellites
elevationelevation in deg from horizontal (North-East) plane for receivers, or nadir angle in degrees from Z axis for satellites
Returns
total phase center offset in millimeters
Exceptions
Exceptionif this object is invalid if frequency does not exist for this data if azimuth is out of range; azimuth is replaced with azim mod 360

Definition at line 169 of file AntexData.cpp.

◆ isData()

virtual bool gnsstk::AntexData::isData ( ) const
inlinevirtual

AntexData is a "data", so this function always returns true.

Reimplemented from gnsstk::FFData.

Definition at line 308 of file AntexData.hpp.

◆ isValid() [1/2]

bool gnsstk::AntexData::isValid ( ) const
inline

Convenience function returns true only if a valid object.

Definition at line 311 of file AntexData.hpp.

◆ isValid() [2/2]

bool gnsstk::AntexData::isValid ( CommonTime time) const
Returns
true if the antenna object is valid at the given time. Base on the 'validFrom' and 'validUntil' fields.
true if the input time is either BEGINNING_ or END_OF_TIME
true if the 'valid' time limits are not given.
Note
useful when adding satellite antennas for processing with a dataset; pass any time tag from the dataset.

Definition at line 125 of file AntexData.cpp.

◆ name()

string gnsstk::AntexData::name ( ) const

Generate a name from type and serial number.

Definition at line 150 of file AntexData.cpp.

◆ ParseDataRecord()

void gnsstk::AntexData::ParseDataRecord ( std::string &  line)
private

parse a line from the Antex file, filling the data object

Exceptions
FFStreamError

Definition at line 843 of file AntexData.cpp.

◆ parseTime()

CommonTime gnsstk::AntexData::parseTime ( const std::string &  line) const
private

This function constructs a CommonTime object from the line for VALID FROM and VALID UNTIL records; default is to return BEGINNING_OF_TIME.

Parameters
linethe encoded time string found in the Antex record.
Exceptions
FFStreamError

Definition at line 1087 of file AntexData.cpp.

◆ reallyGetRecord()

void gnsstk::AntexData::reallyGetRecord ( FFStream s)
protectedvirtual

This functions obtains Antex antenna record from the given FFStream. If there is an error in reading from the stream, it is reset to its original position and its fail-bit is set.

Exceptions
std::exception
StringExceptionwhen a StringUtils function fails
FFStreamErrorwhen exceptions(failbit) is set and a read or formatting error occurs. This also resets the stream to its pre-read position.

Implements gnsstk::FFData.

Definition at line 789 of file AntexData.cpp.

◆ reallyPutRecord()

void gnsstk::AntexData::reallyPutRecord ( FFStream s) const
protectedvirtual

Writes a correctly formatted record from this data to stream s.

Exceptions
std::exception
FFStreamError
StringUtils::StringException

Implements gnsstk::FFData.

Definition at line 573 of file AntexData.cpp.

◆ throwRecordOutOfOrder()

void gnsstk::AntexData::throwRecordOutOfOrder ( unsigned long  test,
std::string &  label 
)
private

helper routine to throw when records are out of order throws if valid contains test (test & valid), otherwise does nothing

Definition at line 832 of file AntexData.cpp.

◆ writeTime()

string gnsstk::AntexData::writeTime ( const CommonTime dt) const
private

Writes the CommonTime object into Antex ('VALID FROM') format. If it's a bad time, it will return blanks.

Exceptions
StringUtils::StringException

Definition at line 1145 of file AntexData.cpp.

Member Data Documentation

◆ absolute

bool gnsstk::AntexData::absolute

if true, PCOs are absolute, else they are relative to another antenna

Definition at line 234 of file AntexData.hpp.

◆ agency

std::string gnsstk::AntexData::agency

agency from "METH / BY / # / DATE"

Definition at line 285 of file AntexData.hpp.

◆ azimDelta

double gnsstk::AntexData::azimDelta

delta azimuth (degrees) stored in azimZenMap equal to 0 if there is no azimuth dependence from "DAZI" record

Definition at line 261 of file AntexData.hpp.

◆ commentList

std::vector<std::string> gnsstk::AntexData::commentList

comments found in the data portion of the file

Definition at line 293 of file AntexData.hpp.

◆ cospar

std::string gnsstk::AntexData::cospar

satellite COSPAR ID from "TYPE / SERIAL NO"

Definition at line 283 of file AntexData.hpp.

◆ dataCommentString

const string gnsstk::AntexData::dataCommentString = "COMMENT"
static

"COMMENT"

Definition at line 145 of file AntexData.hpp.

◆ date

std::string gnsstk::AntexData::date

date from "METH / BY / # / DATE"

Definition at line 288 of file AntexData.hpp.

◆ daziString

const string gnsstk::AntexData::daziString = "DAZI"
static

"DAZI"

Definition at line 133 of file AntexData.hpp.

◆ endOfAntennaString

const string gnsstk::AntexData::endOfAntennaString = "END OF ANTENNA"
static

"END OF ANTENNA"

Definition at line 159 of file AntexData.hpp.

◆ endOfFreqRMSString

const string gnsstk::AntexData::endOfFreqRMSString = "END OF FREQ RMS"
static

"END OF FREQ RMS"

Definition at line 157 of file AntexData.hpp.

◆ endOfFreqString

const string gnsstk::AntexData::endOfFreqString = "END OF FREQUENCY"
static

"END OF FREQUENCY"

Definition at line 151 of file AntexData.hpp.

◆ freqPCVmap

std::map<std::string, antennaPCOandPCVData> gnsstk::AntexData::freqPCVmap

map from frequency to antennaPCOandPCVData

Definition at line 278 of file AntexData.hpp.

◆ isRxAntenna

bool gnsstk::AntexData::isRxAntenna

if true, this is a receiver antenna, otherwise its a satellite; this flag is set based on the IGS codes kept in array SatelliteTypes.

Note
this flag need not be used, if you know which antenna you have; however if used, the array SatelliteTypes must be kept updated.

Definition at line 242 of file AntexData.hpp.

◆ method

std::string gnsstk::AntexData::method

calibration method from "METH / BY / # / DATE"

Definition at line 284 of file AntexData.hpp.

◆ methodString

const string gnsstk::AntexData::methodString = "METH / BY / # / DATE"
static

"METH / BY / # / DATE"

Definition at line 131 of file AntexData.hpp.

◆ neuFreqRMSString

const string gnsstk::AntexData::neuFreqRMSString
static
Initial value:
=
"NORTH / EAST / UP"

"NORTH / EAST / UP"

Definition at line 155 of file AntexData.hpp.

◆ neuFreqString

const string gnsstk::AntexData::neuFreqString = "NORTH / EAST / UP"
static

"NORTH / EAST / UP"

Definition at line 149 of file AntexData.hpp.

◆ nFreq

unsigned int gnsstk::AntexData::nFreq

number of frequencies stored, equal to number of keys in map from "# OF FREQUENCIES" record

Definition at line 256 of file AntexData.hpp.

◆ noAntCalibrated

int gnsstk::AntexData::noAntCalibrated

num. of ant. calibrated from "METH / BY / # / DATE"

Definition at line 286 of file AntexData.hpp.

◆ numFreqString

const string gnsstk::AntexData::numFreqString = "# OF FREQUENCIES"
static

"# OF FREQUENCIES"

Definition at line 137 of file AntexData.hpp.

◆ PRN

int gnsstk::AntexData::PRN

PRN and SVN numbers; used only in the case of satellite antennas, and may not be present, in which case these are both -1.

Note
PRNs apply to GLONASS as well as GPS

Definition at line 248 of file AntexData.hpp.

◆ satCode

std::string gnsstk::AntexData::satCode

satellite code from "TYPE / SERIAL NO"

Definition at line 282 of file AntexData.hpp.

◆ SatelliteTypes

const vector< string > gnsstk::AntexData::SatelliteTypes
static

Values of 'type' that are satellites

Note
keep this updated from the IGS file 'rcvr_ant.tab'
This list should be maintained parallel with the list in IGS file rcvr_ant.tab. See that file for additional information.

Definition at line 189 of file AntexData.hpp.

◆ serialNo

std::string gnsstk::AntexData::serialNo

antenna serial number from "TYPE / SERIAL NO"

Definition at line 281 of file AntexData.hpp.

◆ sinexCode

std::string gnsstk::AntexData::sinexCode

name of ant. cal. model from "SINEX CODE" OPTIONAL

Definition at line 290 of file AntexData.hpp.

◆ sinexCodeString

const string gnsstk::AntexData::sinexCodeString = "SINEX CODE"
static

"SINEX CODE"

Definition at line 143 of file AntexData.hpp.

◆ startAntennaString

const string gnsstk::AntexData::startAntennaString = "START OF ANTENNA"
static

"START OF ANTENNA"

Definition at line 127 of file AntexData.hpp.

◆ startFreqRMSString

const string gnsstk::AntexData::startFreqRMSString = "START OF FREQ RMS"
static

"START OF FREQ RMS"

Definition at line 153 of file AntexData.hpp.

◆ startFreqString

const string gnsstk::AntexData::startFreqString = "START OF FREQUENCY"
static

"START OF FREQUENCY"

Definition at line 147 of file AntexData.hpp.

◆ stringValidFrom

std::string gnsstk::AntexData::stringValidFrom

Definition at line 275 of file AntexData.hpp.

◆ stringValidUntil

std::string gnsstk::AntexData::stringValidUntil

Definition at line 275 of file AntexData.hpp.

◆ SVN

int gnsstk::AntexData::SVN

Definition at line 248 of file AntexData.hpp.

◆ systemChar

char gnsstk::AntexData::systemChar

system character: G or blank GPS, R GLONASS, E GALILEO, etc used only in the case of satellite antennas

Definition at line 252 of file AntexData.hpp.

◆ type

std::string gnsstk::AntexData::type

antenna type from "TYPE / SERIAL NO"

Definition at line 280 of file AntexData.hpp.

◆ typeSerNumString

const string gnsstk::AntexData::typeSerNumString = "TYPE / SERIAL NO"
static

"TYPE / SERIAL NO"

Definition at line 129 of file AntexData.hpp.

◆ valid

unsigned long gnsstk::AntexData::valid

Bits of valid are set when corresponding labels are found and data defined

Definition at line 230 of file AntexData.hpp.

◆ validFrom

CommonTime gnsstk::AntexData::validFrom

Time limits of validity (OPTIONAL); otherwise set to BEGINNING and END. From "VALID FROM" and "VALID UNTIL" records. Keep the string version for file I/O b/c sometimes the time is of the form: 1994 4 17 23 59 59.9999999 VALID UNTIL and converting this to CommonTime replaces it with ... 24 0 0.000

Definition at line 274 of file AntexData.hpp.

◆ validFromString

const string gnsstk::AntexData::validFromString = "VALID FROM"
static

"VALID FROM"

Definition at line 139 of file AntexData.hpp.

◆ validUntil

CommonTime gnsstk::AntexData::validUntil

Definition at line 274 of file AntexData.hpp.

◆ validUntilString

const string gnsstk::AntexData::validUntilString = "VALID UNTIL"
static

"VALID UNTIL"

Definition at line 141 of file AntexData.hpp.

◆ zenithString

const string gnsstk::AntexData::zenithString = "ZEN1 / ZEN2 / DZEN"
static

"ZEN1 / ZEN2 / DZEN"

Definition at line 135 of file AntexData.hpp.

◆ zenRange

double gnsstk::AntexData::zenRange[3]

minimum, maximum and delta zenith (degrees) stored in zenOffsetMap from "ZEN1 / ZEN2 / DZEN" record

Definition at line 265 of file AntexData.hpp.


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


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