General Purpose Geodetic Library
SgEccRec.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_ECC_REC_H
24 #define SG_ECC_REC_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QString>
33 
34 
35 #include <Sg3dVector.h>
36 
37 #include <SgMJD.h>
38 
39 /***===================================================================================================*/
45 class SgEccRec
46 {
47 public:
48  enum EccType
49  {
50  ET_N_A = 0,
51  ET_NEU = 1,
52  ET_XYZ = 2,
53  };
54 
55  //
56  // constructors/destructors:
57  //
61  inline SgEccRec();
62  inline SgEccRec(const SgEccRec&);
63 
67  inline ~SgEccRec();
68 
69  //
70  // Interfaces:
71  //
72  //
73  inline SgEccRec& operator= (const SgEccRec&);
74 
75  // gets:
76  inline bool getIsOk() const;
77  inline const QString& getSiteName() const;
78  inline const QString& getCdpNumber() const;
79  inline int getNCdp() const;
80  inline const SgMJD& getTSince() const;
81  inline const SgMJD& getTTill() const;
82  inline const Sg3dVector& getDR() const;
83  inline EccType getEccType() const;
84 
85  // sets:
86  inline void setSiteName(const QString&);
87  inline void setCdpNumber(const QString&);
88  inline void setNCdp(int);
89  inline void setTSince(const SgMJD& );
90  inline void setTTill(const SgMJD& );
91  inline void setDR(const Sg3dVector&);
92  inline void setEccType(EccType);
93 
94  //
95  // Functions:
96  //
99  static const QString className();
100 
101  bool parseString(const QString&);
102 
103  //
104  // Friends:
105  //
106 
107  //
108  // I/O:
109  //
110  // ...
111 
112 private:
113  bool isOk_;
114  QString siteName_;
115  QString cdpNumber_;
116  int nCDP_;
121 };
122 /*=====================================================================================================*/
123 
124 
125 
126 
127 
128 /*=====================================================================================================*/
129 /* */
130 /* SgEccDat inline members: */
131 /* */
132 /*=====================================================================================================*/
133 //
134 //
135 // CONSTRUCTORS:
136 //
137 // An empty constructor:
139  siteName_("ZABRSKPT"),
140  cdpNumber_("0007"),
141  tSince_(tZero),
142  tTill_(tZero),
143  dR_(v3Zero)
144 {
145  isOk_ = false;
146  nCDP_ = 0;
147  eccType_ = ET_N_A;
148 };
149 
150 
151 
152 inline SgEccRec::SgEccRec(const SgEccRec& r) :
153  siteName_(r.getSiteName()),
154  cdpNumber_(r.getCdpNumber()),
155  tSince_(r.getTSince()),
156  tTill_(r.getTTill()),
157  dR_(r.getDR())
158 {
159  isOk_ = r.getIsOk();
160  nCDP_ = r.getNCdp();
161  eccType_ = r.getEccType();
162 };
163 
164 
165 
166 
167 // A destructor:
169 {
170  // nothing to do
171 };
172 
173 
174 
175 //
176 // INTERFACES:
177 //
178 //
180 {
183  setTSince(r.getTSince());
184  setTTill(r.getTTill());
185  setDR(r.getDR());
186  isOk_ = r.getIsOk();
187  nCDP_ = r.getNCdp();
188  eccType_ = r.getEccType();
189  return *this;
190 };
191 
192 
193 
194 //
195 inline bool SgEccRec::getIsOk() const
196 {
197  return isOk_;
198 };
199 
200 
201 
202 //
203 inline const QString& SgEccRec::getSiteName() const
204 {
205  return siteName_;
206 };
207 
208 
209 
210 //
211 inline const QString& SgEccRec::getCdpNumber() const
212 {
213  return cdpNumber_;
214 };
215 
216 
217 
218 //
219 inline int SgEccRec::getNCdp() const
220 {
221  return nCDP_;
222 };
223 
224 
225 
226 //
227 inline const SgMJD& SgEccRec::getTSince() const
228 {
229  return tSince_;
230 };
231 
232 
233 
234 //
235 inline const SgMJD& SgEccRec::getTTill() const
236 {
237  return tTill_;
238 };
239 
240 
241 
242 //
243 inline const Sg3dVector& SgEccRec::getDR() const
244 {
245  return dR_;
246 };
247 
248 
249 
250 //
252 {
253  return eccType_;
254 };
255 
256 
257 
258 //
259 inline void SgEccRec::setSiteName(const QString& s)
260 {
261  siteName_ = s;
262 };
263 
264 
265 
266 //
267 inline void SgEccRec::setCdpNumber(const QString& s)
268 {
269  cdpNumber_ = s;
270 };
271 
272 
273 
274 //
275 inline void SgEccRec::setNCdp(int n)
276 {
277  nCDP_ = n;
278 };
279 
280 
281 
282 //
283 inline void SgEccRec::setTSince(const SgMJD& t)
284 {
285  tSince_ = t;
286 };
287 
288 
289 
290 //
291 inline void SgEccRec::setTTill(const SgMJD& t)
292 {
293  tTill_ = t;
294 };
295 
296 
297 
298 //
299 inline void SgEccRec::setDR(const Sg3dVector& r)
300 {
301  dR_ = r;
302 };
303 
304 
305 
306 //
308 {
309  eccType_ = et;
310 };
311 
312 //
313 // FUNCTIONS:
314 //
315 //
316 //
317 
318 // FRIENDS:
319 //
320 //
321 //
322 /*=====================================================================================================*/
323 
324 
325 
326 
327 
328 
329 
330 
331 /*=====================================================================================================*/
332 //
333 // aux functions:
334 //
335 
336 
337 /*=====================================================================================================*/
338 #endif //SG_ECC_REC_H
const Sg3dVector v3Zero(0.0, 0.0, 0.0)
const SgMJD tZero(1957, 10, 4)
QString siteName_
Definition: SgEccRec.h:114
void setDR(const Sg3dVector &)
Definition: SgEccRec.h:299
SgMJD tTill_
Definition: SgEccRec.h:118
const SgMJD & getTTill() const
Definition: SgEccRec.h:235
bool getIsOk() const
Definition: SgEccRec.h:195
@ ET_NEU
Definition: SgEccRec.h:51
@ ET_N_A
Definition: SgEccRec.h:50
@ ET_XYZ
Definition: SgEccRec.h:52
~SgEccRec()
Definition: SgEccRec.h:168
int getNCdp() const
Definition: SgEccRec.h:219
void setTTill(const SgMJD &)
Definition: SgEccRec.h:291
const QString & getCdpNumber() const
Definition: SgEccRec.h:211
SgMJD tSince_
Definition: SgEccRec.h:117
static const QString className()
Definition: SgEccRec.cpp:37
SgEccRec()
Definition: SgEccRec.h:138
int nCDP_
Definition: SgEccRec.h:116
EccType getEccType() const
Definition: SgEccRec.h:251
Sg3dVector dR_
Definition: SgEccRec.h:119
const Sg3dVector & getDR() const
Definition: SgEccRec.h:243
EccType eccType_
Definition: SgEccRec.h:120
const SgMJD & getTSince() const
Definition: SgEccRec.h:227
void setEccType(EccType)
Definition: SgEccRec.h:307
void setTSince(const SgMJD &)
Definition: SgEccRec.h:283
void setCdpNumber(const QString &)
Definition: SgEccRec.h:267
void setSiteName(const QString &)
Definition: SgEccRec.h:259
void setNCdp(int)
Definition: SgEccRec.h:275
bool parseString(const QString &)
Definition: SgEccRec.cpp:45
const QString & getSiteName() const
Definition: SgEccRec.h:203
SgEccRec & operator=(const SgEccRec &)
Definition: SgEccRec.h:179
QString cdpNumber_
Definition: SgEccRec.h:115
bool isOk_
Definition: SgEccRec.h:113
Definition: SgMJD.h:59