AntexData.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
46 #ifndef ANTEX_DATA_HPP
47 #define ANTEX_DATA_HPP
48 
49 #include <map>
50 #include <string>
51 #include <vector>
52 
53 #include "AntexBase.hpp"
54 #include "CivilTime.hpp"
55 #include "CommonTime.hpp"
56 #include "FFStream.hpp"
57 #include "Triple.hpp"
58 #include "gnsstk_export.h"
59 
60 namespace gnsstk
61 {
63 
64 
120  class AntexData : public AntexBase
121  {
122  public:
126  GNSSTK_EXPORT
127  static const std::string startAntennaString;
128  GNSSTK_EXPORT
129  static const std::string typeSerNumString;
130  GNSSTK_EXPORT
131  static const std::string methodString;
132  GNSSTK_EXPORT
133  static const std::string daziString;
134  GNSSTK_EXPORT
135  static const std::string zenithString;
136  GNSSTK_EXPORT
137  static const std::string numFreqString;
138  GNSSTK_EXPORT
139  static const std::string validFromString;
140  GNSSTK_EXPORT
141  static const std::string validUntilString;
142  GNSSTK_EXPORT
143  static const std::string sinexCodeString;
144  GNSSTK_EXPORT
145  static const std::string dataCommentString;
146  GNSSTK_EXPORT
147  static const std::string startFreqString;
148  GNSSTK_EXPORT
149  static const std::string neuFreqString;
150  GNSSTK_EXPORT
151  static const std::string endOfFreqString;
152  GNSSTK_EXPORT
153  static const std::string startFreqRMSString;
154  GNSSTK_EXPORT
155  static const std::string neuFreqRMSString;
156  GNSSTK_EXPORT
157  static const std::string endOfFreqRMSString;
158  GNSSTK_EXPORT
159  static const std::string endOfAntennaString;
160 
161 
166  {
167  startAntennaValid = 0x00001,
168  typeSerNumValid = 0x00002,
169  methodValid = 0x00004,
170  daziValid = 0x00008,
171  zenithValid = 0x00010,
172  numFreqValid = 0x00020,
173  validFromValid = 0x00040,
174  validUntilValid = 0x00080,
175  sinexCodeValid = 0x00100,
176  dataCommentValid = 0x00200,
177  startFreqValid = 0x00400,
178  neuFreqValid = 0x00800,
179  endOfFreqValid = 0x01000,
180  startFreqRMSValid = 0x02000,
181  neuFreqRMSValid = 0x04000,
182  endOfFreqRMSValid = 0x08000,
183  endOfAntennaValid = 0x10000,
184  allValid13 = 0x11C3F
185  };
186 
189  GNSSTK_EXPORT static const std::vector<std::string> SatelliteTypes;
190 
192  typedef std::map<double, double> zenOffsetMap;
193 
197  typedef std::map<double, zenOffsetMap> azimZenMap;
198 
204  {
205  public:
210  double PCOvalue[3], PCOrms[3];
211 
215 
223 
224  }; // end of class antennaPCOandPCVData
225 
226  // member data
227 
230  unsigned long valid;
231 
234  bool absolute;
235 
243 
248  int PRN, SVN;
249 
253 
256  unsigned int nFreq;
257 
261  double azimDelta;
262 
265  double zenRange[3];
266 
276 
278  std::map<std::string, antennaPCOandPCVData> freqPCVmap;
279 
280  std::string type;
281  std::string serialNo;
282  std::string satCode;
283  std::string cospar;
284  std::string method;
285  std::string agency;
287  std::string date;
289  std::string
291 
293  std::vector<std::string> commentList;
294 
295  // member functions
296 
299  : valid(0), absolute(true), PRN(0), SVN(0), nFreq(0),
302  {
303  }
305  virtual ~AntexData() {}
306 
308  virtual bool isData() const { return true; }
309 
311  bool isValid() const { return ((valid & allValid13) == allValid13); }
312 
319  bool isValid(CommonTime& time) const;
320 
322  std::string name() const;
323 
341  double getTotalPhaseCenterOffset(const std::string& freq,
342  double azimuth,
343  double elevation) const;
344 
358  Triple getPhaseCenterOffset(const std::string& freq) const;
359 
376  double getPhaseCenterVariation(const std::string& freq,
377  double azimuth,
378  double elev_nadir) const;
379 
384  virtual void dump(std::ostream& s, int detail = 0) const;
385 
386  protected:
389  void evaluateZenithMap(double zen, const zenOffsetMap& eomap,
390  double& zen_lo, double& zen_hi, double& pco_lo,
391  double& pco_hi) const;
392 
398  virtual void reallyPutRecord(FFStream& s) const;
399 
409  virtual void reallyGetRecord(FFStream& s);
410 
411  private:
415  void throwRecordOutOfOrder(unsigned long test, std::string& label);
416 
420  void ParseDataRecord(std::string& line);
421 
425  std::string writeTime(const CommonTime& dt) const;
426 
432  CommonTime parseTime(const std::string& line) const;
433 
434  }; // class AntexData
435 
437 
438 } // namespace gnsstk
439 
440 #endif
gnsstk::AntexData::ParseDataRecord
void ParseDataRecord(std::string &line)
Definition: AntexData.cpp:843
gnsstk::AntexData::isData
virtual bool isData() const
AntexData is a "data", so this function always returns true.
Definition: AntexData.hpp:308
gnsstk::AntexData::neuFreqValid
@ neuFreqValid
"NORTH / EAST / UP" Required
Definition: AntexData.hpp:178
gnsstk::AntexData::endOfAntennaValid
@ endOfAntennaValid
"END OF ANTENNA" Required
Definition: AntexData.hpp:183
gnsstk::AntexData::dump
virtual void dump(std::ostream &s, int detail=0) const
Definition: AntexData.cpp:378
gnsstk::AntexData::numFreqValid
@ numFreqValid
"# OF FREQUENCIES" Required
Definition: AntexData.hpp:172
gnsstk::AntexData::noAntCalibrated
int noAntCalibrated
Definition: AntexData.hpp:286
gnsstk::AntexData::typeSerNumString
static const GNSSTK_EXPORT std::string typeSerNumString
"TYPE / SERIAL NO"
Definition: AntexData.hpp:129
gnsstk::AntexData::dataCommentValid
@ dataCommentValid
"COMMENT"
Definition: AntexData.hpp:176
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::AntexData::validUntil
CommonTime validUntil
Definition: AntexData.hpp:274
gnsstk::BEGINNING_OF_TIME
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
gnsstk::AntexData::method
std::string method
calibration method from "METH / BY / # / DATE"
Definition: AntexData.hpp:284
gnsstk::AntexData::neuFreqRMSString
static const GNSSTK_EXPORT std::string neuFreqRMSString
"NORTH / EAST / UP"
Definition: AntexData.hpp:155
gnsstk::AntexData::validFrom
CommonTime validFrom
Definition: AntexData.hpp:274
gnsstk::AntexData::writeTime
std::string writeTime(const CommonTime &dt) const
Definition: AntexData.cpp:1145
gnsstk::AntexData::startAntennaValid
@ startAntennaValid
"START OF ANTENNA" Required
Definition: AntexData.hpp:167
gnsstk::AntexData::azimZenMap
std::map< double, zenOffsetMap > azimZenMap
Definition: AntexData.hpp:197
gnsstk::AntexData::typeSerNumValid
@ typeSerNumValid
"TYPE / SERIAL NO" Required
Definition: AntexData.hpp:168
gnsstk::AntexData::validUntilString
static const GNSSTK_EXPORT std::string validUntilString
"VALID UNTIL"
Definition: AntexData.hpp:141
gnsstk::AntexData::validUntilValid
@ validUntilValid
"VALID UNTIL"
Definition: AntexData.hpp:174
gnsstk::AntexData::PRN
int PRN
Definition: AntexData.hpp:248
gnsstk::AntexData::startFreqRMSString
static const GNSSTK_EXPORT std::string startFreqRMSString
"START OF FREQ RMS"
Definition: AntexData.hpp:153
gnsstk::AntexData::antennaPCOandPCVData::PCVvalue
azimZenMap PCVvalue
Definition: AntexData.hpp:222
gnsstk::AntexData::zenithString
static const GNSSTK_EXPORT std::string zenithString
"ZEN1 / ZEN2 / DZEN"
Definition: AntexData.hpp:135
gnsstk::AntexData::throwRecordOutOfOrder
void throwRecordOutOfOrder(unsigned long test, std::string &label)
Definition: AntexData.cpp:832
gnsstk::AntexData::getTotalPhaseCenterOffset
double getTotalPhaseCenterOffset(const std::string &freq, double azimuth, double elevation) const
Definition: AntexData.cpp:169
gnsstk::AntexData::zenOffsetMap
std::map< double, double > zenOffsetMap
map from zenith angle (degrees) to PC offset (millimeters)
Definition: AntexData.hpp:192
gnsstk::AntexData::sinexCodeString
static const GNSSTK_EXPORT std::string sinexCodeString
"SINEX CODE"
Definition: AntexData.hpp:143
gnsstk::AntexData::commentList
std::vector< std::string > commentList
comments found in the data portion of the file
Definition: AntexData.hpp:293
gnsstk::Triple
Definition: Triple.hpp:68
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::AntexData::daziValid
@ daziValid
"DAZI" Required
Definition: AntexData.hpp:170
gnsstk::AntexData::parseTime
CommonTime parseTime(const std::string &line) const
Definition: AntexData.cpp:1087
gnsstk::AntexData::antennaPCOandPCVData::PCVrms
azimZenMap PCVrms
Definition: AntexData.hpp:222
gnsstk::AntexData::startAntennaString
static const GNSSTK_EXPORT std::string startAntennaString
"START OF ANTENNA"
Definition: AntexData.hpp:127
gnsstk::AntexData::antennaPCOandPCVData::PCOvalue
double PCOvalue[3]
Definition: AntexData.hpp:210
gnsstk::AntexData::startFreqString
static const GNSSTK_EXPORT std::string startFreqString
"START OF FREQUENCY"
Definition: AntexData.hpp:147
gnsstk::AntexData::startFreqRMSValid
@ startFreqRMSValid
"START OF FREQ RMS"
Definition: AntexData.hpp:180
gnsstk::AntexData::serialNo
std::string serialNo
antenna serial number from "TYPE / SERIAL NO"
Definition: AntexData.hpp:281
gnsstk::AntexData::endOfFreqRMSValid
@ endOfFreqRMSValid
"END OF FREQ RMS"
Definition: AntexData.hpp:182
gnsstk::AntexData
Definition: AntexData.hpp:120
gnsstk::AntexData::isValid
bool isValid() const
Convenience function returns true only if a valid object.
Definition: AntexData.hpp:311
example4.time
time
Definition: example4.py:103
gnsstk::AntexData::sinexCode
std::string sinexCode
name of ant. cal. model from "SINEX CODE" OPTIONAL
Definition: AntexData.hpp:290
gnsstk::AntexData::antennaPCOandPCVData::PCOrms
double PCOrms[3]
Definition: AntexData.hpp:210
gnsstk::AntexData::methodValid
@ methodValid
"METH / BY / # / DATE" Required
Definition: AntexData.hpp:169
gnsstk::AntexData::valid
unsigned long valid
Definition: AntexData.hpp:230
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::AntexData::absolute
bool absolute
Definition: AntexData.hpp:234
gnsstk::AntexData::AntexData
AntexData()
Constructor.
Definition: AntexData.hpp:298
gnsstk::AntexData::endOfAntennaString
static const GNSSTK_EXPORT std::string endOfAntennaString
"END OF ANTENNA"
Definition: AntexData.hpp:159
gnsstk::AntexData::stringValidUntil
std::string stringValidUntil
Definition: AntexData.hpp:275
CivilTime.hpp
gnsstk::END_OF_TIME
const Epoch END_OF_TIME(CommonTime::END_OF_TIME)
Latest Representable Epoch.
gnsstk::AntexData::azimDelta
double azimDelta
Definition: AntexData.hpp:261
gnsstk::AntexData::~AntexData
virtual ~AntexData()
Destructor.
Definition: AntexData.hpp:305
gnsstk::AntexData::evaluateZenithMap
void evaluateZenithMap(double zen, const zenOffsetMap &eomap, double &zen_lo, double &zen_hi, double &pco_lo, double &pco_hi) const
Definition: AntexData.cpp:532
gnsstk::AntexData::freqPCVmap
std::map< std::string, antennaPCOandPCVData > freqPCVmap
map from frequency to antennaPCOandPCVData
Definition: AntexData.hpp:278
gnsstk::AntexData::type
std::string type
antenna type from "TYPE / SERIAL NO"
Definition: AntexData.hpp:280
gnsstk::AntexData::zenithValid
@ zenithValid
"ZEN1 / ZEN2 / DZEN" Required
Definition: AntexData.hpp:171
gnsstk::AntexData::endOfFreqRMSString
static const GNSSTK_EXPORT std::string endOfFreqRMSString
"END OF FREQ RMS"
Definition: AntexData.hpp:157
AntexBase.hpp
gnsstk::AntexData::antennaPCOandPCVData::hasAzimuth
bool hasAzimuth
Definition: AntexData.hpp:214
gnsstk::AntexData::cospar
std::string cospar
satellite COSPAR ID from "TYPE / SERIAL NO"
Definition: AntexData.hpp:283
gnsstk::AntexData::name
std::string name() const
Generate a name from type and serial number.
Definition: AntexData.cpp:150
gnsstk::AntexData::numFreqString
static const GNSSTK_EXPORT std::string numFreqString
"# OF FREQUENCIES"
Definition: AntexData.hpp:137
gnsstk::AntexData::dataCommentString
static const GNSSTK_EXPORT std::string dataCommentString
"COMMENT"
Definition: AntexData.hpp:145
gnsstk::AntexData::sinexCodeValid
@ sinexCodeValid
"SINEX CODE"
Definition: AntexData.hpp:175
gnsstk::AntexData::systemChar
char systemChar
Definition: AntexData.hpp:252
gnsstk::AntexData::neuFreqRMSValid
@ neuFreqRMSValid
"NORTH / EAST / UP"
Definition: AntexData.hpp:181
gnsstk::AntexData::validBits
validBits
Definition: AntexData.hpp:165
gnsstk::AntexData::methodString
static const GNSSTK_EXPORT std::string methodString
"METH / BY / # / DATE"
Definition: AntexData.hpp:131
CommonTime.hpp
gnsstk::AntexData::allValid13
@ allValid13
mask for all required valid fields
Definition: AntexData.hpp:184
gnsstk::AntexData::satCode
std::string satCode
satellite code from "TYPE / SERIAL NO"
Definition: AntexData.hpp:282
gnsstk::AntexData::endOfFreqString
static const GNSSTK_EXPORT std::string endOfFreqString
"END OF FREQUENCY"
Definition: AntexData.hpp:151
gnsstk::AntexData::zenRange
double zenRange[3]
Definition: AntexData.hpp:265
gnsstk::AntexData::getPhaseCenterOffset
Triple getPhaseCenterOffset(const std::string &freq) const
Definition: AntexData.cpp:205
Triple.hpp
gnsstk::AntexData::nFreq
unsigned int nFreq
Definition: AntexData.hpp:256
gnsstk::AntexData::reallyPutRecord
virtual void reallyPutRecord(FFStream &s) const
Definition: AntexData.cpp:573
gnsstk::AntexData::endOfFreqValid
@ endOfFreqValid
"END OF FREQUENCY" Required
Definition: AntexData.hpp:179
FFStream.hpp
gnsstk::AntexData::getPhaseCenterVariation
double getPhaseCenterVariation(const std::string &freq, double azimuth, double elev_nadir) const
Definition: AntexData.cpp:234
gnsstk::AntexData::validFromString
static const GNSSTK_EXPORT std::string validFromString
"VALID FROM"
Definition: AntexData.hpp:139
gnsstk::AntexData::SVN
int SVN
Definition: AntexData.hpp:248
gnsstk::AntexData::neuFreqString
static const GNSSTK_EXPORT std::string neuFreqString
"NORTH / EAST / UP"
Definition: AntexData.hpp:149
gnsstk::AntexData::stringValidFrom
std::string stringValidFrom
Definition: AntexData.hpp:275
gnsstk::AntexData::agency
std::string agency
agency from "METH / BY / # / DATE"
Definition: AntexData.hpp:285
gnsstk::AntexData::date
std::string date
date from "METH / BY / # / DATE"
Definition: AntexData.hpp:288
gnsstk::AntexData::startFreqValid
@ startFreqValid
"START OF FREQUENCY" Required
Definition: AntexData.hpp:177
gnsstk::AntexData::isRxAntenna
bool isRxAntenna
Definition: AntexData.hpp:242
gnsstk::AntexData::daziString
static const GNSSTK_EXPORT std::string daziString
"DAZI"
Definition: AntexData.hpp:133
gnsstk::AntexBase
Definition: AntexBase.hpp:54
gnsstk::AntexData::SatelliteTypes
static const GNSSTK_EXPORT std::vector< std::string > SatelliteTypes
Definition: AntexData.hpp:189
gnsstk::AntexData::antennaPCOandPCVData
Definition: AntexData.hpp:203
gnsstk::AntexData::reallyGetRecord
virtual void reallyGetRecord(FFStream &s)
Definition: AntexData.cpp:789
gnsstk::AntexData::validFromValid
@ validFromValid
"VALID FROM"
Definition: AntexData.hpp:173


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