General Purpose Geodetic Library
SgModelsInfo.cpp
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 #include <iostream>
24 #include <stdlib.h>
25 
26 
27 #include <SgModelsInfo.h>
28 
29 
30 #include <SgLogger.h>
31 #include <SgMatrix.h>
32 #include <SgVector.h>
33 #include <SgVlbiStationInfo.h>
34 
35 
36 
37 
38 /*=======================================================================================================
39 *
40 * METHODS:
41 *
42 *======================================================================================================*/
43 //
44 // static first:
45 const QString SgModelsInfo::className()
46 {
47  return "SgModelsInfo";
48 };
49 
50 
51 // CONSTRUCTORS:
52 //
53 // A constructor:
55  programName_("n/a"),
56  version_("n/a"),
57  site_("Site"),
58  star_("Star"),
59  ephemeris_("Ephemeris"),
60  coordinateTime_("CoordTime"),
61  atomicTime_("AtomicTime"),
62  relativity_("Relativity"),
63  polarMotion_("PolarMotion"),
64  polarMotionInterpolation_("PolarMotionInterpolation"),
65  ut1_("UT1"),
66  ut1Interpolation_("UT1Interpolation"),
67  nutation_("Nutation"),
68  earthTide_("EarthTide"),
69  poleTide_("PoleTide"),
70  oceanLoading_("OceanLoading"),
71  troposphere_("Troposphere"),
72  axisOffset_("AxisOffset"),
73  parallax_("Parallax"),
74  feedHorn_("FeedHorn"),
75  controlFlagNames_(),
76  controlFlagValues_(),
77  oLoadStationStatus_(),
78  siteZenDelays_(),
79  stations_()
80 {
81  dVersion_ = 0.0;
82  // from dbedit/mathbd.f:
83  relativityData_ = 1.0;
84  precessionData_ = 5029.09660;
85  earthTideData_[0] = 0.0;
86  earthTideData_[1] = 0.6090;
87  earthTideData_[2] = 0.0852;
88 
89 // ut1InterpData_ = new SgMatrix(1, 2);
90 // wobInterpData_ = new SgMatrix(1, 2);
91  ut1InterpData_ = NULL;
92  wobInterpData_ = NULL;
93 };
94 
95 
96 
97 // A destructor:
99 {
100  if (ut1InterpData_)
101  {
102  delete ut1InterpData_;
103  ut1InterpData_ = NULL;
104  };
105  if (wobInterpData_)
106  {
107  delete wobInterpData_;
108  wobInterpData_ = NULL;
109  };
110  stations_.clear();
111 };
112 
113 
114 
115 //
117 {
118  int l;
119  if (!ut1InterpData_)
120  {
121  ut1InterpData_ = new SgMatrix(nRow, 2);
123  "::prepareUt1InterpData(): the UT1 interp.data matrix(" +
124  QString("").setNum(ut1InterpData_->nCol()) + ", " +
125  QString("").setNum(ut1InterpData_->nRow()) + ") has been allocated");
126  }
127  else if (nRow != (l=ut1InterpData_->nRow()))
128  {
129  delete ut1InterpData_;
130  ut1InterpData_ = new SgMatrix(nRow, 2);
132  "::prepareUt1InterpData(): adjusted the dimension of the UT1 interp.data matrix rows: " +
133  QString("").setNum(l) + " => " + QString("").setNum(nRow));
134  };
135 };
136 
137 
139 {
140  int l;
141  if (!wobInterpData_)
142  {
143  wobInterpData_ = new SgMatrix(nRow, 2);
145  "::prepareWobInterpData(): the Pxy nterp.data matrix(" +
146  QString("").setNum(wobInterpData_->nCol()) + ", " +
147  QString("").setNum(wobInterpData_->nRow()) + ") has been allocated");
148  }
149  else if (nRow != (l=wobInterpData_->nRow()))
150  {
151  delete wobInterpData_;
152  wobInterpData_ = new SgMatrix(nRow, 2);
154  "::prepareWobInterpData(): adjusted the dimension of the Pxy interp.data matrix rows: " +
155  QString("").setNum(l) + " => " + QString("").setNum(nRow));
156  };
157 };
158 
159 
160 // FUNCTIONS:
161 //
162 //
163 
164 /*=====================================================================================================*/
165 //
166 // FRIENDS:
167 //
168 /*=====================================================================================================*/
169 //
170 
171 /*=====================================================================================================*/
172 //
173 // aux functions:
174 //
175 
176 /*=====================================================================================================*/
177 //
178 // constants:
179 //
180 /*=====================================================================================================*/
181 
SgLogger * logger
Definition: SgLogger.cpp:231
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
@ INTERP
Definition: SgLogger.h:71
unsigned int nRow() const
Definition: SgMatrix.h:352
unsigned int nCol() const
Definition: SgMatrix.h:360
void prepareWobInterpData(int nRow)
double dVersion_
Definition: SgModelsInfo.h:204
double precessionData_
Definition: SgModelsInfo.h:233
static const QString className()
SgMatrix * wobInterpData_
Definition: SgModelsInfo.h:230
QList< SgVlbiStationInfo * > stations_
Definition: SgModelsInfo.h:237
double earthTideData_[3]
Definition: SgModelsInfo.h:234
void prepareUt1InterpData(int nRow)
double relativityData_
Definition: SgModelsInfo.h:232
SgMatrix * ut1InterpData_
Definition: SgModelsInfo.h:229