General Purpose Geodetic Library
SgExternalErpFile.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SG_EXTERNAL_EOP_FILE_H
24 #define SG_EXTERNAL_EOP_FILE_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QString>
33 
34 
35 #include <SgMJD.h>
36 #include <SgTidalUt1.h>
37 
38 
39 
40 class SgVector;
41 class SgMatrix;
42 /***===================================================================================================*/
48 {
49 public:
50  enum EopIdx
51  {
52  UT1_IDX = 0,
53  PMX_IDX = 1,
54  PMY_IDX = 2,
55  CIX_IDX = 3,
56  CIY_IDX = 4,
57  };
59  {
60  IET_UNKN = 0,
61  IET_ERP = 1,
63  IET_C04 = 3,
64  };
65 
66 
67 
68  //
69  // constructors/destructors:
70  //
74  inline SgExternalEopFile();
75 
80 
81  //
82  // Interfaces:
83  //
84  // gets:
85  //
87  inline InputEopType inputEopType() const {return inputEopType_;}
88 
91  inline const QString& getFileName() const;
92 
93  // sets:
96  inline void setFileName(const QString&);
97 
98  inline bool isOk() const;
99 
100  inline SgVector* argument();
101 
102  inline SgMatrix* eopTable();
103 
104  //
105  // Functions:
106  //
109  static const QString className();
110 
113  bool readFile(const QString&, const SgMJD&, int numOfPoints);
114 
115  /*
116  */
117 private:
120  QString fileName_;
121  bool isOk_;
127 
128  bool readErpFile(const QString& fileName, const SgMJD& tMean, int numOfPoints);
129  bool readFinalsFile(const QString& fileName, const SgMJD& tMean, int numOfPoints);
130  bool readC04File(const QString& fileName, const SgMJD& tMean, int numOfPoints);
131 };
132 /*=====================================================================================================*/
133 
134 
135 
136 
137 /*=====================================================================================================*/
138 /* */
139 /* SgExternalEopFile inline members: */
140 /* */
141 /*=====================================================================================================*/
142 //
143 //
144 // CONSTRUCTORS:
145 //
146 //
147 // An empty constructor:
149  firstEpoch_(tZero),
150  lastEpoch_(tZero),
151  fileName_("")
152 {
153  isOk_ = false;
154  argument_ = NULL;
155  eopTable_ = NULL;
158 };
159 
160 
161 
162 //
163 // INTERFACES:
164 //
165 //
166 inline const QString& SgExternalEopFile::getFileName() const
167 {
168  return fileName_;
169 };
170 
171 
172 
173 //
174 inline void SgExternalEopFile::setFileName(const QString& name)
175 {
176  fileName_ = name;
177 };
178 
179 
180 //
181 inline bool SgExternalEopFile::isOk() const
182 {
183  return isOk_;
184 };
185 
186 
187 
188 //
190 {
191  return argument_;
192 };
193 
194 
195 
196 //
198 {
199  return eopTable_;
200 };
201 
202 
203 
204 //
205 // FUNCTIONS:
206 //
207 //
208 //
209 
210 // FRIENDS:
211 //
212 //
213 //
214 /*=====================================================================================================*/
215 
216 
217 
218 
219 /*=====================================================================================================*/
220 //
221 // aux functions:
222 //
223 
224 
225 /*=====================================================================================================*/
226 #endif //SG_EXTERNAL_EOP_FILE_H
const SgMJD tZero(1957, 10, 4)
InputEopType inputEopType_
SgTidalUt1::UT1TideContentType ut1Type() const
InputEopType inputEopType() const
static const QString className()
SgTidalUt1::UT1TideContentType ut1Type_
bool readErpFile(const QString &fileName, const SgMJD &tMean, int numOfPoints)
const QString & getFileName() const
void setFileName(const QString &)
bool readFinalsFile(const QString &fileName, const SgMJD &tMean, int numOfPoints)
bool readC04File(const QString &fileName, const SgMJD &tMean, int numOfPoints)
bool readFile(const QString &, const SgMJD &, int numOfPoints)
Definition: SgMJD.h:59
UT1TideContentType
Definition: SgTidalUt1.h:50