General Purpose Geodetic Library
SgArcStorage.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) 2012-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_EST_ARC_STORAGE_H
24 #define SG_EST_ARC_STORAGE_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <QtCore/QString>
33 
34 #include <SgParameter.h>
35 
36 
37 
38 
39 class SgVector;
40 class SgSymMatrix;
41 
42 
43 
44 
45 /***===================================================================================================*/
52 {
53 public:
54  //
55  // constructors/destructors:
56  //
60  inline SgArcStorage();
61 
65  inline ~SgArcStorage();
66 
67 
68 
69  //
70  // Interfaces:
71  //
75 
78  inline int getNum() const;
79 
82  inline SgParameter* getPi(int);
83 
84  inline SgParameter* getPOrig();
85 
86  //
87  // Functions:
88  //
91  static const QString className();
92 
93  inline int calcCurrentIdx(const SgMJD& t);
94 
97  void deployParameters(SgParameter*, const SgMJD& tStart, const SgMJD& tFinis, const SgMJD& tRefer);
98 
101  void propagatePartials(const SgMJD& t);
102 
103  double calcAX(const SgMJD&, bool);
104 
105  double calc_P_a(const SgSymMatrix&, int, const SgMJD&);
106 
107  double calc_aT_P_a(const SgVector&, const SgMJD&);
108 
109 
110  double calcSolution(const SgMJD&);
111 
112  double calcSigma(const SgMJD&);
113 
114  //
115  // Friends:
116  //
117 
118  //
119  // I/O:
120  //
121  // ...
122 
123 private:
124  // original/external parameter:
126 
127  // arcs:
129  int num_;
132  double step_;
133 };
134 /*=====================================================================================================*/
135 
136 
137 
138 
139 
140 
141 
142 
143 /*=====================================================================================================*/
144 /* */
145 /* SgPwlStorage inline members: */
146 /* */
147 /*=====================================================================================================*/
148 //
149 //
150 // CONSTRUCTORS:
151 //
152 // An empty constructor:
154  tStart_(tZero),
155  tFinis_(tZero)
156 {
157  pOrig_ = NULL;
158  pPi_ = NULL;
159  num_ = 0;
160 };
161 
162 
163 
164 // A destructor:
166 {
167  pOrig_ = NULL; // not an owner
168  if (pPi_)
169  {
170  delete[] pPi_;
171  pPi_ = NULL;
172  };
173  num_ = 0;
174 };
175 
176 
177 
178 //
179 // INTERFACES:
180 //
181 //
182 //
183 inline int SgArcStorage::getNum() const
184 {
185  return num_;
186 };
187 
188 
189 
190 //
192 {
193  int i=(-1<idx && idx<num_) ? idx : 0;
194  return &pPi_[i];
195 };
196 
197 
198 
199 //
201 {
202  return pOrig_;
203 };
204 
205 
206 
207 //
209 {
210  int idx;
211  idx = floor((t - tStart_)/step_);
212  if (idx < 0)
213  idx = 0;
214  if (num_ <= idx)
215  idx = num_ - 1;
216  return idx;
217 };
218 
219 
220 
221 // sets:
222 //
223 
224 
225 //
226 // FUNCTIONS:
227 //
228 //
229 //
230 
231 
232 //
233 // FRIENDS:
234 //
235 //
236 //
237 
238 
239 /*=====================================================================================================*/
240 
241 
242 
243 
244 
245 /*=====================================================================================================*/
246 //
247 // aux functions:
248 //
249 /*=====================================================================================================*/
250 #endif //SG_EST_ARC_STORAGE_H
const SgMJD tZero(1957, 10, 4)
SgArcStorage & operator=(const SgArcStorage &)
SgParameter * pOrig_
Definition: SgArcStorage.h:125
int getNum() const
Definition: SgArcStorage.h:183
void deployParameters(SgParameter *, const SgMJD &tStart, const SgMJD &tFinis, const SgMJD &tRefer)
double calcSolution(const SgMJD &)
SgParameter * getPOrig()
Definition: SgArcStorage.h:200
double calc_aT_P_a(const SgVector &, const SgMJD &)
double calcAX(const SgMJD &, bool)
double calcSigma(const SgMJD &)
static const QString className()
double calc_P_a(const SgSymMatrix &, int, const SgMJD &)
SgParameter * pPi_
Definition: SgArcStorage.h:128
void propagatePartials(const SgMJD &t)
int calcCurrentIdx(const SgMJD &t)
Definition: SgArcStorage.h:208
SgParameter * getPi(int)
Definition: SgArcStorage.h:191
Definition: SgMJD.h:59