General Purpose Geodetic Library
SgVlbiStationInfo.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 #include <math.h>
26 
27 
28 #include <QtCore/QDataStream>
29 #include <QtCore/QDir>
30 #include <QtCore/QFile>
31 #include <QtCore/QRegExp>
32 #include <QtCore/QStringList>
33 #include <QtCore/QTextStream>
34 
35 
36 #include <Sg3dMatrixR.h>
37 #include <SgEccRec.h>
38 #include <SgLogger.h>
39 #include <SgVlbiStationInfo.h>
40 #include <SgVlbiObservation.h>
41 
42 
43 
45 
46 
47 /*=======================================================================================================
48 *
49 * METHODS:
50 *
51 *======================================================================================================*/
52 //
53 // static first:
55 {
56  return "SgVlbiStationInfo";
57 };
58 
59 
60 
61 //
63 {
64  int mnt=0;
65  switch (mType)
66  {
67  case MT_EQUA:
68  mnt = 1;
69  break;
70  case MT_X_YN:
71  mnt = 2;
72  break;
73  case MT_AZEL:
74  mnt = 3;
75  break;
76  case MT_RICHMOND:
77  mnt = 4;
78  break;
79  case MT_X_YE:
80  mnt = 5;
81  break;
82  case MT_UNKN:
83  default:
84  mnt = 0;
85  break;
86  };
87  return mnt;
88 };
89 
90 
91 
92 //
94 {
96  switch (iMnt)
97  {
98  case 1:
99  mnt = MT_EQUA;
100  break;
101  case 2:
102  mnt = MT_X_YN;
103  break;
104  case 3:
105  mnt = MT_AZEL;
106  break;
107  case 4:
108  mnt = MT_RICHMOND;
109  break;
110  case 5:
111  mnt = MT_X_YE;
112  break;
113  default:
115  "::int2mntType(): got unknown value of the axis type (" + QString("").setNum(iMnt) + ")");
116  break;
117  };
118  return mnt;
119 };
120 
121 
122 
123 
124 #pragma GCC push_options
125 #pragma GCC optimize ("O0")
126 
127 //
128 void SgVlbiStationInfo::calcRLF(double &latitude, double& longitude, double& height,
129  const Sg3dVector& r, bool useOldEllipsoid)
130 {
131 /* Downloaded from from ftp://tai.bipm.org/iers/conv2010/chapter4/GCONV2.F
132  * URL to the site: http://tai.bipm.org/iers/conv2010/conv2010_c4.html
133  *
134  SUBROUTINE GCONV2 (A,F,X,Y,Z,PHI,LAMBDA,H)
135 *+
136 * - - - - - - - - - - -
137 * G C O N V 2
138 * - - - - - - - - - - -
139 *
140 * This routine is part of the International Earth Rotation and
141 * Reference Systems Service (IERS) Conventions software collection.
142 *
143 * This subroutine transforms from geocentric rectangular to
144 * geodetic coordinates.
145 * [...]
146 */
147 
148  //* -------------
149  //* Preliminaries
150  //* -------------
151  //* Default Values: GRS1980 System (recommended in IERS Conventions)
152  // double dA(6378137.0), dF(0.00335281068118);
153  useOldEllipsoid = false;
154  useOldEllipsoid = true;
155 
156  double dA, dF;
157  dA = 6378137.0;
158  dF = 0.00335281068118;
159 
160  if (useOldEllipsoid)
161  {
162  dA = 6378136.3;
163  dF = 0.0033528918690;
164  };
165 
166  //* Functions of ellipsoid parameters
167  double dAEPS2, dE2, dE4T, dEP2, dEP, dAEP;
168  double dP2;
169  dAEPS2 = dE2 = dE4T = dEP2 = dEP = dAEP = 0.0;
170  dP2 = 0.0;
171 
172  dAEPS2 = dA*dA*1.0e-32;
173  dE2 = (2.0 - dF)*dF;
174  dE4T = dE2*dE2*1.5;
175  dEP2 = 1.0 - dE2;
176  dEP = sqrt(dEP2);
177  dAEP = dA*dEP;
178 
179  //* ---------------------------------------------------------
180  //* Compute Coefficients of (Modified) Quartic Equation
181  //*
182  //* Remark: Coefficients are rescaled by dividing by 'a'
183  //* ---------------------------------------------------------
184  //* Compute distance from polar axis squared
185  dP2 = r.at(X_AXIS)*r.at(X_AXIS) + r.at(Y_AXIS)*r.at(Y_AXIS);
186 
187  //* Compute longitude lambda
188  if (dP2 != 0.0)
189  {
190  longitude = atan2(r.at(Y_AXIS), r.at(X_AXIS));
191  if (longitude<0.0)
192  longitude += M_PI*2.0;
193  }
194  else
195  longitude = 0.0;
196 
197 
198  double dABSZ, dP, dS0, dPN, dZP, dC0, dC02, dC03, dS02, dS03, dA02;
199  double dA0, dA03, dD0, dF0, dB0, dS1, dCP, dS12, dCP2;
200 
201  dABSZ = dP = dS0 = dPN = dZP = dC0 = dC02 = dC03 = dS02 = dS03 = dA02 = 0.0;
202  dA0 = dA03 = dD0 = dF0 = dB0 = dS1 = dCP = dS12 = dCP2 = 0.0;
203 
204  //* Ensure that Z-coordinate is unsigned
205  dABSZ = fabs(r.at(Z_AXIS));
206  //* Continue unless at the poles
207  if (dP2 > dAEPS2)
208  {
209  //* Compute distance from polar axis
210  dP = sqrt(dP2);
211  //* Normalize
212  dS0 = dABSZ/dA;
213  dPN = dP/dA;
214  dZP = dEP*dS0;
215  //* Prepare Newton correction factors.
216  dC0 = dEP*dPN;
217  dC02 = dC0*dC0;
218  dC03 = dC02*dC0;
219  dS02 = dS0*dS0;
220  dS03 = dS02*dS0;
221  dA02 = dC02 + dS02;
222  dA0 = sqrt(dA02);
223  dA03 = dA02*dA0;
224  dD0 = dZP*dA03 + dE2*dS03;
225  dF0 = dPN*dA03 - dE2*dC03;
226  //* Prepare Halley correction factor.
227  dB0 = dE4T*dS02*dC02*dPN*(dA0 - dEP);
228  dS1 = dD0*dF0 - dB0*dS0;
229  dCP = dEP*(dF0*dF0 - dB0*dC0);
230  //* Evaluate latitude and height.
231  latitude = atan(dS1/dCP);
232  dS12 = dS1*dS1;
233  dCP2 = dCP*dCP;
234  height = (dP*dCP + dABSZ*dS1 - dA*sqrt(dEP2*dS12 + dCP2))/sqrt(dS12 + dCP2);
235  }
236  else
237  {
238  //* Special case: pole.
239  latitude = M_PI_2;
240  height = dABSZ - dAEP;
241  };
242 
243  //* Restore sign of latitude.
244  if (r.at(Z_AXIS) < 0.0)
245  latitude = -latitude;
246 };
247 
248 
249 
250 //
251 //void SgVlbiStationInfo::calcRLF_bis(double &latitude, double& longitude, double& height,
252 // const Sg3dVector& r, bool useOldEllipsoid)
253 //{
254  /*
255  IERS TECHNICAL NOTE 21
256  IERS Conventions (1996)
257  page 12:
258 
259  Once the Cartesian coordinates (x,y,z) are known, they can be transformed to "datum" or
260  curvilinear geodetic coordinates (lambda, fi, h) reffered to an ellipsoid of semi-major
261  axis a and flattening f, using the following code (Borkowski, 1989). First compute
262  lambda=tan^(-1)(y/x) properly determining the quadrant from x and y (0<=lamda<=2pi)
263  */
264 //
265 // longitude = atan2(r.at(Y_AXIS), r.at(X_AXIS));
266 // if (longitude<0.0)
267 // longitude += M_PI*2.0;
268 //
269 // /*
270 // and r=sqrt(x^2+y^2).
271 // */
272 //
273 // double rho = hypot(r.at(X_AXIS), r.at(Y_AXIS));
274 //
275  /*
276  subroutine GEOD(r,z,fi,h)
277  c Program to transform Cartesian to geodetic coordinates
278  c based on the exact solution (Borkowski, 1989)
279  c Input : r, z = equatorial [m] and polar [m] components
280  c Output: fi, h = geodetic coord's (latitude [rad], height [m])
281  implicit real*8(a-h,o-z)
282 // */
283 //
284 // double b,E,F,P,Q,D,s,v,G,t;
285 //
286  /*
287  c GRS80 ellipsoid: semimajor axis (a) and inverse flattening (fr)
288  data a,fr /6378137.d0,298.257222101d0/
289  */
292 // double a = 6378137.0;
293 // double fr = 298.257222101;
294 //
295 // if (useOldEllipsoid)
296 // {
297 // a = 6378136.3;
298 // fr = 1.0/0.0033528918690;
299 // };
300 //
301  /*
302  b = dsign(a - a/fr,z)
303  E = ((z + b)*b/a - a)/r
304  F = ((z - b)*b/a + a)/r
305  */
306 // b = sign(a - a/fr, r.at(Z_AXIS));
307 // E = ((r.at(Z_AXIS) + b)*b/a - a)/rho;
308 // F = ((r.at(Z_AXIS) - b)*b/a + a)/rho;
309 //
310  /*
311  c Find solution to: t**4 + 2*E*t**3 + 2*F*t - 1 = 0
312  P = (E*F + 1.)*4.d0/3.d0
313  Q = (E*E - F*F)*2.d0
314  D = P*P*P + Q*Q
315  if(D.ge.0d0) then
316  s = dsqrt(D) + Q
317  s = dsign(dexp(dlog(dabs(s))/3.d0),s)
318  v = P/s - s
319  c Improve the accuracy of numeric values of v
320  v = -(Q + Q + v*v*v)/(3.d0*P)
321  else
322  v = 2.d0*dsqrt(-P)*dcos(dacos(Q/P/dsqrt(-P))/3.d0)
323  endif
324  G = .5d0*(E + dsqrt(E*E + v))
325  t = dsqrt(G*G + (F - v*G)/(G + G - E)) - G
326  */
327 //
328 // P = (E*F + 1.0)*4.0/3.0;
329 // Q = (E*E - F*F)*2.0;
330 // D = P*P*P + Q*Q;
331 // if (D>=0.0)
332 // {
333 // s = sqrt(D) + Q;
334 // s = sign(exp(log(fabs(s))/3.0), s);
335 // v = P/s - s;
336 // v = -(Q + Q + v*v*v)/(3.0*P);
337 // }
338 // else
339 // v = 2.0*sqrt(-P)*cos(acos(Q/P/sqrt(-P))/3.0);
340 //
341 // G = 0.5*(E + sqrt(E*E + v));
342 // t = sqrt(G*G + (F - v*G)/(G + G - E)) - G;
343 //
344  /*
345  fi = datan((1.d0 - t*t)*a/(2.d0*b*t))
346  h = (r - a*t)*dcos(fi) + (z - b)*dsin(fi)
347  return
348  end
349  */
350 // latitude = atan((1.0 - t*t)*a/(2.0*b*t));
351 // height = (rho - a*t)*cos(latitude) + (r.at(Z_AXIS) - b)*sin(latitude);
352 // return;
353 //};
354 #pragma GCC pop_options
355 
356 
357 
358 
359 
360 
361 // An empty constructor:
362 SgVlbiStationInfo::SgVlbiStationInfo(int idx, const QString& key, const QString& aka) :
363  SgObjectInfo(idx, key, aka),
364  clockBreaks_(),
365  auxObservationByScan_(),
366  cableCalsOriginTxt_(""),
367  meteoDataOriginTxt_(""),
368  r_(v3Zero),
369  r_ea_(v3Zero),
370  v_ea_(v3Zero),
371  v3Ecc_(v3Zero),
372  tsysIfFreqs_(),
373  tsysIfIds_(),
374  tsysIfSideBands_(),
375  tsysIfPolarizations_(),
376  pcClocks_(),
377  pcZenith_()
378 {
379  clocksModelOrder_ = 2;
380  cableCalMultiplier_ = 1.0;
382 
385 
386  axisOffset_ = 0.0;
387  axisOffset_ea_ = 0.0;
388  //
389  gradNorth_ = 0.0;
390  gradEast_ = 0.0;
391  tilt_[0] = tilt_[1] = 0.0;
392  //
393  mntType_ = MT_UNKN;
394  latitude_= longitude_= height_ = 0.0;
395  tectonicPlateName_ = "NONE";
396  cdpNumber_ = -1;
397 
398  for (int i=0; i<maxNumOfPolynomials_; i++)
399  {
400  estClockModel_[i] = 0.0;
401  estClockModelSigmas_[i] = 0.0;
402  pClocks_[i] = NULL;
403  };
404  aPrioriClockTerm_0_ = 0.0;
405  aPrioriClockTerm_1_ = 0.0;
406  need2useAPrioriClocks_ = false;
407  //
408  estWetZenithDelay_ = 0.0;
410  gradientDelay_ = 0.0;
411 
412  for (int iWave=0; iWave<11; iWave++)
413  for (int iCoord=0; iCoord<3; iCoord++)
414  {
415  oLoadAmplitudes_[iWave][iCoord] = 0.0;
416  oLoadPhases_[iWave][iCoord] = 0.0;
417  };
418  for (int i=0; i<6; i++)
419  optLoadCoeffs_[i] = 0.0;
420  cId_ = ' ';
421  sId_[0] = ' ';
422  sId_[1] = ' ';
423  sId_[2] = '\0';
424  //
425  // parameters:
426  pZenithDelay_ = NULL;
427  pAtmGradN_ = NULL;
428  pAtmGradE_ = NULL;
429  pRx_ = NULL;
430  pRy_ = NULL;
431  pRz_ = NULL;
432  pAxisOffset_ = NULL;
435  eccRec_ = NULL;
436  isEccNonZero_ = false;
437 };
438 
439 
440 
441 //
442 // A destructor:
444 {
446 
447  QMap<QString, SgVlbiAuxObservation*>::iterator it;
448  for (it=auxObservationByScan_.begin(); it!=auxObservationByScan_.end(); ++it)
449  delete it.value();
450  auxObservationByScan_.clear();
451 
452  if (eccRec_)
453  {
454  delete eccRec_;
455  eccRec_ = NULL;
456  };
457 
458  tsysIfFreqs_.clear();
459  tsysIfIds_.clear();
460  tsysIfSideBands_.clear();
461  tsysIfPolarizations_.clear();
462 };
463 
464 
465 
466 //
468 {
469  QString prefix = "Stn " + getKey().leftJustified(8, ' ') + ": ";
471  for (int i=0; i<maxNumOfPolynomials_; i++)
472  pClocks_[i] = new SgParameter(prefix + QString("").sprintf("Clock_%02d", i));
473  pZenithDelay_ = new SgParameter(prefix + "Zenith");
474  pAtmGradN_ = new SgParameter(prefix + "Grad_N");
475  pAtmGradE_ = new SgParameter(prefix + "Grad_E");
476  pRx_ = new SgParameter(prefix + "coord-X");
477  pRy_ = new SgParameter(prefix + "coord-Y");
478  pRz_ = new SgParameter(prefix + "coord-Z");
479  pAxisOffset_ = new SgParameter(prefix + "Axis Offset");
480  clockBreaks_.createParameters(prefix + "CBr");
481 };
482 
483 
484 
485 //
487 {
488  for (int i=0; i<maxNumOfPolynomials_; i++)
489  if (pClocks_[i])
490  {
491  delete pClocks_[i];
492  pClocks_[i] = NULL;
493  };
494  if (pZenithDelay_)
495  {
496  delete pZenithDelay_;
497  pZenithDelay_ = NULL;
498  };
499  if (pAtmGradN_)
500  {
501  delete pAtmGradN_;
502  pAtmGradN_ = NULL;
503  };
504  if (pAtmGradE_)
505  {
506  delete pAtmGradE_;
507  pAtmGradE_ = NULL;
508  };
509  if (pRx_)
510  {
511  delete pRx_;
512  pRx_ = NULL;
513  };
514  if (pRy_)
515  {
516  delete pRy_;
517  pRy_ = NULL;
518  };
519  if (pRz_)
520  {
521  delete pRz_;
522  pRz_ = NULL;
523  };
524  if (pAxisOffset_)
525  {
526  delete pAxisOffset_;
527  pAxisOffset_ = NULL;
528  };
530 };
531 
532 
533 
534 //
535 void SgVlbiStationInfo::calcCBEpochs4Export(const QMap<QString, SgVlbiAuxObservation*>& auxObsByScan)
536 {
537  if (!auxObsByScan.size())
538  {
540  ": calcCBEpochs4Export(): cannot determine the epoch, the size of auxObs map is zero");
541  return;
542  };
543  for (int i=0; i<clockBreaks_.size(); i++)
544  {
545  SgParameterBreak* pb=clockBreaks_.at(i);
546  SgMJD tLeft(tZero), tRight(tInf);
547  QMap<QString, SgVlbiAuxObservation*>::const_iterator it;
548  for (it=auxObsByScan.begin(); it!=auxObsByScan.end(); ++it)
549  {
550  SgVlbiAuxObservation* obs=it.value();
551 // if (false || obs->isAttr(SgVlbiAuxObservation::Attr_PROCESSED))//ok, right now we use only good obs
552  if (true || obs->isAttr(SgVlbiAuxObservation::Attr_PROCESSED)) // use all obs
553  {
554  if (*obs<*pb && tLeft<*obs)
555  tLeft = *obs;
556  if (*pb<*obs && *obs<tRight)
557  tRight = *obs;
558  };
559  };
560  if (tZero<tLeft && tRight<tInf)
561  {
562  // calculating mean epoch:
563  SgMJD exportEpoch(tLeft);
564  exportEpoch += 0.5*(tRight - tLeft);
565  // round it to minutes:
566  double d=exportEpoch.getTime();
567  d = round(d*24.0*60.0)/24.0/60.0;
568  exportEpoch.setTime(d);
569  // setup epoch for export:
570  pb->setEpoch4Export(exportEpoch);
572  ": calcCBEpochs4Export(): station " + name() + ": set up clock break epoch for export: " +
573  exportEpoch.toString());
574  }
575  else
576  {
577  pb->setEpoch4Export(*pb);
579  ": calcCBEpochs4Export(): cannot determine clock break epoch for export: tLeft: " +
580  tLeft.toString(SgMJD::F_YYYYMMDDHHMMSSSS) + ", tRight: " +
582  };
583  };
584 };
585 
586 /*
587 Sg3dVector SgVlbiStationInfo::r(const SgMJD& t, SgTaskConfig* cfg)
588 {
589  Sg3dVector r(r_);
590  if (cfg->getUseExtAPrioriSitesPositions())
591  r = r_ea_ + v_ea_*(t - t0_);
592  return r;
593 };
594 */
595 
596 
597 
598 //
600 {
601  isEccNonZero_ = true;
603  v3Ecc_ = eccRec_->getDR();
604  else if (eccRec_->getEccType()==SgEccRec::ET_NEU)
605  {
606  Sg3dMatrixR R_e(EAST), R_n(NORTH);
607  Sg3dMatrix m3M=R_n(-longitude_)*R_e(latitude_);
608  v3Ecc_ = m3M*eccRec_->getDR();
609  };
610 };
611 
612 
613 
614 //
615 void SgVlbiStationInfo::checkAuxObs(const QMap<QString, QString>& scanNameById)
616 {
617  if (!auxObservationByScan_.size())
618  {
620  ": checkAuxObs(): station " + name() + ": the size of aux.obs's container is zero");
621  return;
622  };
623  QMap<SgMJD, QString> scanByTime;
624  QMap<QString, SgVlbiAuxObservation*>::iterator
625  it=auxObservationByScan_.begin();
626  //
627  while (it != auxObservationByScan_.end())
628  {
629  // check for the "same epoch" case:
630  SgVlbiAuxObservation *auxObs=it.value();
631  if (!scanByTime.contains(*auxObs))
632  scanByTime.insert(*auxObs, it.key());
633  else
634  {
635  QString scanName=scanByTime.value(*auxObs);
637  ": WARNING: the station " + name() + ": contains different observations at the same epoch: " +
638  auxObs->toString() + "; the scans: " + scanName + " and " + it.key(), true);
639  };
640  // remove unused data:
641  if (!scanNameById.contains(it.key()))
642  {
644  ": the scan " + it.key() + " was removed from the list of known scans of the station " +
645  name());
646  it = auxObservationByScan_.erase(it);
647  }
648  else
649  ++it;
650  };
651 /*
652  for (; it!=auxObservationByScan_.end(); ++it)
653  {
654  SgVlbiAuxObservation *auxObs=it.value();
655  if (!scanByTime.contains(*auxObs))
656  scanByTime.insert(*auxObs, it.key());
657  else
658  {
659  QString scanName=scanByTime.value(*auxObs);
660  logger->write(SgLogger::WRN, SgLogger::STATION, className() +
661  ": WARNING: the station " + getKey() + ": contains different observations at the same epoch: " +
662  auxObs->toString() + "; the scans: " + scanName + " and " + it.key(), true);
663  };
664  };
665 */
666 };
667 
668 
669 
670 //
672 {
674 
677 
678  if (s.status() != QDataStream::Ok)
679  {
681  ": saveIntermediateResults(): error writting data");
682  return false;
683  };
684  //
685  for (int i=0; i<clocksModelOrder_; i++)
686  if (s.status() == QDataStream::Ok)
687  s << estClockModel_[i] << estClockModelSigmas_[i];
688  else
689  {
691  ": saveIntermediateResults(): error writting data idx#" + QString("").setNum(i));
692  return false;
693  };
694  //
695  if (s.status() == QDataStream::Ok)
697 
699  {
701  ": saveIntermediateResults(): error writting data for the local clock parameter setup");
702  return false;
703  };
705  {
707  ": saveIntermediateResults(): error writting data for the local zenith parameter setup");
708  return false;
709  };
710  //
711  return s.status() == QDataStream::Ok;
712 };
713 
714 
715 
716 //
718 {
719  int n;
720  double v, e, a_0, a_1;
721  bool is;
722 
724 
725  s >> n >> v >> e >> a_0 >> a_1 >> is;
726 
727  if (s.status() != QDataStream::Ok)
728  {
730  ": loadIntermediateResults(): error reading data: " +
731  (s.status()==QDataStream::ReadPastEnd?"read past end of the file":"read corrupt data"));
732  return false;
733  };
734  clocksModelOrder_ = n;
735  estWetZenithDelay_ = v;
737 
738  aPrioriClockTerm_0_ = a_0;
739  aPrioriClockTerm_1_ = a_1;
741 
742  //
743  for (int i=0; i<clocksModelOrder_; i++)
744  {
745  s >> v >> e;
746  if (s.status() == QDataStream::Ok)
747  {
748  estClockModel_[i] = v;
749  estClockModelSigmas_[i] = e;
750  }
751  else
752  {
754  ": loadIntermediateResults(): error reading data idx#" + QString("").setNum(i) + ": " +
755  (s.status()==QDataStream::ReadPastEnd?"read past end of the file":"read corrupt data"));
756  return false;
757  };
758  };
759  //
761  if (s.status() != QDataStream::Ok)
762  {
764  ": loadIntermediateResults(): error reading clock breaks data: " +
765  (s.status()==QDataStream::ReadPastEnd?"read past end of the file":"read corrupt data"));
766  return false;
767  };
768  //
770  if (s.status() != QDataStream::Ok)
771  {
773  ": loadIntermediateResults(): error reading local clock parameter setup: " +
774  (s.status()==QDataStream::ReadPastEnd?"read past end of the file":"read corrupt data"));
775  return false;
776  };
777  //
779  if (s.status() != QDataStream::Ok)
780  {
782  ": loadIntermediateResults(): error reading local zenith parameter setup: " +
783  (s.status()==QDataStream::ReadPastEnd?"read past end of the file":"read corrupt data"));
784  return false;
785  };
786  //
787  return s.status()==QDataStream::Ok;
788 };
789 
790 
791 
792 //
794 {
795  for (QMap<QString, SgVlbiAuxObservation*>::iterator it=auxObservationByScan_.begin();
796  it!=auxObservationByScan_.end(); ++it)
797  it.value()->resetCable();
798  // clear the attributes too:
800 };
801 
802 
803 
804 //
806 {
807  for (QMap<QString, SgVlbiAuxObservation*>::iterator it=auxObservationByScan_.begin();
808  it!=auxObservationByScan_.end(); ++it)
809  it.value()->resetMeteo();
810  // clear the attributes too:
812 };
813 
814 
815 
816 //
818 {
819  for (QMap<QString, SgVlbiAuxObservation*>::iterator it=auxObservationByScan_.begin();
820  it!=auxObservationByScan_.end(); ++it)
821  it.value()->resetTsys();
822  // clear the attributes too:
824 };
825 /*=====================================================================================================*/
826 
827 
828 
829 
830 /*=====================================================================================================*/
831 //
832 // FRIENDS:
833 //
834 /*=====================================================================================================*/
835 //
836 
837 
838 
839 
840 /*=====================================================================================================*/
841 //
842 // aux functions:
843 //
844 
845 
846 
847 /*=====================================================================================================*/
848 //
849 // constants:
850 //
851 
852 
853 
854 
855 
856 
857 
858 
859 
860 
861 
862 
863 /*=====================================================================================================*/
const Sg3dVector v3Zero(0.0, 0.0, 0.0)
SgLogger * logger
Definition: SgLogger.cpp:231
const SgMJD tZero(1957, 10, 4)
const SgMJD tInf(2100, 1, 1)
@ Z_AXIS
Definition: SgMathSupport.h:68
@ X_AXIS
Definition: SgMathSupport.h:68
@ Y_AXIS
Definition: SgMathSupport.h:68
@ EAST
Definition: SgMathSupport.h:68
@ NORTH
Definition: SgMathSupport.h:68
#define MAX_NUMBER_OF_POLYNOMIALS
double at(DIRECTION i) const
Definition: Sg3dVector.h:91
bool isAttr(uint a) const
Definition: SgAttribute.h:226
void delAttr(uint a)
Definition: SgAttribute.h:210
void addAttr(uint a)
Definition: SgAttribute.h:202
void createParameters(const QString &prefix)
bool loadIntermediateResults(QDataStream &)
void releaseParameters()
bool saveIntermediateResults(QDataStream &) const
@ ET_NEU
Definition: SgEccRec.h:51
@ ET_XYZ
Definition: SgEccRec.h:52
EccType getEccType() const
Definition: SgEccRec.h:251
const Sg3dVector & getDR() const
Definition: SgEccRec.h:243
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
@ IO_NCDF
Definition: SgLogger.h:66
@ IO_BIN
Definition: SgLogger.h:64
@ STATION
Definition: SgLogger.h:75
Definition: SgMJD.h:59
double getTime() const
Definition: SgMJD.h:457
void setTime(double dTime)
Definition: SgMJD.cpp:165
@ F_YYYYMMDDHHMMSSSS
Long verbose: Fri, the 2nd of Apr, 2010; 17hr 02min 43.6400sec.
Definition: SgMJD.h:67
QString toString(Format format=F_Verbose) const
Definition: SgMJD.cpp:1007
bool loadIntermediateResults(QDataStream &)
const QString & getKey() const
Definition: SgObjectInfo.h:319
bool saveIntermediateResults(QDataStream &) const
@ Attr_PROCESSED
the observation has been processed;
Definition: SgObservation.h:79
void setEpoch4Export(const SgMJD &)
Definition: SgBreakModel.h:467
bool saveIntermediateResults(QDataStream &) const
bool loadIntermediateResults(QDataStream &)
static const QString className()
void calcCBEpochs4Export(const QMap< QString, SgVlbiAuxObservation * > &)
SgParameter * pAtmGradE_
static const int maxNumOfPolynomials_
SgParameter * pAtmGradN_
bool saveIntermediateResults(QDataStream &) const
SgParameterCfg pcClocks_
SgParameter * pAxisOffset_
SgBreakModel clockBreaks_
QString name() const
QVector< QString > tsysIfIds_
double oLoadAmplitudes_[11][3]
CableCalsOrigin cableCalsOrigin_
@ Attr_ESTIMATE_AXO
estimate axis offset;
@ Attr_HAS_CABLE_CAL
a station has cable calibration readings;
@ Attr_ESTIMATE_COO
estimate station position;
@ Attr_HAS_METEO
a station has meteo parameters;
SgParameter * pClocks_[MAX_NUMBER_OF_POLYNOMIALS]
MeteoDataOrigin meteoDataOrigin_
static int mntType2int(MountingType)
QVector< double > tsysIfFreqs_
double estClockModel_[MAX_NUMBER_OF_POLYNOMIALS]
bool loadIntermediateResults(QDataStream &)
QVector< QString > tsysIfSideBands_
static MountingType int2mntType(int)
double estClockModelSigmas_[MAX_NUMBER_OF_POLYNOMIALS]
SgParameter * pZenithDelay_
void checkAuxObs(const QMap< QString, QString > &scanNameById)
static void calcRLF(double &latitude, double &longitude, double &height, const Sg3dVector &r, bool useOldEllipsoid)
QVector< QString > tsysIfPolarizations_
SgParameterCfg pcZenith_
double oLoadPhases_[11][3]
SgVlbiStationInfo(int idx=-1, const QString &key="Unknown", const QString &aka="Unknown too")
QMap< QString, SgVlbiAuxObservation * > auxObservationByScan_