AntexHeader.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 
40 
41 #ifndef GNSSTK_ANTEX_HEADER_HPP
42 #define GNSSTK_ANTEX_HEADER_HPP
43 
44 #include <string>
45 #include <vector>
46 
47 #include "AntexBase.hpp"
48 #include "FFStream.hpp"
49 #include "gnsstk_export.h"
50 
51 namespace gnsstk
52 {
54 
55 
60  class AntexHeader : public AntexBase
61  {
62  public:
64  AntexHeader() : valid(false), version(1.4) {}
66  inline void clear()
67  {
68  version = 1.4;
69  valid = false;
70  commentList.clear();
71  }
72 
75 
76  GNSSTK_EXPORT
77  static const std::string versionString;
78  GNSSTK_EXPORT
79  static const std::string pcvTypeString;
80  GNSSTK_EXPORT
81  static const std::string headerCommentString;
82  GNSSTK_EXPORT
83  static const std::string endOfHeaderString;
84 
85 
88  enum validBits
89  {
90  versionValid = 0x01,
91  systemValid = 0x02,
92  pcvTypeValid = 0x04,
93  commentValid = 0x08,
94  endValid = 0x080000000,
95  allValid13 = 0x080000007
96  };
97 
99 
100  unsigned long valid;
101  double version;
102  char system;
103  char pcvType;
104  std::string refAntType;
105  std::string refAntSerNum;
106  std::vector<std::string> commentList;
107 
108 
110  virtual ~AntexHeader() {}
111 
112  // our common interface
114  virtual bool isHeader() const { return true; }
115 
120  virtual void dump(std::ostream& s) const;
121 
127  void ParseHeaderRecord(std::string& line);
128 
135  void WriteHeaderRecords(FFStream& s) const;
136 
138  bool isValid() const { return ((valid & allValid13) == allValid13); }
139 
140  protected:
146  virtual void reallyPutRecord(FFStream& s) const;
147 
157  virtual void reallyGetRecord(FFStream& s);
158 
159  }; // end class AntexHeader
160 
162 
163 } // namespace gnsstk
164 
165 #endif // GNSSTK_ANTEX_HEADER_HPP
gnsstk::AntexHeader::WriteHeaderRecords
void WriteHeaderRecords(FFStream &s) const
Definition: AntexHeader.cpp:97
gnsstk::AntexHeader::ParseHeaderRecord
void ParseHeaderRecord(std::string &line)
Definition: AntexHeader.cpp:144
gnsstk::FFStream
Definition: FFStream.hpp:119
gnsstk::AntexHeader::systemValid
@ systemValid
"ANTEX VERSION / SYST"
Definition: AntexHeader.hpp:91
gnsstk::AntexHeader::~AntexHeader
virtual ~AntexHeader()
Destructor.
Definition: AntexHeader.hpp:110
gnsstk::AntexHeader::pcvType
char pcvType
The PCV type (A:absolute R:relative)
Definition: AntexHeader.hpp:103
gnsstk::AntexHeader::pcvTypeString
static const GNSSTK_EXPORT std::string pcvTypeString
"PCV TYPE / REFANT"
Definition: AntexHeader.hpp:79
gnsstk::AntexHeader::pcvTypeValid
@ pcvTypeValid
"PCV TYPE / REFANT"
Definition: AntexHeader.hpp:92
gnsstk::AntexHeader::refAntSerNum
std::string refAntSerNum
Reference antenna serial number.
Definition: AntexHeader.hpp:105
gnsstk::AntexHeader::commentValid
@ commentValid
"COMMENT"
Definition: AntexHeader.hpp:93
gnsstk::AntexHeader::endValid
@ endValid
"END OF HEADER"
Definition: AntexHeader.hpp:94
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::AntexHeader::refAntType
std::string refAntType
Reference antenna type.
Definition: AntexHeader.hpp:104
gnsstk::AntexHeader::versionValid
@ versionValid
"ANTEX VERSION / SYST"
Definition: AntexHeader.hpp:90
gnsstk::AntexHeader::AntexHeader
AntexHeader()
Default and only constructor.
Definition: AntexHeader.hpp:64
gnsstk::AntexHeader::validBits
validBits
Definition: AntexHeader.hpp:88
gnsstk::AntexHeader::version
double version
ANTEX VERSION & TYPE.
Definition: AntexHeader.hpp:101
gnsstk::AntexHeader::isHeader
virtual bool isHeader() const
AntexHeader is a "header" so this function always returns true.
Definition: AntexHeader.hpp:114
gnsstk::AntexHeader::headerCommentString
static const GNSSTK_EXPORT std::string headerCommentString
"COMMENT"
Definition: AntexHeader.hpp:81
gnsstk::AntexHeader::reallyPutRecord
virtual void reallyPutRecord(FFStream &s) const
Definition: AntexHeader.cpp:55
gnsstk::AntexHeader::endOfHeaderString
static const GNSSTK_EXPORT std::string endOfHeaderString
"END OF HEADER"
Definition: AntexHeader.hpp:83
gnsstk::AntexHeader::versionString
static const GNSSTK_EXPORT std::string versionString
"ANTEX VERSION / SYST"
Definition: AntexHeader.hpp:77
AntexBase.hpp
gnsstk::AntexHeader::isValid
bool isValid() const
Return boolean : is this a valid Rinex header?
Definition: AntexHeader.hpp:138
gnsstk::AntexHeader
Definition: AntexHeader.hpp:60
gnsstk::AntexHeader::system
char system
The ANTEX satellite system.
Definition: AntexHeader.hpp:102
gnsstk::AntexHeader::clear
void clear()
Clear (empty out) header.
Definition: AntexHeader.hpp:66
gnsstk::AntexHeader::valid
unsigned long valid
Definition: AntexHeader.hpp:100
FFStream.hpp
gnsstk::AntexHeader::allValid13
@ allValid13
mask for all required valid fields
Definition: AntexHeader.hpp:95
gnsstk::AntexBase
Definition: AntexBase.hpp:54
gnsstk::AntexHeader::dump
virtual void dump(std::ostream &s) const
Definition: AntexHeader.cpp:263
gnsstk::AntexHeader::commentList
std::vector< std::string > commentList
Comments in header (optional)
Definition: AntexHeader.hpp:106
gnsstk::AntexHeader::reallyGetRecord
virtual void reallyGetRecord(FFStream &s)
Definition: AntexHeader.cpp:194


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