#include <AntexData.hpp>
Inheritance diagram for AntexData:


Do not attempt to use an object that is not valid (cf. isValid()).
NB. Optional data should be accessed only if the corresponding 'valid' string is true; e.g. if(valid & validFromValid) then validFrom may be used.
NB. In calls to the 'get' routines, 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).
NB. 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.
NB. 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).
NB. 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]
NB. 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.
Definition at line 110 of file AntexData.hpp.
Public Types | |
| typedef std::map< double, double > | zenOffsetMap |
| map from zenith angle (degrees) to PC offset (millimeters) | |
| typedef std::map< double, zenOffsetMap > | 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) | |
| 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 } |
| Validity bits for the ANTEX Data NB. More... | |
Public Member Functions | |
| AntexData () | |
| Constructor. | |
| virtual | ~AntexData () |
| Destructor. | |
| virtual bool | isData () const |
| AntexData is a "data", so this function always returns true. | |
| bool | isValid (void) const |
| Convenience function returns true only if a valid object. | |
| bool | isValid (CommonTime &time) const throw () |
| std::string | name (void) const throw () |
| Generate a name from type and serial number. | |
| double | getTotalPhaseCenterOffset (const int freq, const double azimuth, const double elevation) const throw (Exception) |
| Triple | getPhaseCenterOffset (const int freq) const throw (Exception) |
| 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). | |
| double | getPhaseCenterVariation (const int freq, const double azimuth, const double elev_nadir) const throw (Exception) |
| virtual void | dump (std::ostream &s, int detail=0) const |
| Dump AntexData. | |
Public Attributes | |
| unsigned long | valid |
| Bits of valid are set when corresponding labels are found and data defined. | |
| bool | absolute |
| if true, PCOs are absolute, else they are relative to another antenna | |
| bool | 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. | |
| int | 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. | |
| int | SVN |
| PRN and SVN numbers; used only in the case of satellite antennas, and may not be present, in which case these are both -1. | |
| char | systemChar |
| system character: G or blank GPS, R GLONASS, E GALILEO, M MIXED taken from START OF FREQUENCY record (not header) | |
| unsigned int | nFreq |
| number of frequencies stored, equal to number of keys in map from "# OF FREQUENCIES" record | |
| double | azimDelta |
| delta azimuth (degrees) stored in azimZenMap equal to 0 if there is no azimuth dependence from "DAZI" record | |
| double | zenRange [3] |
| minimum, maximum and delta zenith (degrees) stored in zenOffsetMap from "ZEN1 / ZEN2 / DZEN" record | |
| CommonTime | 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 ... | |
| CommonTime | validUntil |
| 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 ... | |
| std::string | stringValidFrom |
| std::string | stringValidUntil |
| std::map< int, antennaPCOandPCVData > | freqPCVmap |
| map from frequency (1,2,...nFreq) to antennaPCOandPCVData | |
| std::string | type |
| antenna type from "TYPE / SERIAL NO" | |
| std::string | serialNo |
| antenna serial number from "TYPE / SERIAL NO" | |
| std::string | satCode |
| satellite code from "TYPE / SERIAL NO" | |
| std::string | cospar |
| satellite COSPAR ID from "TYPE / SERIAL NO" | |
| std::string | method |
| calibration method from "METH / BY / # / DATE" | |
| std::string | agency |
| agency from "METH / BY / # / DATE" | |
| int | noAntCalibrated |
| num. of ant. calibrated from "METH / BY / # / DATE" | |
| std::string | date |
| date from "METH / BY / # / DATE" | |
| std::string | sinexCode |
| name of ant. cal. model from "SINEX CODE" OPTIONAL | |
| std::vector< std::string > | commentList |
| Comments in data (OPTIONAL). | |
Static Public Attributes | |
| const std::vector< std::string > | SatelliteTypes |
| vector of type strings that identify satellites; must be kept updated. | |
AntexDataFormatStrings | |
ANTEX Data Formatting Strings | |
| const std::string | startAntennaString = "START OF ANTENNA" |
| "START OF ANTENNA" | |
| const std::string | typeSerNumString = "TYPE / SERIAL NO" |
| "TYPE / SERIAL NO" | |
| const std::string | methodString = "METH / BY / # / DATE" |
| "METH / BY / # / DATE" | |
| const std::string | daziString = "DAZI" |
| "DAZI" | |
| const std::string | zenithString = "ZEN1 / ZEN2 / DZEN" |
| "ZEN1 / ZEN2 / DZEN" | |
| const std::string | numFreqString = "# OF FREQUENCIES" |
| "# OF FREQUENCIES" | |
| const std::string | validFromString = "VALID FROM" |
| "VALID FROM" | |
| const std::string | validUntilString = "VALID UNTIL" |
| "VALID UNTIL" | |
| const std::string | sinexCodeString = "SINEX CODE" |
| "SINEX CODE" | |
| const std::string | dataCommentString = "COMMENT" |
| "COMMENT" | |
| const std::string | startFreqString = "START OF FREQUENCY" |
| "START OF FREQUENCY" | |
| const std::string | neuFreqString = "NORTH / EAST / UP" |
| "NORTH / EAST / UP" | |
| const std::string | endOfFreqString = "END OF FREQUENCY" |
| "END OF FREQUENCY" | |
| const std::string | startFreqRMSString = "START OF FREQ RMS" |
| "START OF FREQ RMS" | |
| const std::string | neuFreqRMSString = "NORTH / EAST / UP" |
| "NORTH / EAST / UP" | |
| const std::string | endOfFreqRMSString = "END OF FREQ RMS" |
| "END OF FREQ RMS" | |
| const std::string | endOfAntennaString = "END OF ANTENNA" |
| "END OF ANTENNA" | |
Protected Member Functions | |
| void | evaluateZenithMap (const double &zen, const zenOffsetMap &eomap, double &zen_lo, double &zen_hi, double &pco_lo, double &pco_hi) const throw () |
| Find zenith angles bracketing the input zenith angle within the given map, and the corresponding PCOs. | |
| virtual void | reallyPutRecord (FFStream &s) const throw (std::exception, FFStreamError, StringUtils::StringException) |
| Writes a correctly formatted record from this data to stream s. | |
| virtual void | reallyGetRecord (FFStream &s) throw (std::exception, FFStreamError, StringUtils::StringException) |
| This functions obtains Antex antenna record from the given FFStream. | |
|
|
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 169 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
map from zenith angle (degrees) to PC offset (millimeters)
Definition at line 164 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
Validity bits for the ANTEX Data NB. if version is updated, add allValid<ver> and update isValid()
Definition at line 137 of file AntexData.hpp. |
|
|
Constructor.
Definition at line 259 of file AntexData.hpp. References gpstk::BEGINNING_OF_TIME, and gpstk::END_OF_TIME. |
|
|
Destructor.
Definition at line 264 of file AntexData.hpp. |
|
||||||||||||
|
Dump AntexData. Set detail = 0 for type, serial no., sat codes only; = 1 for all information except phase center offsets, = 2 for all data. Definition at line 288 of file AntexData.cpp. References AntexData::agency, gpstk::StringUtils::asString(), AntexData::azimDelta, AntexData::azimZenMap, AntexData::commentList, AntexData::cospar, AntexData::date, AntexData::freqPCVmap, AntexData::isRxAntenna, AntexData::method, AntexData::name(), AntexData::nFreq, AntexData::noAntCalibrated, AntexData::antennaPCOandPCVData::PCOrms, AntexData::antennaPCOandPCVData::PCOvalue, AntexData::antennaPCOandPCVData::PCVvalue, gpstk::printTime(), AntexData::PRN, AntexData::satCode, AntexData::serialNo, AntexData::sinexCode, AntexData::SVN, AntexData::type, AntexData::valid, AntexData::validFrom, AntexData::validUntil, AntexData::zenOffsetMap, and AntexData::zenRange. Referenced by AntennaStore::dump(). |
|
||||||||||||||||||||||||||||
|
Find zenith angles bracketing the input zenith angle within the given map, and the corresponding PCOs.
Definition at line 408 of file AntexData.cpp. |
|
|
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). NB. see documentation of the class for coordinates, signs and application.
Definition at line 148 of file AntexData.cpp. References GPSTK_THROW. |
|
||||||||||||||||
|
Definition at line 178 of file AntexData.cpp. References GPSTK_THROW, AntexData::antennaPCOandPCVData::hasAzimuth, and AntexData::antennaPCOandPCVData::PCVvalue. |
|
||||||||||||||||
|
Definition at line 117 of file AntexData.cpp. References GPSTK_RETHROW. |
|
|
AntexData is a "data", so this function always returns true.
Reimplemented from FFData. Definition at line 267 of file AntexData.hpp. |
|
|
Definition at line 98 of file AntexData.cpp. |
|
|
Convenience function returns true only if a valid object.
Definition at line 270 of file AntexData.hpp. Referenced by AntennaStore::addANTEXfile(). |
|
|
Generate a name from type and serial number.
Definition at line 281 of file AntexData.hpp. Referenced by AntennaStore::addANTEXfile(), and AntexData::dump(). |
|
|
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.
Implements FFData. Definition at line 637 of file AntexData.cpp. References FFTextStream::formattedGetLine(), GPSTK_THROW, AntexStream::header, AntexStream::headerRead, and gpstk::StringUtils::stripTrailing(). |
|
|
Writes a correctly formatted record from this data to stream s.
Implements FFData. Definition at line 445 of file AntexData.cpp. References gpstk::StringUtils::asString(), GPSTK_THROW, AntexData::antennaPCOandPCVData::hasAzimuth, gpstk::StringUtils::leftJustify(), FFTextStream::lineNumber, AntexData::antennaPCOandPCVData::PCOrms, AntexData::antennaPCOandPCVData::PCOvalue, AntexData::antennaPCOandPCVData::PCVrms, AntexData::antennaPCOandPCVData::PCVvalue, and gpstk::StringUtils::rightJustify(). |
|
|
if true, PCOs are absolute, else they are relative to another antenna
Definition at line 201 of file AntexData.hpp. |
|
|
agency from "METH / BY / # / DATE"
Definition at line 247 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
delta azimuth (degrees) stored in azimZenMap equal to 0 if there is no azimuth dependence from "DAZI" record
Definition at line 225 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
Comments in data (OPTIONAL).
Definition at line 253 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
satellite COSPAR ID from "TYPE / SERIAL NO"
Definition at line 245 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"COMMENT"
Definition at line 68 of file AntexData.cpp. |
|
|
date from "METH / BY / # / DATE"
Definition at line 249 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"DAZI"
Definition at line 62 of file AntexData.cpp. |
|
|
"END OF ANTENNA"
Definition at line 75 of file AntexData.cpp. |
|
|
"END OF FREQ RMS"
Definition at line 74 of file AntexData.cpp. |
|
|
"END OF FREQUENCY"
Definition at line 71 of file AntexData.cpp. |
|
|
map from frequency (1,2,...nFreq) to antennaPCOandPCVData
Definition at line 240 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
if true, this is a receiver antenna, otherwise its a satellite; this flag is set based on the IGS codes kept in array SatelliteTypes. NB. 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 207 of file AntexData.hpp. Referenced by AntennaStore::addANTEXfile(), and AntexData::dump(). |
|
|
calibration method from "METH / BY / # / DATE"
Definition at line 246 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"METH / BY / # / DATE"
Definition at line 61 of file AntexData.cpp. |
|
|
"NORTH / EAST / UP"
Definition at line 73 of file AntexData.cpp. |
|
|
"NORTH / EAST / UP"
Definition at line 70 of file AntexData.cpp. |
|
|
number of frequencies stored, equal to number of keys in map from "# OF FREQUENCIES" record
Definition at line 220 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
num. of ant. calibrated from "METH / BY / # / DATE"
Definition at line 248 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"# OF FREQUENCIES"
Definition at line 64 of file AntexData.cpp. |
|
|
PRN and SVN numbers; used only in the case of satellite antennas, and may not be present, in which case these are both -1. NB. PRNs apply to GLONASS as well as GPS Definition at line 212 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
satellite code from "TYPE / SERIAL NO"
Definition at line 244 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
vector of type strings that identify satellites; must be kept updated. keep this updated from the IGS file 'rcvr_ant.tab' |
|
|
antenna serial number from "TYPE / SERIAL NO"
Definition at line 243 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
name of ant. cal. model from "SINEX CODE" OPTIONAL
Definition at line 250 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"SINEX CODE"
Definition at line 67 of file AntexData.cpp. |
|
|
"START OF ANTENNA"
Definition at line 59 of file AntexData.cpp. |
|
|
"START OF FREQ RMS"
Definition at line 72 of file AntexData.cpp. |
|
|
"START OF FREQUENCY"
Definition at line 69 of file AntexData.cpp. |
|
|
Definition at line 237 of file AntexData.hpp. |
|
|
Definition at line 237 of file AntexData.hpp. |
|
|
PRN and SVN numbers; used only in the case of satellite antennas, and may not be present, in which case these are both -1. NB. PRNs apply to GLONASS as well as GPS Definition at line 212 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
system character: G or blank GPS, R GLONASS, E GALILEO, M MIXED taken from START OF FREQUENCY record (not header)
Definition at line 216 of file AntexData.hpp. Referenced by AntennaStore::addANTEXfile(). |
|
|
antenna type from "TYPE / SERIAL NO"
Definition at line 242 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"TYPE / SERIAL NO"
Definition at line 60 of file AntexData.cpp. |
|
|
Bits of valid are set when corresponding labels are found and data defined.
Definition at line 198 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
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 236 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"VALID FROM"
Definition at line 65 of file AntexData.cpp. |
|
|
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 236 of file AntexData.hpp. Referenced by AntexData::dump(). |
|
|
"VALID UNTIL"
Definition at line 66 of file AntexData.cpp. |
|
|
"ZEN1 / ZEN2 / DZEN"
Definition at line 63 of file AntexData.cpp. |
|
|
minimum, maximum and delta zenith (degrees) stored in zenOffsetMap from "ZEN1 / ZEN2 / DZEN" record
Definition at line 229 of file AntexData.hpp. Referenced by AntexData::dump(). |
1.3.9.1