SP3Header.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 
44 #ifndef GNSSTK_SP3HEADER_HPP
45 #define GNSSTK_SP3HEADER_HPP
46 
47 #include <string>
48 #include <map>
49 #include <vector>
50 #include "SP3Base.hpp"
51 #include "SP3SatID.hpp"
52 #include "CommonTime.hpp"
53 #include "TimeSystem.hpp"
54 
55 namespace gnsstk
56 {
58 
59 
68  class SP3Header : public SP3Base
69  {
70  public:
71 
74  enum Version
75  {
77  SP3a,
78  SP3b,
79  SP3c,
81  };
82 
86  basePV(0.0), baseClk(0.0), allowSP3aEvents(false)
87  {}
88 
90  virtual ~SP3Header() {}
91 
94  Version getVersion(void) const noexcept { return version; }
95 
98  char versionChar(void) const noexcept
99  {
100  return versionChar(version);
101  }
102 
106  static char versionChar(Version ver) noexcept
107  {
108  char ch;
109  switch(ver) {
110  case SP3a:
111  ch = 'a'; break;
112  case SP3b:
113  ch = 'b'; break;
114  case SP3c:
115  ch = 'c'; break;
116  case SP3d:
117  ch = 'd'; break;
118  case undefined: default:
119  ch = 'U'; break;
120  };
121  return ch;
122  }
123 
126  std::string versionString(void) const noexcept
127  {
128  return versionString(version);
129  }
130 
134  static std::string versionString(Version ver) noexcept
135  {
136  std::string str;
137  switch(ver) {
138  case SP3a:
139  str = std::string("SP3a"); break;
140  case SP3b:
141  str = std::string("SP3b"); break;
142  case SP3c:
143  str = std::string("SP3c"); break;
144  case SP3d:
145  str = std::string("SP3d"); break;
146  case undefined: default:
147  str = std::string("Undefined"); break;
148  };
149  return str;
150  }
151 
156  Version setVersion(const Version ver) noexcept
157  {
158  Version oldFormat = version;
159  version = ver;
160  return oldFormat;
161  }
162 
164  std::string timeSystemString() const noexcept
166 
167  // The next four lines is our common interface
169  virtual bool isHeader() const { return true; }
170 
172  virtual void dump(std::ostream& s=std::cout) const noexcept;
173 
181  double epochInterval;
183  std::string dataUsed;
184  std::string coordSystem;
185  std::string orbitType;
186  std::string agency;
187 
188  // the following are specific to version 'c'
191  double basePV;
192  double baseClk;
193  std::map<SP3SatID, short> satList;
196  std::vector<std::string> comments;
197 
198  friend class SP3Data;
199 
200  protected:
206  virtual void reallyPutRecord(FFStream& s) const;
207 
217  virtual void reallyGetRecord(FFStream& s);
218 
219  }; // end class SP3Header
220 
222 
223 } // namespace
224 
225 #endif
TimeSystem.hpp
gnsstk::SP3Header::versionString
std::string versionString(void) const noexcept
Definition: SP3Header.hpp:126
gnsstk::SP3Header::orbitType
std::string orbitType
Type of Orbit Estimate.
Definition: SP3Header.hpp:185
gnsstk::SP3Header::basePV
double basePV
Base used in Pos or Vel (mm or 10**-4mm/sec)
Definition: SP3Header.hpp:191
gnsstk::SP3Header::versionString
static std::string versionString(Version ver) noexcept
Definition: SP3Header.hpp:134
gnsstk::SP3Header::agency
std::string agency
Agency generating the Orbit.
Definition: SP3Header.hpp:186
gnsstk::FFStream
Definition: FFStream.hpp:119
const
#define const
Definition: getopt.c:43
gnsstk::SP3Header::epochInterval
double epochInterval
Duration of Epoch in seconds.
Definition: SP3Header.hpp:181
gnsstk::SP3Header::SP3d
@ SP3d
SP3 version d (Expanded Satellites and Comments)
Definition: SP3Header.hpp:80
gnsstk::SP3Header::allowSP3aEvents
bool allowSP3aEvents
If true, file may contain NGA SP3a events.
Definition: SP3Header.hpp:179
gnsstk::SP3Header::undefined
@ undefined
Unknown or undefined SP3 file format.
Definition: SP3Header.hpp:76
gnsstk::SP3Header::coordSystem
std::string coordSystem
Coordinate System of the data.
Definition: SP3Header.hpp:184
gnsstk::SP3Header::reallyGetRecord
virtual void reallyGetRecord(FFStream &s)
Definition: SP3Header.cpp:58
gnsstk::SatelliteSystem
SatelliteSystem
Supported satellite systems.
Definition: SatelliteSystem.hpp:55
gnsstk::CarrierBand::Any
@ Any
Used to match any carrier band.
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::SP3Header::system
SP3SatID system
system of satellites in file, e.g. G for GPS
Definition: SP3Header.hpp:189
gnsstk::SP3Header::satList
std::map< SP3SatID, short > satList
Map<SP3SatID,accuracy flag> (all SVs in file)
Definition: SP3Header.hpp:194
gnsstk::SP3Header::time
CommonTime time
Time of first Epoch in file.
Definition: SP3Header.hpp:180
gnsstk::SP3Header::comments
std::vector< std::string > comments
vector of 4 comment lines
Definition: SP3Header.hpp:196
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::SP3Header::versionChar
char versionChar(void) const noexcept
Definition: SP3Header.hpp:98
gnsstk::SP3Header::reallyPutRecord
virtual void reallyPutRecord(FFStream &s) const
Definition: SP3Header.cpp:308
gnsstk::SatelliteSystem::GPS
@ GPS
gnsstk::SP3Header::getVersion
Version getVersion(void) const noexcept
Definition: SP3Header.hpp:94
gnsstk::SP3Header::~SP3Header
virtual ~SP3Header()
destructor
Definition: SP3Header.hpp:90
gnsstk::SP3Header::SP3b
@ SP3b
SP3 version b (very similar to SP3a)
Definition: SP3Header.hpp:78
gnsstk::SP3Header::version
Version version
SP3 Version or file format.
Definition: SP3Header.hpp:177
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::SP3Header::setVersion
Version setVersion(const Version ver) noexcept
Definition: SP3Header.hpp:156
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
gnsstk::SP3Header
Definition: SP3Header.hpp:68
SP3Base.hpp
gnsstk::SP3Header::SP3a
@ SP3a
SP3 version a.
Definition: SP3Header.hpp:77
gnsstk::SP3Header::baseClk
double baseClk
Definition: SP3Header.hpp:192
gnsstk::SP3Header::numberOfEpochs
int numberOfEpochs
Number of epochs in this file.
Definition: SP3Header.hpp:182
gnsstk::SP3Header::SP3Header
SP3Header()
constructor
Definition: SP3Header.hpp:84
CommonTime.hpp
gnsstk::SP3Header::timeSystemString
std::string timeSystemString() const noexcept
return a string with time system name
Definition: SP3Header.hpp:164
gnsstk::SP3Header::Version
Version
Definition: SP3Header.hpp:74
SP3SatID.hpp
gnsstk::SP3SatID
Definition: SP3SatID.hpp:63
gnsstk::SP3Base
This class is here to make readable inheritance diagrams.
Definition: SP3Base.hpp:55
gnsstk::SP3Data
Definition: SP3Data.hpp:96
gnsstk::SP3Header::versionChar
static char versionChar(Version ver) noexcept
Definition: SP3Header.hpp:106
gnsstk::SP3Header::isHeader
virtual bool isHeader() const
SP3Header is a "header" so this function always returns true.
Definition: SP3Header.hpp:169
gnsstk::SP3Header::containsVelocity
bool containsVelocity
If true, file contains velocities.
Definition: SP3Header.hpp:178
gnsstk::SP3Header::timeSystem
TimeSystem timeSystem
Time system used.
Definition: SP3Header.hpp:190
gnsstk::SP3Header::SP3c
@ SP3c
SP3 version c (contains a/b as a subset)
Definition: SP3Header.hpp:79
gnsstk::SP3Header::dataUsed
std::string dataUsed
Types of data input into the positions.
Definition: SP3Header.hpp:183
gnsstk::SP3Header::dump
virtual void dump(std::ostream &s=std::cout) const noexcept
Dump contents to an ostream.
Definition: SP3Header.cpp:534


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