General Purpose Geodetic Library
SgVgosDbStoreSession.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 
24 #include <math.h>
25 #include <netcdf.h>
26 
27 #include <QtCore/QDir>
28 #include <QtCore/QFile>
29 #include <QtCore/QRegExp>
30 #include <QtCore/QTextStream>
31 
32 
33 #include <SgIdentities.h>
34 #include <SgLogger.h>
35 #include <SgModelsInfo.h>
36 #include <SgVgosDb.h>
37 #include <SgVlbiHistory.h>
38 #include <SgVlbiStationInfo.h>
39 
40 
41 
42 
43 
44 /*=====================================================================================================*/
45 /* */
46 /* SgVgosDb implementation (continue -- storeSession part of vgosDb data tree) */
47 /* */
48 /*=====================================================================================================*/
49 //
50 //
51 bool SgVgosDb::storeAtmSetup(const SgVector* interval, const SgVector* rateConstraint,
52  const QList<QString> &sites)
53 {
55  SgNetCdf ncdf(path2RootDir_ + "/" +
57  sessionCode_, "", "");
58  //
59  // adjust dimensions:
60  fcAtmInterval .alternateDimension(0, interval->n());
61  fcAtmRateConstraint .alternateDimension(0, rateConstraint->n());
62  fcAtmRateSite .alternateDimension(0, sites.size());
63  if (!setupFormat(fcfAtmSetup, ncdf))
64  {
66  "::storeAtmSetup(): format description failed");
67  return false;
68  };
69  // restore the dimensions:
73  ncdf.setServiceVars(var.getStub(), "The data are specified by user", "", "");
74  //
75  double *pT=ncdf.lookupVar(fcAtmInterval .name())->data2double();
76  double *pC=ncdf.lookupVar(fcAtmRateConstraint.name())->data2double();
77  char *pS=ncdf.lookupVar(fcAtmRateSite .name())->data2char ();
78  int len=fcAtmRateSite.dims().at(1);
79  for (unsigned int i=0; i<interval->n(); i++)
80  pT[i] = interval->getElement(i);
81  for (unsigned int i=0; i<rateConstraint->n(); i++)
82  pC[i] = rateConstraint->getElement(i);
83  for (int i=0; i<sites.size(); i++)
84  strncpy(pS + len*i, qPrintable(sites.at(i)), len);
85  // write data:
87  if (!ncdf.putData())
88  {
90  "::storeAtmSetup(): cannot put data into " + ncdf.getFileName());
91  return false;
92  };
95  "::storeAtmSetup(): the data were successfully stored in " + ncdf.getFileName());
96  return true;
97 };
98 
99 
100 
101 //
102 bool SgVgosDb::storeClockSetup(const SgVector* interval, const SgVector* rateConstraint,
103  const QList<QString> &sites, const QList<QString> &refSites)
104 {
106  SgNetCdf ncdf(path2RootDir_ + "/" +
108  sessionCode_, "", "");
109  FmtChkVar fcRefClocks("ReferenceClock", NC_CHAR, false, QList<int>(),
110  "CLK_SITS", "List of clock reference stations");
112  //
113  // adjust dimensions:
114  if (refSites.size()==1)
115  fcRefClocks.addDimension(8);
116  else if (refSites.size()>1)
117  {
118  fcRefClocks.addDimension(refSites.size());
119  fcRefClocks.addDimension(8);
120  };
121  if (refSites.size()>0)
122  fcf << &fcRefClocks;
123  fcClockInterval .alternateDimension(0, interval->n());
124  fcClockRateConstraint .alternateDimension(0, rateConstraint->n());
125  fcClockRateName .alternateDimension(0, sites.size());
126  if (!setupFormat(fcf, ncdf))
127  {
129  "::storeClockSetup(): format description failed");
130  return false;
131  };
132  // restore the dimensions:
136  ncdf.setServiceVars(var.getStub(), "The data are specified by user", "", "");
137  //
138  double *pT=ncdf.lookupData2double(fcClockInterval .name());
139  double *pC=ncdf.lookupData2double(fcClockRateConstraint.name());
140  char *pS=ncdf.lookupData2char (fcClockRateName .name());
141  char *pR=ncdf.lookupData2char (fcRefClocks .name());
142  int len=fcClockRateName.dims().at(1);
143  for (unsigned int i=0; i<interval->n(); i++)
144  pT[i] = interval->getElement(i);
145  for (unsigned int i=0; i<rateConstraint->n(); i++)
146  pC[i] = rateConstraint->getElement(i);
147  for (int i=0; i<sites.size(); i++)
148  strncpy(pS + len*i, qPrintable(sites.at(i)), len);
149  for (int i=0; i<refSites.size(); i++)
150  strncpy(pR + len*i, qPrintable(refSites.at(i)), len);
151  // write data:
153  if (!ncdf.putData())
154  {
156  "::storeClockSetup(): cannot put data into " + ncdf.getFileName());
157  return false;
158  };
161  "::storeClockSetup(): the data were successfully stored in " + ncdf.getFileName());
162  return true;
163 };
164 
165 
166 
167 //
168 bool SgVgosDb::storeErpSetup(double pmOffsetConstraint, double utOffsetConstraint)
169 {
171  SgNetCdf ncdf(path2RootDir_ + "/" +
173  sessionCode_, "", "");
174  //
175  // adjust dimensions:
176  if (!setupFormat(fcfErpSetup, ncdf))
177  {
179  "::storeErpSetup(): format description failed");
180  return false;
181  };
182  // restore the dimensions:
183  ncdf.setServiceVars(var.getStub(), "The data are specified by user", "", "");
184  //
185  *ncdf.lookupVar(fcPmOffsetConstraint.name())->data2double() = pmOffsetConstraint;
186  *ncdf.lookupVar(fcUtOffsetConstraint.name())->data2double() = utOffsetConstraint;
187  // write data:
189  if (!ncdf.putData())
190  {
192  "::storeErpSetup(): cannot put data into " + ncdf.getFileName());
193  return false;
194  };
197  "::storeErpSetup(): the data were successfully stored in " + ncdf.getFileName());
198  return true;
199 };
200 
201 
202 
203 //
204 bool SgVgosDb::storeIonoSetup(const QList<int> &flags, const QList<QString> &sites)
205 {
207  SgNetCdf ncdf(path2RootDir_ + "/" +
209  sessionCode_, "", "");
210  //
211  // adjust dimensions:
212  if (!setupFormat(fcfIonoSetup, ncdf))
213  {
215  "::storeIonoSetup(): format description failed");
216  return false;
217  };
218  ncdf.setServiceVars(var.getStub(), "The data are set by software", "", "");
219  //
220  char *pS=ncdf.lookupVar(fcIonoStationList.name())->data2char ();
221  short *pF=ncdf.lookupVar(fcIonoSolveFlag .name())->data2short();
222  short len=8;
223  for (int i=0; i<sites.size(); i++)
224  {
225  strncpy(pS + len*i, qPrintable(sites.at(i)), len);
226  pF[i] = flags.at(i);
227  };
228  // write data:
230  if (!ncdf.putData())
231  {
233  "::storeIonoSetup(): cannot put data into " + ncdf.getFileName());
234  return false;
235  };
238  "::storeIonoSetup(): the data were successfully stored in " + ncdf.getFileName());
239  return true;
240 };
241 
242 
243 
244 //
245 bool SgVgosDb::storeSolveWeights(const QVector<QString> &baselineNames, SgMatrix* groupBlWeights)
246 {
248  SgNetCdf ncdf(path2RootDir_ + "/" +
250  sessionCode_, "", "");
251  int numOfBaselines=baselineNames.size();
252  // checking:
253  if (!groupBlWeights)
254  {
256  "::storeSolveWeights(): cannot put data into " + ncdf.getFileName() + ": groupBlWeights is NULL");
257  return false;
258  };
259  if (numOfBaselines != (int)groupBlWeights->nCol())
260  {
262  "::storeSolveWeights(): cannot put data into " + ncdf.getFileName() +
263  ": baselineNames (" + QString("").setNum(baselineNames.size()) + ") and groupBlWeights (" +
264  QString("").setNum((int)groupBlWeights->nCol()) + ") dimensions missmatch");
265  return false;
266  };
267  //
268  // adjust dimensions:
269  fcGroupBLWeights .alternateDimension(1, numOfBaselines);
270  fcGroupBLWeightName .alternateDimension(0, numOfBaselines);
271  if (!setupFormat(fcfGroupBLWeights, ncdf))
272  {
274  "::storeSolveWeights(): format description failed");
275  return false;
276  };
277  // restore the dimensions:
280  ncdf.setServiceVars(var.getStub(), "The data are generated by the software", "", "");
281  //
282  double *pW=ncdf.lookupData2double(fcGroupBLWeights .name());
283  char *pS=ncdf.lookupData2char (fcGroupBLWeightName.name());
284  int len=fcGroupBLWeightName.dims().at(2);
285  for (int i=0; i<numOfBaselines; i++)
286  {
287  pW[ i] = groupBlWeights->getElement(0, i);
288  pW[numOfBaselines + i] = groupBlWeights->getElement(1, i);
289  strncpy(pS + 2*len*i , qPrintable(baselineNames.at(i).mid(0,8)), len);
290  strncpy(pS + 2*len*i + len, qPrintable(baselineNames.at(i).mid(9,8)), len);
291  };
292  // write data:
294  if (!ncdf.putData())
295  {
297  "::storeSolveWeights(): cannot put data into " + ncdf.getFileName());
298  return false;
299  };
302  "::storeSolveWeights(): the data were successfully stored in " + ncdf.getFileName());
303  return true;
304 };
305 
306 
307 
308 //
309 bool SgVgosDb::storeSelectionStatus(const QVector<int> &sourcesSelection,
310  const QVector< QVector<int> > &stationsSelection)
311 {
313  SgNetCdf ncdf(path2RootDir_ + "/" +
315  sessionCode_, "", "");
316  //
317  if (!setupFormat(fcfSelectionStatus, ncdf))
318  {
320  "::storeSelectionStatus(): format description failed");
321  return false;
322  };
323  ncdf.setServiceVars(var.getStub(), "The data are assigned by the user", "", "");
324  //
325  short *pS=ncdf.lookupData2short(fcSrcSelectionFlag.name());
326  short *pB=ncdf.lookupData2short(fcBlnSelectionFlag.name());
327  for (int i=0; i<numOfSrc_; i++)
328  {
329  pS[i] = sourcesSelection.at(i);
330  };
331  for (int i=0; i<numOfStn_; i++)
332  {
333  for (int j=0; j<numOfStn_; j++)
334  pB[numOfStn_*j + i] = stationsSelection.at(i).at(j);
335  };
336  // write data:
338  if (!ncdf.putData())
339  {
341  "::storeSelectionStatus(): cannot put data into " + ncdf.getFileName());
342  return false;
343  };
346  "::storeSelectionStatus(): the data were successfully stored in " + ncdf.getFileName());
347  return true;
348 };
349 
350 
351 
352 //
354 {
355  if (!baselines.size())
356  return true;
358  SgNetCdf ncdf(path2RootDir_ + "/" +
360  sessionCode_, "", "");
361  //
362  // adjust dimension:
363  fcBaselineClock.alternateDimension(0, baselines.size());
364  if (!setupFormat(fcfBlnClockSetup, ncdf))
365  {
367  "::storeBaselineClockSetup(): format description failed");
368  return false;
369  };
370  // restore the dimension:
372  ncdf.setServiceVars(var.getStub(), "The data are assigned by the user", "", "");
373  //
374  char *pS=ncdf.lookupData2char (fcBaselineClock.name());
375  int len=fcBaselineClock.dims().at(2);
376  for (int i=0; i<baselines.size(); i++)
377  {
378  strncpy(pS + 2*len*i , qPrintable(baselines.at(i).mid(0,8)), len);
379  strncpy(pS + 2*len*i + len, qPrintable(baselines.at(i).mid(9,8)), len);
380  };
381  // write data:
383  if (!ncdf.putData())
384  {
386  "::storeBaselineClockSetup(): cannot put data into " + ncdf.getFileName());
387  return false;
388  };
391  "::storeBaselineClockSetup(): the data were successfully stored in " + ncdf.getFileName());
392  return true;
393 };
394 
395 
396 
397 //
398 bool SgVgosDb::storeEccentricities(const QVector<QString> &stationsNames,
399  const QVector<QString> &eccTypes, const QVector<QString> &eccNums, SgMatrix* eccVals,
400  const QString &eccFileName)
401 {
403  SgNetCdf ncdf(path2RootDir_ + "/" +
405  sessionCode_, "", "");
406  //
407  if (!setupFormat(fcfEccentricity, ncdf))
408  {
410  "::storeEccentricities(): format description failed");
411  return false;
412  };
413  ncdf.setServiceVars(var.getStub(), "The data are extracted from the file " + eccFileName, "", "");
414  //
415  char *pT=ncdf.lookupData2char (fcEccentricityType .name());
416  char *pS=ncdf.lookupData2char (fcEccentricityName .name());
417  char *pM=ncdf.lookupData2char (fcEccentricityMonument.name());
418  double *pV=ncdf.lookupData2double(fcEccentricityVector .name());
419  int lT=fcEccentricityType .dims().at(1);
420  int lS=fcEccentricityName .dims().at(1);
421  int lM=fcEccentricityMonument .dims().at(1);
422  for (int i=0; i<numOfStn_; i++)
423  {
424  strncpy(pT + lT*i, qPrintable(eccTypes.at(i)), lT);
425  strncpy(pS + lS*i, qPrintable(stationsNames.at(i)), lS);
426  strncpy(pM + lM*i, qPrintable(eccNums.at(i)), lM);
427  pV[3*i ] = eccVals->getElement(i, 0);
428  pV[3*i + 1] = eccVals->getElement(i, 1);
429  pV[3*i + 2] = eccVals->getElement(i, 2);
430  };
431  // write data:
433  if (!ncdf.putData())
434  {
436  "::storeEccentricities(): cannot put data into " + ncdf.getFileName());
437  return false;
438  };
441  "::storeEccentricities(): the data were successfully stored in " + ncdf.getFileName());
442  return true;
443 };
444 
445 
446 
447 //
448 bool SgVgosDb::storeCalibrations(int obsCalFlags, const QVector<int> &statCalFlags,
449  const QVector< QVector<int> > &flybyFlags, const QVector<QString> &statCalNames,
450  const QVector<QString> &flybyNames, const QVector<QString> &calSiteNames,
451  const QVector<QString> &obsCalNames)
452 {
454  SgNetCdf ncdf(path2RootDir_ + "/" +
456  sessionCode_, "", "");
457  //
458  // adjust dimension:
459  fcObsCalName .alternateDimension(0, obsCalNames.size());
460  fcStatCalName .alternateDimension(0, statCalNames.size());
461  fcFlybyName .alternateDimension(0, flybyNames.size());
462  //
463  if (!setupFormat(fcfCalibrationSetup, ncdf))
464  {
466  "::storeCalibrations(): format description failed");
467  return false;
468  };
472  ncdf.setServiceVars(var.getStub(), "The data are the results of the user activity", "", "");
473  //
474  int n, l;
475  short *p;
476  char *c;
477  //
478  *ncdf.lookupData2short(fcObsCalFlag.name()) = obsCalFlags;
479  // fcStatCalFlag: SD_NumStn,
480  p = ncdf.lookupData2short(fcStatCalFlag.name());
481  for (int i=0; i<numOfStn_; i++)
482  p[i] = statCalFlags[i];
483  // fcFlybyFlag: SD_NumStn << 7,
484  p = ncdf.lookupData2short(fcFlybyFlag.name());
485  l = fcFlybyFlag.dims().at(1);
486  for (int iStn=0; iStn<numOfStn_; iStn++)
487  for (int j=0; j<l; j++)
488  p[l*iStn + j] = (flybyFlags[iStn])[j];
489  // fcStatCalName: SD_Any << 8,
490  c = ncdf.lookupData2char(fcStatCalName.name());
491  n = statCalNames.size();
492  l = fcStatCalName.dims().at(1);
493  for (int i=0; i<n; i++)
494  strncpy(c + l*i, qPrintable(statCalNames.at(i)), l);
495  // fcFlybyName: SD_Any << 8,
496  c = ncdf.lookupData2char(fcFlybyName.name());
497  n = flybyNames.size();
498  l = fcFlybyName.dims().at(1);
499  for (int i=0; i<n; i++)
500  strncpy(c + l*i, qPrintable(flybyNames.at(i)), l);
501  // fcCalStationName: SD_NumStn << 8,
503  l = fcCalStationName.dims().at(1);
504  for (int i=0; i<numOfStn_; i++)
505  strncpy(c + l*i, qPrintable(calSiteNames.at(i)), l);
506  // fcObsCalName: SD_Any << 8,
507  c = ncdf.lookupData2char(fcObsCalName.name());
508  n = obsCalNames.size();
509  l = fcObsCalName.dims().at(1);
510  for (int i=0; i<n; i++)
511  strncpy(c + l*i, qPrintable(obsCalNames.at(i)), l);
512  // write data:
514  if (!ncdf.putData())
515  {
517  "::storeCalibrations(): cannot put data into " + ncdf.getFileName());
518  return false;
519  };
522  "::storeCalibrations(): the data were successfully stored in " + ncdf.getFileName());
523  return true;
524 };
525 
526 
527 
528 //
529 bool SgVgosDb::storeClockBreaks(const QVector<QString> &cbNames, const QVector<SgMJD> &cbEpochs,
530  const QVector<int> &cbFlags, const QString& band)
531 {
533  SgNetCdf ncdf(path2RootDir_ + "/" +
535  sessionCode_, "", band);
536  //
537  // adjust dimensions:
538  int numCB, stnNameLength;
539  numCB = cbNames.size();
540  if (!numCB)
541  return true;
542  stnNameLength = cbNames.at(0).size();
544  if (numCB > 1)
546  fcClockBreakSite.addDimension(stnNameLength);
548  if (!setupFormat(fcfClockBreak, ncdf))
549  {
551  "::storeClockBreaks(): format description failed");
552  return false;
553  };
554  // restore the dimensions:
558  ncdf.setServiceVars(var.getStub(), "The data are the results of the user activity", "", "");
559  //
560  *ncdf.lookupData2short(fcClockBreakNumber.name()) = numCB;
561  strncpy(ncdf.lookupData2char(fcClockBreakStatus.name()), "YE", 3);
562  //
563  short *pF=ncdf.lookupData2short (fcClockBreakFlag .name());
564  double *pT=ncdf.lookupData2double(fcClockBreakEpoch.name());
565  char *pS=ncdf.lookupData2char (fcClockBreakSite .name());
566  for (int i=0; i<numCB; i++)
567  {
568  pF[i] = cbFlags.at(i);
569  pT[i] = cbEpochs.at(i).toDouble();
570  strncpy(pS + stnNameLength*i, qPrintable(cbNames.at(i)), stnNameLength);
571  };
572  // write data:
574  if (!ncdf.putData())
575  {
577  "::storeClockBreaks(): cannot put data into " + ncdf.getFileName());
578  return false;
579  };
582  "::storeClockBreaks(): the data were successfully stored in " + ncdf.getFileName());
583  return true;
584 };
585 
586 
587 
588 //
589 bool SgVgosDb::storeSessionHead(const QString& corrType, const QString& corrName, const QString& piName,
590  const QString& experimentName, int experimentSerialNumber,
591  const QString& experimentDescription, const QString& recordingMode,
592  const QList<QString>& stations, const QList<QString>& sources,
593  const SgMJD& tStart, const SgMJD& tFinis, int cppsIdx)
594 {
595  SgVdbVariable &var=vHead_;
596  SgNetCdf ncdf(path2RootDir_ + "/" +
598  sessionCode_, "", "");
599  // checking:
600  if (numOfStn_ != stations.size())
601  {
603  "::storeSessionHead(): station list size mismatch: " + QString("").setNum(numOfStn_) +
604  " vs " + QString("").setNum(stations.size()));
605  return false;
606  };
607  if (numOfSrc_ != sources.size())
608  {
610  "::storeSessionHead(): source list size mismatch: " + QString("").setNum(numOfSrc_) +
611  " vs " + QString("").setNum(sources.size()));
612  return false;
613  };
614 
615  //
616  // set up dimensions:
617  fcCorrelatorType .alternateDimension(0, corrType.size());
618  fcCorrelator .alternateDimension(0, corrName.size());
619  fcPrincipalInvestigator .alternateDimension(0, piName.size());
620  fcExpName .alternateDimension(0, experimentName.size());
621  fcExpDescription .alternateDimension(0, experimentDescription.size());
622  fcRecordingMode .alternateDimension(0, recordingMode.size());
623  //
624  if (!setupFormat(fcfHead, ncdf))
625  {
627  "::storeSessionHead(): format description failed");
628  return false;
629  };
636 
637  ncdf.setServiceVars(var.getStub(), "Data are extracted from correlator output", "", "");
638  //
639  short *pN;
640  char *pS;
641  int ep[5], len;
642  double f;
643 
644  //
645  *ncdf.lookupData2int(fcNumObs .name()) = numOfObs_;
646  *ncdf.lookupData2int(fcNumScan .name()) = numOfScans_;
647  *ncdf.lookupData2short(fcNumSource .name()) = numOfSrc_;
648  *ncdf.lookupData2short(fcNumStation .name()) = numOfStn_;
649 
650  *ncdf.lookupData2int(fcCorrPostProcSoftware.name()) = cppsIdx;
651  //
652  pN = ncdf.lookupData2short(fciUTCInterval.name());
653  //
654  tStart.toYMDHMS_tr(ep[0], ep[1], ep[2], ep[3], ep[4], f);
655  for (int i=0; i<5; i++)
656  pN[i] = ep[i];
657  tFinis.toYMDHMS_tr(ep[0], ep[1], ep[2], ep[3], ep[4], f);
658  for (int i=0; i<5; i++)
659  pN[i + 5] = ep[i];
660  //
661  if (stations.size())
662  {
663  len = stations.at(0).size();
664  pS = ncdf.lookupData2char(fcStationList.name());
665  for (int i=0; i<stations.size(); i++)
666  strncpy(pS + len*i, qPrintable(stations.at(i)), len);
667  };
668  if (sources.size())
669  {
670  len = sources.at(0).size();
671  pS = ncdf.lookupData2char(fcSourceList.name());
672  for (int i=0; i<sources.size(); i++)
673  strncpy(pS + len*i, qPrintable(sources.at(i)), len);
674  };
675  //
677  strncpy(pS, qPrintable(corrType), corrType.size());
678  //
679  pS = ncdf.lookupData2char(fcCorrelator.name());
680  strncpy(pS, qPrintable(corrName), corrName.size());
681  //
683  strncpy(pS, qPrintable(piName), piName.size());
684  //
685  pS = ncdf.lookupData2char(fcExpName.name());
686  strncpy(pS, qPrintable(experimentName), experimentName.size());
687  //
688  *ncdf.lookupData2short(fcExpSerialNumber.name()) = experimentSerialNumber;
689  //
691  strncpy(pS, qPrintable(experimentDescription), experimentDescription.size());
692  //
693  pS = ncdf.lookupData2char(fcRecordingMode.name());
694  strncpy(pS, qPrintable(recordingMode), recordingMode.size());
695  //
696  // write data:
698  if (!ncdf.putData())
699  {
701  "::storeSessionHead(): cannot put data into " + ncdf.getFileName());
702  return false;
703  };
706  "::storeSessionHead(): the data were successfully stored in " + ncdf.getFileName());
707  return true;
708 };
709 
710 
711 
712 //
713 bool SgVgosDb::storeLeapSecond(int leapSeconds)
714 {
716  SgNetCdf ncdf(path2RootDir_ + "/" +
718  sessionCode_, "", "");
719  //
720  if (!setupFormat(fcfLeapSecond, ncdf))
721  {
723  "::storeLeapSecond(): format description failed");
724  return false;
725  };
726  ncdf.setServiceVars(var.getStub(), "The data are provided by CALC software ", "", "");
727  //
728  *ncdf.lookupVar(fcLeapSecond.name())->data2short() = leapSeconds;
729  // write data:
731  if (!ncdf.putData())
732  {
734  "::storeLeapSecond(): cannot put data into " + ncdf.getFileName());
735  return false;
736  };
737  have2redoLeapSecond_ = false;
740  "::storeLeapSecond(): the data were successfully stored in " + ncdf.getFileName());
741  return true;
742 };
743 
744 
745 
746 //
747 bool SgVgosDb::storeMiscCable(const QMap<QString, QString>& cableSignByKey)
748 {
750  SgNetCdf ncdf(path2RootDir_ + "/" +
752  sessionCode_, "", "");
753  QString signs("");
754  int num=cableSignByKey.size(), l;
755  if (num == 0)
756  {
758  "::storeMiscCable(): nothing to write");
759  return false;
760  };
761  //
762  // adjust dimensions (mimic db2vgosDB):
763  l = 0;
764  for (QMap<QString, QString>::const_iterator it=cableSignByKey.begin(); it!=cableSignByKey.end(); ++it)
765  {
766  if (l < it.key().size())
767  l = it.key().size();
768  signs += it.value() + " ";
769  };
770  signs.chop(1);
771  if (signs.size() != 2*num - 1)
772  {
774  "::storeMiscCable(): signs size mismatch: " + QString("").setNum(signs.size()) +
775  " vs " + QString("").setNum(2*num - 1));
776  return false;
777  };
780  fcCableSign .alternateDimension(0, 2*num - 1);
781  if (!setupFormat(fcfMiscCable, ncdf))
782  {
784  "::storeMiscCable(): format description failed");
785  return false;
786  };
787  // restore the dimensions:
791  ncdf.setServiceVars(var.getStub(), "The data are exctracted from station log files", "", "");
792  //
793  char *pSgn=ncdf.lookupData2char(fcCableSign.name());
794  char *pStn=ncdf.lookupData2char(fcCableStnName.name());
795  int idx;
796  idx = 0;
797  for (QMap<QString, QString>::const_iterator it=cableSignByKey.begin();
798  it!=cableSignByKey.end(); ++it, idx++)
799  strncpy(pStn + l*idx, qPrintable(it.key()), l);
800  strncpy(pSgn, qPrintable(signs), signs.size());
801  // write data:
803  if (!ncdf.putData())
804  {
806  "::storeMiscCable(): cannot put data into " + ncdf.getFileName());
807  return false;
808  };
811  "::storeMiscCable(): the data were successfully stored in " + ncdf.getFileName());
812  return true;
813 };
814 
815 
816 
817 //
818 bool SgVgosDb::storeMiscFourFit(const QString& band, SgVlbiSessionInfo::OriginType /*originType*/,
819  const QVector<QString>& fourfitControlFile, const QVector<QString>& fourfitCommand,
820  const QVector<int>& numLags, const QVector<double>& apLength)
821 {
822  SgVdbVariable *var=NULL;
823  if (band.size())
824  {
825  if (!bandDataByName_.contains(band))
826  {
828  "::storeMiscFourFit(): the band \"" + band + "\" is not registered");
829  return false;
830  };
831  var = &bandDataByName_[band].vMiscFourFit_;
832  }
833  else
834  var = &vMiscFourFit_;
835 
836  SgNetCdf ncdf(path2RootDir_ + "/" +
838  sessionCode_, "", band);
839  //
840  if (numOfObs_ != fourfitControlFile.size())
841  {
843  "::storeMiscFourFit(): fourfitControlFile vector size mismatch: " +
844  QString("").sprintf("%d vs %d", numOfObs_, fourfitControlFile.size()));
845  return false;
846  };
847  //
848  // set up the dimensions:
849  int lCmd=0, lCnt=0;
850  for (int i=0; i<numOfObs_; i++)
851  {
852  if (lCmd < fourfitCommand.at(i).size())
853  lCmd = fourfitCommand.at(i).size();
854  if (lCnt < fourfitControlFile.at(i).size())
855  lCnt = fourfitControlFile.at(i).size();
856  };
859  //
860  if (!setupFormat(fcfMiscFourFit_v1002, ncdf, "", band))
861  {
863  "::storeMiscFourFit(): format description failed");
864  return false;
865  };
866  // restore the dimensions:
869  //
870  ncdf.setServiceVars(var->getStub(), "Data are extracted from correlator output", "Obs", "TimeUTC.nc");
871  //
872  char *pCmd=ncdf.lookupVar(fcFourFitCmdCString_v1002 .name())->data2char();
873  char *pCnt=ncdf.lookupVar(fcFourfitControlFile_v1002.name())->data2char();
874  short *pNum=ncdf.lookupVar(fcNumLagsUsed_v1002 .name())->data2short();
875  double *pApL=ncdf.lookupVar(fcAplength_v1002 .name())->data2double();
876  //
877  // fill data structures:
878  //
879  for (int i=0; i<numOfObs_; i++)
880  {
881  // common for all types of correlator:
882  pNum[i] = numLags.at(i);
883  pApL[i] = apLength.at(i);
884  //
885  strncpy(pCmd + lCmd*i, qPrintable(fourfitCommand.at(i)), lCmd);
886  strncpy(pCnt + lCnt*i, qPrintable(fourfitControlFile.at(i)), lCnt);
887  };
888 
889  // write data:
891  if (!ncdf.putData())
892  {
894  "::storeMiscFourFit(): cannot put data into " + ncdf.getFileName());
895  return false;
896  };
899  "::storeMiscFourFit(): the data were successfully stored in " + ncdf.getFileName());
900  return true;
901 };
902 
903 
904 
905 //
907 {
909  SgNetCdf ncdf(path2RootDir_ + "/" +
911  sessionCode_);
912  //
913  // set up the dimensions:
914  int lCtrlName=0, nCtrl=calcInfo.controlFlagNames().size(), numStn;
915  for (int i=0; i<nCtrl; i++)
916  {
917  if (lCtrlName < calcInfo.controlFlagNames().at(i).size())
918  lCtrlName = calcInfo.controlFlagNames().at(i).size();
919  };
920  if (calcInfo.controlFlagValues().size() < nCtrl)
921  {
923  "::storeCalcInfo(): the sizes of control names and values mismatch");
924  nCtrl = calcInfo.controlFlagValues().size();
925  };
926  int lOcnLdSts=0, nOcnLdSts=calcInfo.oLoadStationStatus().size();
927  for (int i=0; i<nOcnLdSts; i++)
928  {
929  if (lOcnLdSts < calcInfo.oLoadStationStatus().at(i).size())
930  lOcnLdSts = calcInfo.oLoadStationStatus().at(i).size();
931  };
932 
934  fcCalcControlNames .alternateDimension(1, lCtrlName);
936  fcATMMessage .alternateDimension(0, calcInfo.troposphere().getDefinition().size());
948  fcATIMessage .alternateDimension(0, calcInfo.atomicTime().getDefinition().size());
949  fcATIControl .alternateDimension(0, calcInfo.atomicTime().getControlFlag().size());
954  fcStarMessage .alternateDimension(0, calcInfo.star().getDefinition().size());
955  fcStarControl .alternateDimension(0, calcInfo.star().getControlFlag().size());
958  fcSiteMessage .alternateDimension(0, calcInfo.site().getDefinition().size());
960  fcPepMessage .alternateDimension(0, calcInfo.ephemeris().getDefinition().size());
962  fcUT1Control .alternateDimension(0, calcInfo.ut1().getControlFlag().size());
965  fcUT1EPOCH .alternateDimension(1, calcInfo.ut1InterpData()->nRow());
966  fcWOBEPOCH .alternateDimension(1, calcInfo.wobInterpData()->nRow());
967  fcSiteZenithDelay .alternateDimension(0, calcInfo.siteZenDelays().size());
968 
969  numStn = calcInfo.stations().size();
973  fcOceanUpAmp .alternateDimension(0, numStn);
975 
976  //
977  if (!setupFormat(fcfCalcInfo, ncdf))
978  {
980  "::storeCalcInfo(): format description failed");
981  return false;
982  };
983  // check for allocated data:
984  if (!calcInfo.ut1InterpData())
985  {
987  "::storeCalcInfo(): the UT1 interpolation data are not defined");
988  return false;
989  };
990  if (!calcInfo.wobInterpData())
991  {
993  "::storeCalcInfo(): the PM interpolation data are not defined");
994  return false;
995  };
996  //
997  // restore the dimensions:
1038 
1039  //
1040  ncdf.setServiceVars(var.getStub(), "Data are provided by CALC or similar software", "", "");
1041  //
1042  char *pCtrlN=ncdf.lookupVar(fcCalcControlNames .name())->data2char();
1043  short *pCtrlF=ncdf.lookupVar(fcCalcControlValues .name())->data2short();
1044  short *pTUt1=ncdf.lookupVar(fcTidalUt1Control .name())->data2short();
1045  double *pClcV=ncdf.lookupVar(fcCalcVersion .name())->data2double();
1046  char *pAtmM=ncdf.lookupVar(fcATMMessage .name())->data2char();
1047  char *pAtmC=ncdf.lookupVar(fcATMControl .name())->data2char();
1048  char *pAxoM=ncdf.lookupVar(fcAxisOffsetMessage .name())->data2char();
1049  char *pAxoC=ncdf.lookupVar(fcAxisOffsetControl .name())->data2char();
1050  char *pEtdM=ncdf.lookupVar(fcEarthTideMessage .name())->data2char();
1051  char *pEtdC=ncdf.lookupVar(fcEarthTideControl .name())->data2char();
1052  char *pPtdM=ncdf.lookupVar(fcPoleTideMessage .name())->data2char();
1053  char *pPtdC=ncdf.lookupVar(fcPoleTideControl .name())->data2char();
1054  char *pNutM=ncdf.lookupVar(fcNutationMessage .name())->data2char();
1055  char *pNutC=ncdf.lookupVar(fcNutationControl .name())->data2char();
1056  char *pOtdM=ncdf.lookupVar(fcOceanMessage .name())->data2char();
1057  char *pOtdC=ncdf.lookupVar(fcOceanControl .name())->data2char();
1058  char *pAtiM=ncdf.lookupVar(fcATIMessage .name())->data2char();
1059  char *pAtiC=ncdf.lookupVar(fcATIControl .name())->data2char();
1060  char *pCtiM=ncdf.lookupVar(fcCTIMessage .name())->data2char();
1061  char *pCtiC=ncdf.lookupVar(fcCTIControl .name())->data2char();
1062  char *pPlxM=ncdf.lookupVar(fcParallaxMessage .name())->data2char();
1063  char *pPlxC=ncdf.lookupVar(fcParallaxControl .name())->data2char();
1064  char *pStrM=ncdf.lookupVar(fcStarMessage .name())->data2char();
1065  char *pStrC=ncdf.lookupVar(fcStarControl .name())->data2char();
1066  char *pRelM=ncdf.lookupVar(fcTheoryMessage .name())->data2char();
1067  char *pRelC=ncdf.lookupVar(fcRelativityControl .name())->data2char();
1068  char *pSitM=ncdf.lookupVar(fcSiteMessage .name())->data2char();
1069  char *pFdHM=ncdf.lookupVar(fcFeedhornMessage .name())->data2char();
1070  char *pEphM=ncdf.lookupVar(fcPepMessage .name())->data2char();
1071  char *pPxyC=ncdf.lookupVar(fcWobbleControl .name())->data2char();
1072  char *pUt1C=ncdf.lookupVar(fcUT1Control .name())->data2char();
1073  char *pOSts=ncdf.lookupVar(fcOceanStationsFlag .name())->data2char();
1074  double *pRelD=ncdf.lookupVar(fcRelativityData .name())->data2double();
1075  double *pPrcD=ncdf.lookupVar(fcPrecessionData .name())->data2double();
1076  double *pEtdD=ncdf.lookupVar(fcEarthTideData .name())->data2double();
1077  double *pUt1E=ncdf.lookupVar(fcUT1EPOCH .name())->data2double();
1078  double *pWobE=ncdf.lookupVar(fcWOBEPOCH .name())->data2double();
1079  double *pSitZ=ncdf.lookupVar(fcSiteZenithDelay .name())->data2double();
1080 
1081  double *pOptc=ncdf.lookupVar(fcOceanPoleTideCoef .name())->data2double();
1082  double *pOvPh=ncdf.lookupVar(fcOceanUpPhase .name())->data2double();
1083  double *pOhPh=ncdf.lookupVar(fcOceanHorizontalPhase .name())->data2double();
1084  double *pOvAm=ncdf.lookupVar(fcOceanUpAmp .name())->data2double();
1085  double *pOhAm=ncdf.lookupVar(fcOceanHorizontalAmp .name())->data2double();
1086  //
1087  // fill data structures:
1088  //
1089  for (int i=0; i<nCtrl; i++)
1090  {
1091  pCtrlF[i] = calcInfo.controlFlagValues().at(i);
1092  strncpy(pCtrlN + lCtrlName*i, qPrintable(calcInfo.controlFlagNames().at(i)), lCtrlName);
1093  };
1094  for (int i=0; i<nOcnLdSts; i++)
1095  strncpy(pOSts + lOcnLdSts*i, qPrintable(calcInfo.oLoadStationStatus().at(i)), lOcnLdSts);
1096  //
1097  strncpy(pAtmM, qPrintable(calcInfo.troposphere().getDefinition()),
1098  calcInfo.troposphere().getDefinition().size());
1099  strncpy(pAtmC, qPrintable(calcInfo.troposphere().getControlFlag()),
1100  calcInfo.troposphere().getControlFlag().size());
1101  strncpy(pAxoM, qPrintable(calcInfo.axisOffset().getDefinition()),
1102  calcInfo.axisOffset().getDefinition().size());
1103  strncpy(pAxoC, qPrintable(calcInfo.axisOffset().getControlFlag()),
1104  calcInfo.axisOffset().getControlFlag().size());
1105  strncpy(pEtdM, qPrintable(calcInfo.earthTide().getDefinition()),
1106  calcInfo.earthTide().getDefinition().size());
1107  strncpy(pEtdC, qPrintable(calcInfo.earthTide().getControlFlag()),
1108  calcInfo.earthTide().getControlFlag().size());
1109  strncpy(pPtdM, qPrintable(calcInfo.poleTide().getDefinition()),
1110  calcInfo.poleTide().getDefinition().size());
1111  strncpy(pPtdC, qPrintable(calcInfo.poleTide().getControlFlag()),
1112  calcInfo.poleTide().getControlFlag().size());
1113  strncpy(pNutM, qPrintable(calcInfo.nutation().getDefinition()),
1114  calcInfo.nutation().getDefinition().size());
1115  strncpy(pNutC, qPrintable(calcInfo.nutation().getControlFlag()),
1116  calcInfo.nutation().getControlFlag().size());
1117  strncpy(pOtdM, qPrintable(calcInfo.oceanLoading().getDefinition()),
1118  calcInfo.oceanLoading().getDefinition().size());
1119  strncpy(pOtdC, qPrintable(calcInfo.oceanLoading().getControlFlag()),
1120  calcInfo.oceanLoading().getControlFlag().size());
1121  strncpy(pAtiM, qPrintable(calcInfo.atomicTime().getDefinition()),
1122  calcInfo.atomicTime().getDefinition().size());
1123  strncpy(pAtiC, qPrintable(calcInfo.atomicTime().getControlFlag()),
1124  calcInfo.atomicTime().getControlFlag().size());
1125  strncpy(pCtiM, qPrintable(calcInfo.coordinateTime().getDefinition()),
1126  calcInfo.coordinateTime().getDefinition().size());
1127  strncpy(pCtiC, qPrintable(calcInfo.coordinateTime().getControlFlag()),
1128  calcInfo.coordinateTime().getControlFlag().size());
1129  strncpy(pPlxM, qPrintable(calcInfo.parallax().getDefinition()),
1130  calcInfo.parallax().getDefinition().size());
1131  strncpy(pPlxC, qPrintable(calcInfo.parallax().getControlFlag()),
1132  calcInfo.parallax().getControlFlag().size());
1133  strncpy(pStrM, qPrintable(calcInfo.star().getDefinition()),
1134  calcInfo.star().getDefinition().size());
1135  strncpy(pStrC, qPrintable(calcInfo.star().getControlFlag()),
1136  calcInfo.star().getControlFlag().size());
1137  strncpy(pRelM, qPrintable(calcInfo.relativity().getDefinition()),
1138  calcInfo.relativity().getDefinition().size());
1139  strncpy(pRelC, qPrintable(calcInfo.relativity().getControlFlag()),
1140  calcInfo.relativity().getControlFlag().size());
1141  strncpy(pSitM, qPrintable(calcInfo.site().getDefinition()),
1142  calcInfo.site().getDefinition().size());
1143  strncpy(pFdHM, qPrintable(calcInfo.feedHorn().getDefinition()),
1144  calcInfo.feedHorn().getDefinition().size());
1145  strncpy(pEphM, qPrintable(calcInfo.ephemeris().getDefinition()),
1146  calcInfo.ephemeris().getDefinition().size());
1147  strncpy(pPxyC, qPrintable(calcInfo.polarMotion().getControlFlag()),
1148  calcInfo.polarMotion().getControlFlag().size());
1149  strncpy(pUt1C, qPrintable(calcInfo.ut1().getControlFlag()),
1150  calcInfo.ut1().getControlFlag().size());
1151 
1152  *pTUt1 = calcInfo.getFlagTidalUt1();
1153  *pClcV = calcInfo.getDversion();
1154 
1155  *pRelD = calcInfo.getRelativityData();
1156  *pPrcD = calcInfo.getPrecessionData();
1157  pEtdD[0] = calcInfo.getEarthTideData(0);
1158  pEtdD[1] = calcInfo.getEarthTideData(1);
1159  pEtdD[2] = calcInfo.getEarthTideData(2);
1160 
1161  for (unsigned int i=0; i<calcInfo.ut1InterpData()->nRow(); i++)
1162  for (unsigned int j=0; j<calcInfo.ut1InterpData()->nCol(); j++)
1163  pUt1E[calcInfo.ut1InterpData()->nCol()*i + j] = calcInfo.ut1InterpData()->getElement(i, j);
1164  for (unsigned int i=0; i<calcInfo.wobInterpData()->nRow(); i++)
1165  for (unsigned int j=0; j<calcInfo.wobInterpData()->nCol(); j++)
1166  pWobE[calcInfo.wobInterpData()->nCol()*i + j] = calcInfo.wobInterpData()->getElement(i, j);
1167 
1168  for (int i=0; i<calcInfo.siteZenDelays().size(); i++)
1169  pSitZ[i] = calcInfo.siteZenDelays().at(i);
1170  //
1171  for (int i=0; i<numStn; i++)
1172  {
1173  SgVlbiStationInfo *si=calcInfo.stations().at(i);
1174  if (si)
1175  {
1176  for (int j=0; j<11; j++)
1177  {
1178  pOvPh[11*i + j] = si->getOLoadPhase(j, 0);
1179  pOhPh[22*i + j] = si->getOLoadPhase(j, 1);
1180  pOhPh[22*i + 11 + j] = si->getOLoadPhase(j, 2);
1181  pOvAm[11*i + j] = si->getOLoadAmplitude(j, 0);
1182  pOhAm[22*i + j] = si->getOLoadAmplitude(j, 1);
1183  pOhAm[22*i + 11 + j] = si->getOLoadAmplitude(j, 2);
1184  };
1185  //
1186  for (int j=0; j<6; j++)
1187  pOptc[6*i + j] = si->getOptLoadCoeff(j);
1188  }
1189  else
1191  "::storeCalcInfo(): the stnInfo is NULL for idx=" + QString("").setNum(i));
1192  };
1193 
1194  // write data:
1196  if (!ncdf.putData())
1197  {
1199  "::storeCalcInfo(): cannot put data into " + ncdf.getFileName());
1200  return false;
1201  };
1204  "::storeCalcInfo(): the data were successfully stored in " + ncdf.getFileName());
1205  return true;
1206 };
1207 
1208 
1209 
1210 //
1211 bool SgVgosDb::storeCalcEop(const SgVector* pmArrayInfo, const SgVector* utArrayInfo,
1212  const SgMatrix* pmValues, const SgVector* utValues,
1213  const SgModelsInfo& calcInfo)
1214 {
1216  SgNetCdf ncdf(path2RootDir_ + "/" +
1218  sessionCode_);
1219  //
1220  // set up the dimensions:
1221  int nPmArrayInfo, nUtArrayInfo, nPmValues, nUtValues;
1222  nPmArrayInfo = pmArrayInfo->n();
1223  nUtArrayInfo = utArrayInfo->n();
1224  nPmValues = pmValues->nRow();
1225  nUtValues = utValues->n();
1226 
1227  if (fcUT1ArrayInfo.dims().at(0) != nUtArrayInfo)
1228  {
1230  "::storeCalcEop(): size mismatch for UT1ArrayInfo: " +
1231  QString("").sprintf("%d vs %d", fcUT1ArrayInfo.dims().at(0), nUtArrayInfo));
1232  return false;
1233  };
1234  if (fcWobArrayInfo.dims().at(0) != nPmArrayInfo)
1235  {
1237  "::storeCalcEop(): size mismatch for WobArrayInfo: " +
1238  QString("").sprintf("%d vs %d", fcWobArrayInfo.dims().at(0), nPmArrayInfo));
1239  return false;
1240  };
1241  fcUT1Values .alternateDimension(0, nUtValues);
1242  fcWobValues .alternateDimension(0, nPmValues);
1245  fcUT1Origin .alternateDimension(0, calcInfo.ut1Interpolation().getOrigin().size());
1249  //
1250  if (!setupFormat(fcfCalcEop, ncdf))
1251  {
1253  "::storeCalcEop(): format description failed");
1254  return false;
1255  };
1256  // restore the dimensions:
1265  //
1266  ncdf.setServiceVars(var.getStub(), "Data are provided by CALC or similar software", "", "");
1267  //
1268  double *pUtAi=ncdf.lookupVar(fcUT1ArrayInfo .name())->data2double();
1269  double *pPmAi=ncdf.lookupVar(fcWobArrayInfo .name())->data2double();
1270  double *pUtVa=ncdf.lookupVar(fcUT1Values .name())->data2double();
1271  double *pPmVa=ncdf.lookupVar(fcWobValues .name())->data2double();
1272  char *pUtMd=ncdf.lookupVar(fcUT1IntrpMode .name())->data2char();
1273  char *pUtMo=ncdf.lookupVar(fcCalcUt1Module.name())->data2char();
1274  char *pUtOr=ncdf.lookupVar(fcUT1Origin .name())->data2char();
1275  char *pPmMd=ncdf.lookupVar(fcWobIntrpMode .name())->data2char();
1276  char *pPmMo=ncdf.lookupVar(fcCalcWobModule.name())->data2char();
1277  char *pPmOr=ncdf.lookupVar(fcWobbleOrigin .name())->data2char();
1278  //
1279  // fill data structures:
1280  //
1281  for (int i=0; i<nPmArrayInfo; i++)
1282  pPmAi[i] = pmArrayInfo->getElement(i);
1283  for (int i=0; i<nUtArrayInfo; i++)
1284  pUtAi[i] = utArrayInfo->getElement(i);
1285  for (int i=0; i<nPmValues; i++)
1286  {
1287  pPmVa[2*i ] = pmValues->getElement(i, 0);
1288  pPmVa[2*i + 1] = pmValues->getElement(i, 1);
1289  };
1290  for (int i=0; i<nUtValues; i++)
1291  pUtVa[i] = utValues->getElement(i);
1292  //
1293  strncpy(pUtMd, qPrintable(calcInfo.ut1Interpolation().getControlFlag()),
1294  calcInfo.ut1Interpolation().getControlFlag().size());
1295  strncpy(pUtMo, qPrintable(calcInfo.ut1Interpolation().getDefinition()),
1296  calcInfo.ut1Interpolation().getDefinition().size());
1297  strncpy(pUtOr, qPrintable(calcInfo.ut1Interpolation().getOrigin()),
1298  calcInfo.ut1Interpolation().getOrigin().size());
1299  strncpy(pPmMd, qPrintable(calcInfo.polarMotionInterpolation().getControlFlag()),
1300  calcInfo.polarMotionInterpolation().getControlFlag().size());
1301  strncpy(pPmMo, qPrintable(calcInfo.polarMotionInterpolation().getDefinition()),
1302  calcInfo.polarMotionInterpolation().getDefinition().size());
1303  strncpy(pPmOr, qPrintable(calcInfo.polarMotionInterpolation().getOrigin()),
1304  calcInfo.polarMotionInterpolation().getOrigin().size());
1305  // write data:
1307  if (!ncdf.putData())
1308  {
1310  "::storeCalcEop(): cannot put data into " + ncdf.getFileName());
1311  return false;
1312  };
1315  "::storeCalcEop(): the data were successfully stored in " + ncdf.getFileName());
1316  return true;
1317 };
1318 
1319 
1320 
1321 //--
1322 //
1324  const QList<QString> &sourcesRefs, const SgMatrix* cooRaDe)
1325 {
1327  SgNetCdf ncdf(path2RootDir_ + "/" +
1329  sessionCode_);
1330  //
1331  if (numOfSrc_ == 0)
1332  numOfSrc_ = sourcesNames.size();
1333  else if (sourcesNames.size() != numOfSrc_)
1334  {
1336  "::storeSourcesApriories(): size mismatch for sourcesNames: " +
1337  QString("").sprintf("%d vs %d", sourcesNames.size(), numOfSrc_));
1338  return false;
1339  };
1340  if (sourcesRefs.size() != numOfSrc_)
1341  {
1343  "::storeSourcesApriories(): size mismatch for sourcesRefs: " +
1344  QString("").sprintf("%d vs %d", sourcesRefs.size(), numOfSrc_));
1345  return false;
1346  };
1347  if (cooRaDe->nRow() != (unsigned int)numOfSrc_)
1348  {
1350  "::storeSourcesApriories(): size mismatch for sourcesCoords: " +
1351  QString("").sprintf("%d vs %d", cooRaDe->nRow(), numOfSrc_));
1352  return false;
1353  };
1354  //
1355  // set up the dimensions:
1356  int lRef=0, lNam=0;
1357  for (int i=0; i<numOfSrc_; i++)
1358  {
1359  if (lRef < sourcesRefs.at(i).size())
1360  lRef = sourcesRefs.at(i).size();
1361  if (lNam < sourcesNames.at(i).size())
1362  lNam = sourcesNames.at(i).size();
1363  };
1366  //
1367  if (!setupFormat(fcfSourceApriori, ncdf))
1368  {
1370  "::storeSourcesApriories(): format description failed");
1371  return false;
1372  };
1373  // restore the dimensions:
1376  //
1377  ncdf.setServiceVars(var.getStub(), "Data are provided by CALC or similar software", "", "");
1378  //
1379  double *pCoor=ncdf.lookupVar(fcSource2000RaDec .name())->data2double();
1380  char *pName=ncdf.lookupVar(fcSourceNameApriori.name())->data2char();
1381  char *pRefr=ncdf.lookupVar(fcSourceReference .name())->data2char();
1382  //
1383  // fill data structures:
1384  //
1385  for (int i=0; i<numOfSrc_; i++)
1386  {
1387  pCoor[2*i ] = cooRaDe->getElement(i, 0);
1388  pCoor[2*i + 1] = cooRaDe->getElement(i, 1);
1389  strncpy(pName + lNam*i, qPrintable(sourcesNames.at(i)), lNam);
1390  strncpy(pRefr + lRef*i, qPrintable(sourcesRefs .at(i)), lRef);
1391  };
1392  // write data:
1394  if (!ncdf.putData())
1395  {
1397  "::storeSourcesApriories(): cannot put data into " + ncdf.getFileName());
1398  return false;
1399  };
1402  "::storeSourcesApriories(): the data were successfully stored in " + ncdf.getFileName());
1403  return true;
1404 };
1405 
1406 
1407 
1408 //
1409 bool SgVgosDb::storeClockApriories(const QList<QString> &siteNames, const SgMatrix* offsets_n_rates)
1410 {
1412  SgNetCdf ncdf(path2RootDir_ + "/" +
1414  sessionCode_);
1415  //
1416  if (siteNames.size() != (int)offsets_n_rates->nRow())
1417  {
1419  "::storeClockApriories(): size of siteNames (" + QString("").setNum(siteNames.size()) +
1420  ") and offset/rates (" + QString("").setNum(offsets_n_rates->nRow()) + ") mismatch");
1421  return false;
1422  };
1423  //
1424  // set up the dimensions:
1425  int nS=siteNames.size();
1426  int lNam=0;
1427  for (int i=0; i<nS; i++)
1428  if (lNam < siteNames.at(i).size())
1429  lNam = siteNames.at(i).size();
1430 
1435  //
1436  if (!setupFormat(fcfClockApriori, ncdf))
1437  {
1439  "::storeClockApriories(): format description failed");
1440  return false;
1441  };
1442  // restore the dimensions:
1447  //
1448  ncdf.setServiceVars(var.getStub(), "Data are provided by a user or similar device", "", "");
1449  //
1450  char *pS=ncdf.lookupVar(fcClockAprioriSite .name())->data2char();
1451  double *pO=ncdf.lookupVar(fcClockAprioriOffset.name())->data2double();
1452  double *pR=ncdf.lookupVar(fcClockAprioriRate .name())->data2double();
1453  //
1454  // fill data structures:
1455  //
1456  for (int i=0; i<nS; i++)
1457  {
1458  pO[i] = offsets_n_rates->getElement(i, 0);
1459  pR[i] = offsets_n_rates->getElement(i, 1);
1460  strncpy(pS + lNam*i, qPrintable(siteNames.at(i)), lNam);
1461  };
1462  // write data:
1464  if (!ncdf.putData())
1465  {
1467  "::storeClockApriories(): cannot put data into " + ncdf.getFileName());
1468  return false;
1469  };
1472  "::storeClockApriories(): the data were successfully stored in " + ncdf.getFileName());
1473  return true;
1474 };
1475 
1476 
1477 
1478 //
1480  const SgMatrix* cooXYZ, const QList<QString> &tectonicPlateNames)
1481 {
1483  SgNetCdf ncdf(path2RootDir_ + "/" +
1485  sessionCode_);
1486  //
1487  if (numOfStn_ == 0)
1488  numOfStn_ = stationsNames.size();
1489  else if (stationsNames.size() != numOfStn_)
1490  {
1492  "::storeStationsApriories(): size mismatch for sourcesNames: " +
1493  QString("").sprintf("%d vs %d", stationsNames.size(), numOfStn_));
1494  return false;
1495  };
1496  if (tectonicPlateNames.size() != numOfStn_)
1497  {
1499  "::storeStationsApriories(): size mismatch for the list of tectonic plate names: " +
1500  QString("").sprintf("%d vs %d", tectonicPlateNames.size(), numOfStn_));
1501  return false;
1502  };
1503  if (cooXYZ->nRow() != (unsigned int)numOfStn_)
1504  {
1506  "::storeStationsApriories(): size mismatch for cooXYZ: " +
1507  QString("").sprintf("%d vs %d", cooXYZ->nRow(), numOfStn_));
1508  return false;
1509  };
1510  //
1511  // set up the dimensions:
1512  int lNam = fcStationNameApriori.dims().at(1);
1513  int lTpl = fcStationPlateName.dims().at(1);
1514  if (!setupFormat(fcfStationApriori, ncdf))
1515  {
1517  "::storeStationsApriories(): format description failed");
1518  return false;
1519  };
1520  //
1521  ncdf.setServiceVars(var.getStub(), "Data are provided by CALC or similar software", "", "");
1522  //
1523  double *pCoor=ncdf.lookupVar(fcStationXYZ .name())->data2double();
1524  char *pName=ncdf.lookupVar(fcStationNameApriori .name())->data2char();
1525  char *pTplt=ncdf.lookupVar(fcStationPlateName .name())->data2char();
1526  //
1527  // fill data structures:
1528  //
1529  for (int i=0; i<numOfStn_; i++)
1530  {
1531  pCoor[3*i ] = cooXYZ->getElement(i, 0);
1532  pCoor[3*i + 1] = cooXYZ->getElement(i, 1);
1533  pCoor[3*i + 2] = cooXYZ->getElement(i, 2);
1534  strncpy(pName + lNam*i, qPrintable(stationsNames .at(i)), lNam);
1535  strncpy(pTplt + lTpl*i, qPrintable(tectonicPlateNames .at(i)), lTpl);
1536  };
1537  // write data:
1539  if (!ncdf.putData())
1540  {
1542  "::storeStationsApriories(): cannot put data into " + ncdf.getFileName());
1543  return false;
1544  };
1547  "::storeStationsApriories(): the data were successfully stored in " + ncdf.getFileName());
1548  return true;
1549 };
1550 
1551 
1552 
1553 //
1555  const QList<int> &axisTypes, const SgVector* axisOffsets, const SgMatrix* axisTilts)
1556 {
1558  SgNetCdf ncdf(path2RootDir_ + "/" +
1560  sessionCode_);
1561  //
1562  if (stationsNames.size() != numOfStn_)
1563  {
1565  "::storeAntennaApriories(): size mismatch for sourcesNames: " +
1566  QString("").sprintf("%d vs %d", stationsNames.size(), numOfStn_));
1567  return false;
1568  };
1569  if (axisTypes.size() != numOfStn_)
1570  {
1572  "::storeAntennaApriories(): size mismatch for the list of axis types: " +
1573  QString("").sprintf("%d vs %d", axisTypes.size(), numOfStn_));
1574  return false;
1575  };
1576  if (axisOffsets->n() != (unsigned int)numOfStn_)
1577  {
1579  "::storeAntennaApriories(): size mismatch for axisOffsets: " +
1580  QString("").sprintf("%d vs %d", axisOffsets->n(), numOfStn_));
1581  return false;
1582  };
1583  if (axisTilts->nRow() != (unsigned int)numOfStn_)
1584  {
1586  "::storeAntennaApriories(): size mismatch for axisTilts: " +
1587  QString("").sprintf("%d vs %d", axisTilts->nRow(), numOfStn_));
1588  return false;
1589  };
1590  //
1591  // set up the dimensions:
1592  int lNam = fcAntennaName.dims().at(1);
1593  if (!setupFormat(fcfAntennaApriori, ncdf))
1594  {
1596  "::storeAntennaApriories(): format description failed");
1597  return false;
1598  };
1599  //
1600  ncdf.setServiceVars(var.getStub(), "Data are provided by CALC or similar software", "", "");
1601  //
1602  double *pOffs=ncdf.lookupVar(fcAxisOffset .name())->data2double();
1603  double *pTilt=ncdf.lookupVar(fcAxisTilt .name())->data2double();
1604  char *pName=ncdf.lookupVar(fcAntennaName.name())->data2char();
1605  short *pType=ncdf.lookupVar(fcAxisType .name())->data2short();
1606  //
1607  // fill data structures:
1608  //
1609  for (int i=0; i<numOfStn_; i++)
1610  {
1611  pOffs[i ] = axisOffsets->getElement(i);
1612  pTilt[2*i ] = axisTilts->getElement(i, 0);
1613  pTilt[2*i + 1] = axisTilts->getElement(i, 1);
1614  pType[i ] = axisTypes.at(i);
1615  strncpy(pName + lNam*i, qPrintable(stationsNames .at(i)), lNam);
1616  };
1617  // write data:
1619  if (!ncdf.putData())
1620  {
1622  "::storeAntennaApriories(): cannot put data into " + ncdf.getFileName());
1623  return false;
1624  };
1627  "::storeAntennaApriories(): the data were successfully stored in " + ncdf.getFileName());
1628  return true;
1629 };
1630 
1631 
1632 
1633 
1634 
1635 //
1636 //
1637 // ------------------ wrapper file:
1638 //
1639 //
1641 {
1642  QString str;
1643  QString outputFileName("");
1644 
1645  createWrapperFileName(outputFileName);
1646 
1647  if (operationMode_ == SgNetCdf::OM_REGULAR) // regular output:
1648  {
1650  "::composeWrapperFile(): the name for the new wrapper file: " + outputFileName);
1651  if (isNewFile_)
1652  {
1653  QDir dir(path2RootDir_);
1654  if (!dir.exists())
1655  {
1656  if (!dir.mkpath(path2RootDir_))
1657  {
1659  "::composeWrapperFile(): cannot create a path to the root directory, " + path2RootDir_);
1660  return false;
1661  }
1662  else
1664  "::composeWrapperFile(): a path to the root directory, " + path2RootDir_ +
1665  ", has been created");
1666  };
1667  };
1668  //
1669  //
1671  {
1672  QFile::Permissions perm=QFile::permissions(path2RootDir_);
1673  if (!(perm & QFile::WriteGroup && perm & QFile::ExeGroup))
1674  {
1675  if (!QFile::setPermissions(path2RootDir_, perm | QFile::WriteGroup | QFile::ExeGroup))
1677  "::composeWrapperFile(): cannot change permissions of the directory \"" +
1678  path2RootDir_ + "\"");
1679  }
1680  else
1682  "::composeWrapperFile(): permissions of the directory \"" + path2RootDir_ + "\" looks fine");
1683  };
1684  //
1685  //
1686  QFile f(path2RootDir_ + "/" + outputFileName);
1687  if (f.open(QFile::WriteOnly))
1688  {
1689  QTextStream s(&f);
1691  s << "!\n";
1693  s << "!\n";
1695  s << "!\n";
1696  for (QMap<QString, StationDescriptor>::iterator it=stnDescriptorByKey_.begin();
1697  it!=stnDescriptorByKey_.end(); ++it)
1698  {
1699  composeStationBlock(s, it.value());
1700  s << "!\n";
1701  };
1702  composeScanBlock(s);
1703  s << "!\n";
1705  s << "!\n";
1708  for (QMap<QString, ProgramGenericDescriptor>::iterator it=progDescriptorByName_.begin();
1709  it!=progDescriptorByName_.end(); ++it)
1710  {
1711  composeProgramGenericBlock(s, it.value());
1712  s << "!\n";
1713  };
1714  //
1715  //
1716  f.close();
1717  s.setDevice(NULL);
1719  {
1720  QFile::Permissions perm=f.permissions();
1721  if (!f.setPermissions(perm | QFile::WriteGroup))
1723  "::composeWrapperFile(): cannot change permissions of the file \"" + f.fileName() + "\"");
1724  };
1726  "::composeWrapperFile(): the wrapper file \"" + f.fileName() + "\" has been composed");
1727  return true;
1728  }
1729  else
1731  "::composeWrapperFile(): cannot open with write access the wrapper file \"" +
1732  f.fileName() + "\"");
1733  return false;
1734  }
1735  else // dry run mode:
1736  {
1737  std::cout << "\nDRY RUN: The wrapper file will be created: \""
1738  << qPrintable(path2RootDir_ + "/" + outputFileName) << "\"\n";
1739  return true;
1740  };
1741 };
1742 
1743 
1744 
1745 //
1746 void SgVgosDb::createWrapperFileName(QString &newName)
1747 {
1748  QRegExp rx;
1749  int ver=currentVersion_;
1750  QString sPrefix(""), sVersion(""), sSuffix(""), sExtension("");
1751  QString sKind(""), sOrganization(""), str("");
1752  rx.setMinimal(true);
1753 
1754  newName = wrapperFileName_.size() ? wrapperFileName_ : sessionName_;
1755 
1756  // pick up the prefix:
1757  // new session:
1758  if (!newName.contains('_'))
1759  {
1760  sPrefix = newName;
1761  sKind = "all"; // add the kind too
1762  };
1763  // already existed session:
1764  rx.setPattern("^([a-zA-Z0-9]+)_(\\S+)$");
1765  if (newName.contains(rx))
1766  {
1767  sPrefix = rx.cap(1);
1768  };
1769  // pick up the version:
1770  rx.setPattern("^(\\S+)_V(\\d+)([_\\.]+)(\\S+)$");
1771  if (newName.contains(rx))
1772  {
1773  sVersion = rx.cap(2);
1774  ver = sVersion.toInt();
1775  };
1776  // pick up the kind:
1777  rx.setPattern("^(\\S+)_k([A-Za-z0-9]+)([_\\.]+)(\\S+)$");
1778  if (newName.contains(rx))
1779  {
1780  sKind = rx.cap(2);
1781  };
1782  // pick up the institution:
1783  rx.setPattern("^(\\S+)_i([A-Za-z0-9]+)([_\\.]+)(\\S+)$");
1784  rx.setMinimal(true);
1785  if (newName.contains(rx))
1786  {
1787  str = rx.cap(2);
1788  };
1789  sOrganization = currentIdentities_->getAcAbbName(); // three chars
1790  if (str.size() && str != sOrganization) // just notify a user:
1792  "::createWrapperFileName(): the organization name has been adjusted: " + str +
1793  " => " + sOrganization);
1794  // pick up the extension:
1795  rx.setPattern("^(\\S+)\\.(\\S+)$");
1796  if (newName.contains(rx))
1797  {
1798  sExtension = rx.cap(2);
1799  };
1800 
1801  if (sExtension.size()==0)
1802  sExtension = "wrp";
1803 
1804  sSuffix.sprintf("%s%s.%s",
1805  qPrintable(sOrganization.size()?("_i" + sOrganization):""),
1806  qPrintable(sKind.size()?("_k" + sKind):""),
1807  qPrintable(sExtension));
1808 
1809  newName.sprintf("%s_V%03d%s",
1810  qPrintable(sPrefix), ++ver, qPrintable(sSuffix));
1811 
1812  while (QFile(path2RootDir_ + "/" + newName).exists() && ver<1000)
1813  {
1814  newName.sprintf("%s_V%03d%s",
1815  qPrintable(sPrefix), ++ver, qPrintable(sSuffix));
1816  };
1817  //
1818  if (ver>=1000)
1820  "::createWrapperFileName(): the version number is too big");
1821 
1822  //
1823  //
1825  localHistory_.historyFileName_.sprintf("%s_V%03d_k%s.hist",
1826  qPrintable(sPrefix), ver, qPrintable(sSuffix));
1827 
1828  if (QFile(path2RootDir_ + "/" + localHistory_.defaultDir_ + "/" +
1829  localHistory_.historyFileName_).exists())
1830  {
1831  sSuffix = "_i" + sOrganization + "_k" + currentDriverVersion_->getSoftwareName();
1832  localHistory_.historyFileName_.sprintf("%s_V%03d%s.hist",
1833  qPrintable(sPrefix), ver, qPrintable(sSuffix));
1834  };
1835 };
1836 
1837 
1838 
1839 //
1840 void SgVgosDb::composeVersionBlock(QTextStream& s)
1841 {
1842  s << "VERSION " << outputFormatId_
1843  << "\n!\n!\n";
1844 };
1845 
1846 
1847 
1848 //
1849 void SgVgosDb::composeHistoryBlock(QTextStream& s)
1850 {
1851  //localHistory_.softwareName_ = currentIdentities_->getExecBinaryName();
1852  //
1859  if (wrapperFileName_.size())
1861 
1862  QString str("");
1863  s << "!\n";
1864  s << "Begin History\n";
1865  // write previous histories:
1866 //QMap<QString, HistoryDescriptor>::iterator ith;
1867 //for (ith=historyDescriptorByName_.begin(); ith!=historyDescriptorByName_.end(); ++ith)
1868  for (int i=0; i<historyDescriptors_.size(); i++)
1869  {
1870  const HistoryDescriptor& hd=historyDescriptors_.at(i);
1871  s << "!\nBegin Process "<< hd.processName_ << "\n";
1872  s << "Version " << hd.version_ << "\n";
1873  s << "CreatedBy " << hd.creator_ << "\n";
1874  s << "Default_dir " << hd.defaultDir_ << "\n";
1875  str = hd.defaultDir_;
1876  s << "RunTimeTag " << hd.epochOfCreation_.toString(SgMJD::F_Simple)
1877  << " UTC\n";
1878  s << "History " << hd.historyFileName_ << "\n";
1879  if (hd.inputWrapperFileName_.size())
1880  s << "InputWrapper " << hd.inputWrapperFileName_ << "\n";
1881  s << "End Process " << hd.processName_ << "\n";
1882  };
1883  if (!str.isEmpty())
1884  localHistory_.defaultDir_ = str;
1885  // the local history:
1886  s << "!\nBegin Process "<< localHistory_.processName_ << "\n";
1887  s << "Version " << localHistory_.version_ << "\n";
1888  s << "CreatedBy " << localHistory_.creator_ << "\n";
1889  s << "Default_dir " << localHistory_.defaultDir_ << "\n";
1891  << " UTC\n";
1892  s << "History " << localHistory_.historyFileName_ << "\n";
1894  s << "InputWrapper " << localHistory_.inputWrapperFileName_ << "\n";
1895  s << "End Process " << localHistory_.processName_ << "\n";
1896  s << "!\nEnd History\n";
1897 };
1898 
1899 
1900 
1901 //
1902 void SgVgosDb::writeNcFileName(QTextStream& s, QString& currentSubDir, const SgVdbVariable& var)
1903 {
1904  if (var.isEmpty())
1905  return;
1906  QString subDir(""), baseName("");
1907  //splitNcFileName(fileName, subDir, baseName);
1908  if (currentSubDir != var.getSubDir())
1909  s << "!\nDefault_Dir " << (currentSubDir=var.getSubDir()) << "\n";
1910  s << var.getFileName4Output() << "\n";
1911 };
1912 
1913 
1914 
1915 //
1916 void SgVgosDb::composeSessionBlock(QTextStream& s)
1917 {
1918  QString str, subDir("");
1919  QMap<QString, BandData>::iterator
1920  it;
1921 
1922  s << "!\n";
1923  s << "Begin Session\n";
1924  s << "Session " << sessionCode_ << "\n";
1925  s << "AltSessionId " << sessionName_ << "\n";
1926  s << "!\n";
1927  writeNcFileName(s, subDir, vHead_);
1928  //
1929  //
1930  writeNcFileName(s, subDir, vAntennaApriori_);
1931  writeNcFileName(s, subDir, vStationApriori_);
1932  writeNcFileName(s, subDir, vSourceApriori_);
1933  writeNcFileName(s, subDir, vClockApriori_);
1934  writeNcFileName(s, subDir, vEccentricity_);
1935  //
1936  writeNcFileName(s, subDir, vStationCrossRef_);
1937  writeNcFileName(s, subDir, vSourceCrossRef_);
1938  writeNcFileName(s, subDir, vGroupBLWeights_);
1939  writeNcFileName(s, subDir, vClockBreak_);
1940  writeNcFileName(s, subDir, vLeapSecond_);
1941  writeNcFileName(s, subDir, vMiscCable_);
1942  writeNcFileName(s, subDir, vMiscFourFit_);
1943  for (it=bandDataByName_.begin(); it!=bandDataByName_.end(); ++it)
1944  {
1945  const BandData& bd=it.value();
1946  writeNcFileName(s, subDir, bd.vMiscFourFit_);
1947  //...
1948  };
1949  //
1950  s << "!\nEnd Session\n";
1951 };
1952 
1953 
1954 
1955 //
1956 void SgVgosDb::composeStationBlock(QTextStream&s, const StationDescriptor& sd)
1957 {
1958  QString str, subDir("");
1959  s << "Begin Station " << sd.stationKey_ << "\n";
1960  //
1961  writeNcFileName(s, subDir, sd.vTimeUTC_);
1962  writeNcFileName(s, subDir, sd.vRefClockOffset_);
1963  writeNcFileName(s, subDir, sd.vTsys_);
1964  writeNcFileName(s, subDir, sd.vMet_);
1965  writeNcFileName(s, subDir, sd.vAzEl_);
1966  writeNcFileName(s, subDir, sd.vFeedRotation_);
1967  writeNcFileName(s, subDir, sd.vCal_AxisOffset_);
1968  writeNcFileName(s, subDir, sd.vCal_Cable_);
1969  writeNcFileName(s, subDir, sd.vCal_SlantPathTropDry_);
1970  writeNcFileName(s, subDir, sd.vCal_SlantPathTropWet_);
1971  writeNcFileName(s, subDir, sd.vCal_OceanLoad_);
1972  writeNcFileName(s, subDir, sd.vPart_AxisOffset_);
1975  writeNcFileName(s, subDir, sd.vPart_HorizonGrad_);
1976  writeNcFileName(s, subDir, sd.vDis_OceanLoad_);
1977  s << "End Station " << sd.stationKey_ << "\n";
1978 };
1979 
1980 
1981 
1982 //
1983 void SgVgosDb::composeScanBlock(QTextStream& s)
1984 {
1985  QString str, subDir("");
1986  s << "!\nBegin Scan\n";
1987  //
1988  writeNcFileName(s, subDir, vScanTimeUTC_);
1989  writeNcFileName(s, subDir, vCorrRootFile_);
1990  writeNcFileName(s, subDir, vErpApriori_);
1991  writeNcFileName(s, subDir, vScanName_);
1993  writeNcFileName(s, subDir, vNutationEqx_);
1994  writeNcFileName(s, subDir, vNutationNro_);
1995  writeNcFileName(s, subDir, vEphemeris_);
1996  writeNcFileName(s, subDir, vRot_CF2J2K_);
1997  //
1998  s << "!\nEnd Scan\n";
1999 };
2000 
2001 
2002 
2003 //
2005 {
2006  QString str, subDir("");
2007  QMap<QString, BandData>::iterator
2008  it;
2009  s << "!\nBegin Observation\n";
2010  //
2011  s << "!\n";
2013  writeNcFileName(s, subDir, vBaseline_);
2014  writeNcFileName(s, subDir, vSource_);
2015  // writeNcFileName(s, subDir, vURVR_);
2016  // bands:
2017  for (it=bandDataByName_.begin(); it!=bandDataByName_.end(); ++it)
2018  {
2019  const BandData& bd=it.value();
2020  writeNcFileName(s, subDir, bd.vChannelInfo_);
2021  writeNcFileName(s, subDir, bd.vPhaseCalInfo_);
2022  writeNcFileName(s, subDir, bd.vCorrInfo_);
2023  writeNcFileName(s, subDir, bd.vRefFreq_);
2024  writeNcFileName(s, subDir, bd.vAmbigSize_);
2025  writeNcFileName(s, subDir, bd.vQualityCode_);
2026  writeNcFileName(s, subDir, bd.vSBDelay_);
2027  writeNcFileName(s, subDir, bd.vGroupDelay_);
2028  writeNcFileName(s, subDir, bd.vGroupRate_);
2029  writeNcFileName(s, subDir, bd.vPhase_);
2030  writeNcFileName(s, subDir, bd.vDelayDataFlag_);
2031  writeNcFileName(s, subDir, bd.vDataFlag_);
2032  writeNcFileName(s, subDir, bd.vSNR_);
2033  writeNcFileName(s, subDir, bd.vCorrelation_);
2034  s << "!\n";
2036  writeNcFileName(s, subDir, bd.vEffFreq_);
2037  writeNcFileName(s, subDir, bd.vEffFreq_EqWt_);
2038  s << "!\n";
2039  };
2040  //
2041  writeNcFileName(s, subDir, vFeedRotNet_);
2042  //
2043  s << "!\n";
2044  writeNcFileName(s, subDir, vEdit_);
2045  for (it=bandDataByName_.begin(); it!=bandDataByName_.end(); ++it)
2046  {
2047  const BandData& bd=it.value();
2048  writeNcFileName(s, subDir, bd.vNumGroupAmbig_);
2049  writeNcFileName(s, subDir, bd.vNumPhaseAmbig_);
2050  writeNcFileName(s, subDir, bd.vGroupDelayFull_);
2051  writeNcFileName(s, subDir, bd.vPhaseDelayFull_);
2052  };
2053  writeNcFileName(s, subDir, vNGSQualityFlag_);
2054  //
2055  s << "!\n";
2056  writeNcFileName(s, subDir, vObsCrossRef_);
2057  //
2058  s << "!\n";
2059  writeNcFileName(s, subDir, vDelayTheoretical_);
2060  writeNcFileName(s, subDir, vRateTheoretical_);
2061  //
2062  s << "!\n";
2063  writeNcFileName(s, subDir, vDiffTec_);
2064  //
2065  s << "!\n";
2067  writeNcFileName(s, subDir, vCal_BendSun_);
2068  writeNcFileName(s, subDir, vCal_Bend_);
2069  writeNcFileName(s, subDir, vCal_EarthTide_);
2071  writeNcFileName(s, subDir, vCal_HfErp_);
2072  writeNcFileName(s, subDir, vCal_OceanLoad_);
2073  writeNcFileName(s, subDir, vCal_Parallax_);
2075  writeNcFileName(s, subDir, vCal_PoleTide_);
2076  writeNcFileName(s, subDir, vCal_TiltRemover_);
2077  for (it=bandDataByName_.begin(); it!=bandDataByName_.end(); ++it)
2078  {
2079  writeNcFileName(s, subDir, it.value().vCal_Unphase_);
2080  writeNcFileName(s, subDir, it.value().vCal_FeedCorrection_);
2081  writeNcFileName(s, subDir, it.value().vUVFperAsec_);
2082  };
2083  writeNcFileName(s, subDir, vCal_Wobble_);
2084  writeNcFileName(s, subDir, vCal_HfLibration_);
2085  writeNcFileName(s, subDir, vCal_OceanLoadOld_);
2088  s << "!\n";
2089  writeNcFileName(s, subDir, vPart_Bend_);
2090  writeNcFileName(s, subDir, vPart_Gamma_);
2091  writeNcFileName(s, subDir, vPart_Erp_);
2092  writeNcFileName(s, subDir, vPart_NutationEqx_);
2093  writeNcFileName(s, subDir, vPart_NutationNro_);
2094  writeNcFileName(s, subDir, vPart_Parallax_);
2095  writeNcFileName(s, subDir, vPart_PoleTide_);
2096  writeNcFileName(s, subDir, vPart_Precession_);
2097  writeNcFileName(s, subDir, vPart_RaDec_);
2098  writeNcFileName(s, subDir, vPart_Xyz_);
2099  //
2100  s << "!\nEnd Observation\n";
2101 };
2102 
2103 
2104 
2105 //
2107 {
2108  // need to rework this part later:
2109  QString str, subDir(progSolveDescriptor_.vScanTimeMJD_.getSubDir());
2110  s << "!\n";
2111  s << "Begin Program " << progSolveDescriptor_.programName_ << "\n";
2112  s << "Default_dir " << subDir << "\n";
2113  s << "!\n";
2114  s << "Begin Session\n";
2115  // writeNcFileName(s, subDir, progSolveDescriptor_.vMisc_);
2125  s << "End Session\n";
2126  s << "!\n";
2127  //
2128  s << "Begin Scan\n";
2130  s << "End Scan\n";
2131  s << "!\n";
2132  //
2133  s << "Begin Observation\n";
2138  s << "End Observation\n";
2139  s << "!\n";
2140  s << "End Program " << progSolveDescriptor_.programName_ << "\n";
2141  s << "!\n";
2142 };
2143 
2144 
2145 
2146 //
2148 {
2149  s << "!\n";
2150  s << "Begin Program " << pgd.programName_ << "\n";
2151  for (int i=0; i<pgd.content_.size(); i++)
2152  s << pgd.content_.at(i) << "\n";
2153  s << "End Program " << pgd.programName_ << "\n";
2154  s << "!\n";
2155 };
2156 
2157 
2158 
2159 //
2161 {
2162  QString str;
2163  if (!history.size())
2164  {
2166  "::saveLocalHistory(): there is no history to save");
2167  return false;
2168  };
2169  str = path2RootDir_;
2170  if (localHistory_.defaultDir_.size())
2171  str += "/" + localHistory_.defaultDir_;
2172 
2173  if (operationMode_ == SgNetCdf::OM_REGULAR) // regular output:
2174  {
2175  QDir dir(str);
2176  if (!dir.exists())
2177  {
2178  if (dir.mkpath(str))
2179  {
2181  "::saveLocalHistory(): the directory \"" + str + "\" has been created");
2183  {
2184  QFile::Permissions perm=QFile::permissions(str);
2185  if (!QFile::setPermissions(str, perm | QFile::WriteGroup | QFile::ExeGroup))
2187  "::saveLocalHistory(): cannot change permissions of the directory \"" + str + "\"");
2188  };
2189  }
2190  else
2191  {
2193  "::saveLocalHistory(): cannot create the directory \"" + str + "\"; saving history failed");
2194  return false;
2195  };
2196  };
2197  str += "/" + localHistory_.historyFileName_;
2198  if (QFile(str).exists())
2199  {
2200  QFile::remove(str);
2202  "::saveLocalHistory(): supposed to be a new history file \"" + str +
2203  "] already exists; the file has been removed");
2204  };
2205  //
2206  QFile f(str);
2207  currentVersion_++;
2208  //
2209  const QString timeTag("TIMETAG"), versionTag("MK3DB_VERSION");
2210  const SgVlbiHistoryRecord *rec=history.at(0);
2211  SgMJD t(rec->getEpoch());
2212  if (f.open(QFile::WriteOnly | QFile::Append))
2213  {
2214  QTextStream s(&f);
2215  // first label:
2216  s << "\n" << timeTag << " " << t.toString(SgMJD::F_Simple) << " UTC\n";
2217  s << versionTag << " " << str.setNum(currentVersion_) << "\n";
2218  for (int i=0; i<history.size(); i++)
2219  {
2220  rec = history.at(i);
2221  if (rec->getEpoch() != t)
2222  {
2223  t = rec->getEpoch();
2224  s << "\n" << timeTag << " " << t.toString(SgMJD::F_Simple) << " UTC\n";
2225  };
2226  s << rec->getText() << "\n";
2227  };
2228  f.close();
2229  s.setDevice(NULL);
2230  //
2231  // adjust permissions:
2232  QFile::Permissions perm=f.permissions();
2233  if (!f.setPermissions(perm | QFile::WriteGroup))
2235  "::saveLocalHistory(): cannot adjust the permissions of the file \"" + f.fileName() + "\"");
2236  }
2237  else
2238  {
2240  "::saveLocalHistory(): cannot open the history file \"" + f.fileName() + "\" for write access");
2241  return false;
2242  };
2244  "::saveLocalHistory(): saved " + str.setNum(history.size()) +
2245  " historical records into the file \"" + f.fileName() + "\"");
2246  return true;
2247  }
2248  else // dry run mode:
2249  {
2250  std::cout << "DRY RUN: The file with local history will be created: \""
2251  << qPrintable(str + "/" + localHistory_.historyFileName_) << "\"\n";
2252 
2253  return true;
2254  };
2255 };
2256 
2257 
2258 
2259 //
2261  const QString& softwareName,
2262  const SgMJD& epochOfCreation,
2263  const QString& creator,
2264  const QString& defaultDir,
2265  const QString& historyFileName,
2266  const QString& version,
2267  bool isMk3Compatible)
2268 {
2269  QString str, key(softwareName);
2270  if (!history.size())
2271  {
2273  "::saveForeignHistory(): there is no history to save");
2274  return false;
2275  };
2276 
2277  HistoryDescriptor hd;
2278  hd.processName_ = softwareName;
2279  hd.epochOfCreation_ = epochOfCreation;
2280  hd.creator_ = creator;
2281  hd.defaultDir_ = defaultDir;
2282  hd.historyFileName_ =
2283  historyFileName +
2284  QString("").sprintf("_V%03d", currentVersion_) +
2285  "_k" + corrTypeId_ + ".hist";
2286 
2287  hd.version_ = version;
2288  hd.isMk3Compatible_ = isMk3Compatible;
2289  historyDescriptors_ << hd;
2290  //
2291  str = path2RootDir_;
2292  if (hd.defaultDir_.size())
2293  str += "/" + hd.defaultDir_;
2294 
2295  if (operationMode_ == SgNetCdf::OM_REGULAR) // regular output:
2296  {
2297  QDir dir(str);
2298  if (!dir.exists())
2299  {
2300  if (dir.mkpath(str))
2301  {
2303  "::saveForeignHistory(): the directory \"" + str + "\" has been created");
2305  {
2306  QFile::Permissions perm=QFile::permissions(str);
2307  if (!QFile::setPermissions(str, perm | QFile::WriteGroup | QFile::ExeGroup))
2309  "::saveForeignHistory(): cannot change permissions of the directory \"" + str + "\"");
2310  };
2311  }
2312  else
2313  {
2315  "::saveForeignHistory(): cannot create the directory \"" + str + "\"; saving history failed");
2316  return false;
2317  };
2318  };
2319  str += "/" + hd.historyFileName_;
2320  if (QFile(str).exists())
2321  {
2322  QFile::remove(str);
2324  "::saveForeignHistory(): supposed to be a new history file \"" + str +
2325  "\" already exists; the file has been removed");
2326  };
2327  //
2328  QFile f(str);
2329  //
2330  const QString timeTag("TIMETAG"), versionTag("MK3DB_VERSION");
2331  const SgVlbiHistoryRecord *rec=history.at(0);
2332  SgMJD t(rec->getEpoch());
2333  int v(rec->getVersion());
2334  if (f.open(QFile::WriteOnly | QFile::Append))
2335  {
2336  QTextStream s(&f);
2337  // first label:
2338  s << "\n" << timeTag << " " << t.toString(SgMJD::F_Simple) << " UTC\n";
2339  s << versionTag << " " << str.setNum(v) << "\n";
2340  for (int i=0; i<history.size(); i++)
2341  {
2342  rec = history.at(i);
2343  if (rec->getEpoch() != t)
2344  {
2345  t = rec->getEpoch();
2346  s << "\n" << timeTag << " " << t.toString(SgMJD::F_Simple) << " UTC\n";
2347  if (rec->getVersion() != v)
2348  {
2349  v = rec->getVersion();
2350  s << versionTag << " " << str.setNum(v) << "\n";
2351  };
2352  };
2353  s << rec->getText() << "\n";
2354  };
2355  f.close();
2356  s.setDevice(NULL);
2357  // adjust permissions:
2358  QFile::Permissions perm=f.permissions();
2359  if (!f.setPermissions(perm | QFile::WriteGroup))
2361  "::saveForeignHistory(): cannot adjust the permissions of the file \"" + f.fileName() + "\"");
2362  }
2363  else
2364  {
2366  "::saveForeignHistory(): cannot open the history file \"" + f.fileName() + "\" for write access");
2367  return false;
2368  };
2370  "::saveForeignHistory(): saved " + str.setNum(history.size()) +
2371  " historical records into the file \"" + f.fileName() + "\"");
2372  return true;
2373  }
2374  else // dry run mode:
2375  {
2376  std::cout << "DRY RUN: The file with foreign history will be created: \""
2377  << qPrintable(str + "/" + hd.historyFileName_) << "\"\n";
2378  return true;
2379  };
2380 };
2381 /*=====================================================================================================*/
2382 
2383 
2384 
2385 
2386 /*=====================================================================================================*/
2387 //
2388 // Constants:
2389 //
2390 
2391 
2392 
2393 
2394 
2395 
2396 
2397 
2398 
2399 /*=====================================================================================================*/
@ SD_NumStn
Definition: SgIoDriver.h:58
@ SD_Any
Definition: SgIoDriver.h:62
SgLogger * logger
Definition: SgLogger.cpp:231
SgVersion libraryVersion("SgLib", 0, 7, 5, "Tuscarora (rc1)", SgMJD(2022, 2, 18, 17, 34))
SgVgosDb::FmtChkVar fcEccentricityVector("EccentricityVector", NC_DOUBLE, false, QList< int >()<< SD_NumStn<< 3, "ECCCOORD", "Eccentricity taken from eccentricity file.", "Meter")
SgVgosDb::FmtChkVar fcFlybyName("FlybyList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "FCL LIST", "Key to the standard flcal config")
SgVgosDb::FmtChkVar fcClockInterval("ClockInterval", NC_DOUBLE, false, QList< int >()<< SD_Any, "CLK_INTV", "Batchmode clock interval - hours")
QList< SgVgosDb::FmtChkVar * > fcfBlnClockSetup
Definition: SgVgosDb.cpp:2681
QList< SgVgosDb::FmtChkVar * > fcfErpSetup
Definition: SgVgosDb.cpp:2676
SgVgosDb::FmtChkVar fcClockBreakFlag("ClockBreakFlag", NC_SHORT, true, QList< int >()<< SD_Any, "BRK_FLAG", "Batchmode clock break flags")
QList< SgVgosDb::FmtChkVar * > fcfSelectionStatus
Definition: SgVgosDb.cpp:2679
SgVgosDb::FmtChkVar fcClockRateName("ClockRateConstraintStationList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "CC_SITES", "Site list for clocks constraints")
SgVgosDb::FmtChkVar fcStatCalFlag("StatCalFlag", NC_SHORT, true, QList< int >()<< SD_NumStn, "CAL FLGS", "Bit set indicate that calibration is recommended.")
SgVgosDb::FmtChkVar fcGroupBLWeights("GroupBLWeights", NC_DOUBLE, true, QList< int >()<< 2<< SD_Any, "ERROR K ", "Group delay and rate re-weighting constants.")
SgVgosDb::FmtChkVar fcEccentricityName("EccentricityStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "--NEW-- ", "Station name of the corresponding eccentricity")
SgVgosDb::FmtChkVar fcObsCalFlag("ObsCalFlag", NC_SHORT, false, QList< int >()<< 1, "OBCLFLGS", "Bit set indicate that calibration is recommended.")
SgVgosDb::FmtChkVar fcEccentricityMonument("EccentricityMonument", NC_CHAR, false, QList< int >()<< SD_NumStn<< 10, "ECCNAMES", "Eccentricity monument name")
SgVgosDb::FmtChkVar fcIonoSolveFlag("IonoSolveFlag", NC_SHORT, true, QList< int >()<< SD_NumStn, "", "Bit flag indicating station has iono correction")
SgVgosDb::FmtChkVar fcBaselineClock("BaselineClock", NC_CHAR, true, QList< int >()<< SD_Any<< 2<< 8, "BLDEPCKS", "Bl-dependent clock list")
QList< SgVgosDb::FmtChkVar * > fcfClockSetup
Definition: SgVgosDb.cpp:2674
SgVgosDb::FmtChkVar fcClockBreakNumber("BRK_NUMB", NC_SHORT, false, QList< int >()<< 1, "BRK_NUMB", "Number of batchmode clock breaks")
SgVgosDb::FmtChkVar fcAtmRateConstraint("AtmRateConstraint", NC_DOUBLE, true, QList< int >()<< SD_Any, "ATM_CNST", "Atmosphere constraint. ps/hr")
SgVgosDb::FmtChkVar fcSrcSelectionFlag("SourceSelectionFlag", NC_SHORT, true, QList< int >()<< SD_NumSrc, "SOURSTAT", "Source selection status bit-mapped array.")
SgVgosDb::FmtChkVar fcCalStationName("StatCalStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "CALSITES", "List of sites for standard cal")
QList< SgVgosDb::FmtChkVar * > fcfClockBreak
Definition: SgVgosDb.cpp:2689
QList< SgVgosDb::FmtChkVar * > fcfCalibrationSetup
Definition: SgVgosDb.cpp:2686
QList< SgVgosDb::FmtChkVar * > fcfIonoSetup
Definition: SgVgosDb.cpp:2677
QList< SgVgosDb::FmtChkVar * > fcfEccentricity
Definition: SgVgosDb.cpp:2682
SgVgosDb::FmtChkVar fcClockRateConstraint("ClockRateConstraint", NC_DOUBLE, true, QList< int >()<< SD_Any, "CLK_CNST", "Clock constraint-Parts in 1.e14")
SgVgosDb::FmtChkVar fcClockBreakSite("ClockBreakStationList", NC_CHAR, true, QList< int >(), "BRK_SNAM", "Batchmode clock break stations")
SgVgosDb::FmtChkVar fcGroupBLWeightName("GroupBLWeightStationList", NC_CHAR, true, QList< int >()<< SD_Any<< 2<< 8, "ERROR BL", "B.L.names for formal errors")
SgVgosDb::FmtChkVar fcEccentricityType("EccentricityType", NC_CHAR, false, QList< int >()<< SD_NumStn<< 2, "ECCTYPES", "Eccentricity type: XY or NE")
SgVgosDb::FmtChkVar fcAtmInterval("AtmInterval", NC_DOUBLE, false, QList< int >()<< SD_Any, "ATM_INTV", "Batchmode atmos interval - hours")
SgVgosDb::FmtChkVar fcUtOffsetConstraint("UT1OffsetConstraint", NC_DOUBLE, true, QList< int >()<< 1, "", "UT1 Offset Constraint")
SgVgosDb::FmtChkVar fcIonoStationList("IonoStationList", NC_CHAR, true, QList< int >()<< SD_NumStn<< 8, "", "Stations with ionocorrection")
SgVgosDb::FmtChkVar fcAtmRateSite("AtmRateStationList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "AC_SITES", "Site list for atmos constraints")
QList< SgVgosDb::FmtChkVar * > fcfGroupBLWeights
Definition: SgVgosDb.cpp:2678
QList< SgVgosDb::FmtChkVar * > fcfAtmSetup
Definition: SgVgosDb.cpp:2672
SgVgosDb::FmtChkVar fcPmOffsetConstraint("WobOffsetConstraint", NC_DOUBLE, true, QList< int >()<< 1, "", "Polar Motion Offset Constraint")
SgVgosDb::FmtChkVar fcBlnSelectionFlag("BaselineSelectionFlag", NC_SHORT, true, QList< int >()<< SD_NumStn<< SD_NumStn, "BASLSTAT", "Baseline selection bit maped array. 1=some obs, etc.")
SgVgosDb::FmtChkVar fcClockBreakStatus("CLKBREAK", NC_CHAR, false, QList< int >()<< 2, "CLKBREAK", "Status of clock break existence")
SgVgosDb::FmtChkVar fcObsCalName("ObsCalList", NC_CHAR, false, QList< int >()<< SD_Any<< 8, "OBCLLIST", "Available obs dependent calibrations (poletide, earthdide, ?)")
SgVgosDb::FmtChkVar fcClockBreakEpoch("ClockBreakEpoch", NC_DOUBLE, true, QList< int >()<< SD_Any, "BRK_EPOC", "Batchmode clock break epochs")
SgVgosDb::FmtChkVar fcFlybyFlag("FlybyFlag", NC_SHORT, false, QList< int >()<< SD_NumStn<< 7, "FCL FLGS", "Standard flcal configuration")
SgVgosDb::FmtChkVar fcStatCalName("StatCalList", NC_CHAR, true, QList< int >()<< SD_Any<< 8, "CAL LIST", "Station depedendent calibrations (Cable, Phase, etc?)")
QList< SgVgosDb::FmtChkVar * > fcfHead
SgVgosDb::FmtChkVar fcPoleTideControl
Definition: SgVgosDb.h:1995
QList< SgVgosDb::FmtChkVar * > fcfCalcInfo
Definition: SgVgosDb.h:2071
SgVgosDb::FmtChkVar fcStarControl
Definition: SgVgosDb.h:1997
SgVgosDb::FmtChkVar fcOceanUpPhase
Definition: SgVgosDb.h:2001
SgVgosDb::FmtChkVar fcCalcVersion
Definition: SgVgosDb.h:1992
SgVgosDb::FmtChkVar fcClockAprioriRate
Definition: SgVgosDb.h:2005
SgVgosDb::FmtChkVar fcPrecessionData
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcUT1Values
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcWobValues
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcNumStation
Definition: SgVgosDb.h:1944
SgVgosDb::FmtChkVar fcCTIMessage
Definition: SgVgosDb.h:1996
SgVgosDb::FmtChkVar fcRelativityData
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcCalcUt1Module
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcAxisOffsetControl
Definition: SgVgosDb.h:1994
SgVgosDb::FmtChkVar fcOceanStationsFlag
Definition: SgVgosDb.h:1999
SgVgosDb::FmtChkVar fcNumObs
Definition: SgVgosDb.h:1991
SgVgosDb::FmtChkVar fcFourFitCmdCString_v1002
Definition: SgVgosDb.h:1938
SgVgosDb::FmtChkVar fciUTCInterval
Definition: SgVgosDb.h:1992
SgVgosDb::FmtChkVar fcCalcControlValues
Definition: SgVgosDb.h:1993
SgVgosDb::FmtChkVar fcRelativityControl
Definition: SgVgosDb.h:1998
SgVgosDb::FmtChkVar fcOceanHorizontalPhase
Definition: SgVgosDb.h:2001
SgVgosDb::FmtChkVar fcAntennaName
Definition: SgVgosDb.h:2007
SgVgosDb::FmtChkVar fcAxisOffset
Definition: SgVgosDb.h:2007
SgVgosDb::FmtChkVar fcPoleTideMessage
Definition: SgVgosDb.h:1995
SgVgosDb::FmtChkVar fcFourfitControlFile_v1002
Definition: SgVgosDb.h:1938
SgVgosDb::FmtChkVar fcATMControl
Definition: SgVgosDb.h:1993
SgVgosDb::FmtChkVar fcClockAprioriSite
Definition: SgVgosDb.h:2005
SgVgosDb::FmtChkVar fcCorrelatorType
QList< SgVgosDb::FmtChkVar * > fcfCalcEop
Definition: SgVgosDb.h:2071
SgVgosDb::FmtChkVar fcWobIntrpMode
Definition: SgVgosDb.h:2003
SgVgosDb::FmtChkVar fcOceanUpAmp
Definition: SgVgosDb.h:2001
SgVgosDb::FmtChkVar fcNumLagsUsed_v1002
Definition: SgVgosDb.h:1938
SgVgosDb::FmtChkVar fcCableSign
Definition: SgVgosDb.h:1937
SgVgosDb::FmtChkVar fcParallaxControl
Definition: SgVgosDb.h:1997
SgVgosDb::FmtChkVar fcSourceList
Definition: SgVgosDb.h:1992
SgVgosDb::FmtChkVar fcParallaxMessage
Definition: SgVgosDb.h:1997
SgVgosDb::FmtChkVar fcUT1ArrayInfo
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcExpDescription
Definition: SgVgosDb.h:1944
SgVgosDb::FmtChkVar fcOceanHorizontalAmp
Definition: SgVgosDb.h:2001
SgVgosDb::FmtChkVar fcClockAprioriOffset
Definition: SgVgosDb.h:2005
SgVgosDb::FmtChkVar fcOceanMessage
Definition: SgVgosDb.h:1996
SgVgosDb::FmtChkVar fcStationPlateName
Definition: SgVgosDb.h:2007
SgVgosDb::FmtChkVar fcATIMessage
Definition: SgVgosDb.h:1996
SgVgosDb::FmtChkVar fcNutationControl
Definition: SgVgosDb.h:1995
SgVgosDb::FmtChkVar fcOceanControl
Definition: SgVgosDb.h:1996
SgVgosDb::FmtChkVar fcNutationMessage
Definition: SgVgosDb.h:1995
SgVgosDb::FmtChkVar fcStationList
Definition: SgVgosDb.h:1992
QList< SgVgosDb::FmtChkVar * > fcfSourceApriori
Definition: SgVgosDb.h:2071
SgVgosDb::FmtChkVar fcWobbleControl
Definition: SgVgosDb.h:1999
SgVgosDb::FmtChkVar fcAplength_v1002
Definition: SgVgosDb.h:1938
SgVgosDb::FmtChkVar fcAxisType
Definition: SgVgosDb.h:2007
SgVgosDb::FmtChkVar fcUT1EPOCH
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcSourceReference
Definition: SgVgosDb.h:2004
SgVgosDb::FmtChkVar fcWobArrayInfo
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcEarthTideControl
Definition: SgVgosDb.h:1994
SgVgosDb::FmtChkVar fcOceanPoleTideCoef
Definition: SgVgosDb.h:2001
SgVgosDb::FmtChkVar fcNumScan
Definition: SgVgosDb.h:1991
SgVgosDb::FmtChkVar fcTidalUt1Control
Definition: SgVgosDb.h:1992
SgVgosDb::FmtChkVar fcEarthTideData
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcLeapSecond
Definition: SgVgosDb.h:1937
SgVgosDb::FmtChkVar fcFeedhornMessage
Definition: SgVgosDb.h:1994
SgVgosDb::FmtChkVar fcEarthTideMessage
Definition: SgVgosDb.h:1994
SgVgosDb::FmtChkVar fcWOBEPOCH
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcUT1Control
Definition: SgVgosDb.h:1999
QList< SgVgosDb::FmtChkVar * > fcfClockApriori
Definition: SgVgosDb.h:2071
SgVgosDb::FmtChkVar fcATMMessage
Definition: SgVgosDb.h:1993
SgVgosDb::FmtChkVar fcExpName
Definition: SgVgosDb.h:1944
SgVgosDb::FmtChkVar fcUT1IntrpMode
Definition: SgVgosDb.h:2002
SgVgosDb::FmtChkVar fcPrincipalInvestigator
Definition: SgVgosDb.h:1992
QList< SgVgosDb::FmtChkVar * > fcfStationApriori
Definition: SgVgosDb.h:2071
SgVgosDb::FmtChkVar fcAxisTilt
Definition: SgVgosDb.h:2009
SgVgosDb::FmtChkVar fcSource2000RaDec
Definition: SgVgosDb.h:2004
SgVgosDb::FmtChkVar fcRecordingMode
Definition: SgVgosDb.h:1945
SgVgosDb::FmtChkVar fcPepMessage
Definition: SgVgosDb.h:1999
SgVgosDb::FmtChkVar fcWobbleOrigin
Definition: SgVgosDb.h:2003
SgVgosDb::FmtChkVar fcCorrelator
Definition: SgVgosDb.h:1991
SgVgosDb::FmtChkVar fcCalcWobModule
Definition: SgVgosDb.h:2003
SgVgosDb::FmtChkVar fcSourceNameApriori
Definition: SgVgosDb.h:2004
QList< SgVgosDb::FmtChkVar * > fcfAntennaApriori
Definition: SgVgosDb.h:2072
SgVgosDb::FmtChkVar fcUT1Origin
Definition: SgVgosDb.h:2003
SgVgosDb::FmtChkVar fcStationXYZ
Definition: SgVgosDb.h:2006
SgVgosDb::FmtChkVar fcCTIControl
Definition: SgVgosDb.h:1996
QList< SgVgosDb::FmtChkVar * > fcfMiscCable
Definition: SgVgosDb.h:2024
SgVgosDb::FmtChkVar fcCorrPostProcSoftware
Definition: SgVgosDb.h:1940
SgVgosDb::FmtChkVar fcStarMessage
Definition: SgVgosDb.h:1997
SgVgosDb::FmtChkVar fcCalcControlNames
Definition: SgVgosDb.h:1993
QList< SgVgosDb::FmtChkVar * > fcfMiscFourFit_v1002
Definition: SgVgosDb.h:2025
QList< SgVgosDb::FmtChkVar * > fcfLeapSecond
Definition: SgVgosDb.h:2024
SgVgosDb::FmtChkVar fcExpSerialNumber
Definition: SgVgosDb.h:1944
SgVgosDb::FmtChkVar fcSiteZenithDelay
Definition: SgVgosDb.h:2000
SgVgosDb::FmtChkVar fcTheoryMessage
Definition: SgVgosDb.h:1998
SgVgosDb::FmtChkVar fcNumSource
Definition: SgVgosDb.h:1944
SgVgosDb::FmtChkVar fcAxisOffsetMessage
Definition: SgVgosDb.h:1993
SgVgosDb::FmtChkVar fcCableStnName
Definition: SgVgosDb.h:1937
SgVgosDb::FmtChkVar fcSiteMessage
Definition: SgVgosDb.h:1999
SgVgosDb::FmtChkVar fcATIControl
Definition: SgVgosDb.h:1996
SgVgosDb::FmtChkVar fcStationNameApriori
Definition: SgVgosDb.h:2006
const QString & getAcAbbName() const
Definition: SgIdentities.h:255
const QString & getAcFullName() const
Definition: SgIdentities.h:239
const QString & getUserName() const
Definition: SgIdentities.h:215
const SgIdentities * currentIdentities_
Definition: SgIoDriver.h:133
const SgVersion * currentDriverVersion_
Definition: SgIoDriver.h:134
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
@ IO_NCDF
Definition: SgLogger.h:66
@ IO_TXT
Definition: SgLogger.h:65
Definition: SgMJD.h:59
@ F_Simple
Digits: 2010/04/02 17:02:43.6.
Definition: SgMJD.h:68
SgMJD toUtc() const
Definition: SgMJD.cpp:1229
QString toString(Format format=F_Verbose) const
Definition: SgMJD.cpp:1007
void toYMDHMS_tr(int &nYear, int &nMonth, int &nDay, int &nHour, int &nMin, double &dSec) const
Definition: SgMJD.cpp:1305
static SgMJD currentMJD()
Definition: SgMJD.cpp:118
unsigned int nRow() const
Definition: SgMatrix.h:352
double getElement(unsigned int i, unsigned int j) const
Definition: SgMatrix.h:385
unsigned int nCol() const
Definition: SgMatrix.h:360
const QString & getDefinition() const
Definition: SgModelsInfo.h:68
const QString & getOrigin() const
Definition: SgModelsInfo.h:69
const QString & getControlFlag() const
Definition: SgModelsInfo.h:67
double getPrecessionData() const
Definition: SgModelsInfo.h:118
QList< SgVlbiStationInfo * > & stations()
Definition: SgModelsInfo.h:155
DasModel & troposphere()
Definition: SgModelsInfo.h:145
DasModel & ut1Interpolation()
Definition: SgModelsInfo.h:140
QList< QString > & oLoadStationStatus()
Definition: SgModelsInfo.h:151
DasModel & earthTide()
Definition: SgModelsInfo.h:142
SgMatrix *& wobInterpData()
Definition: SgModelsInfo.h:154
short getFlagTidalUt1() const
Definition: SgModelsInfo.h:116
DasModel & nutation()
Definition: SgModelsInfo.h:141
DasModel & coordinateTime()
Definition: SgModelsInfo.h:134
double getRelativityData() const
Definition: SgModelsInfo.h:117
QList< QString > & controlFlagNames()
Definition: SgModelsInfo.h:149
DasModel & feedHorn()
Definition: SgModelsInfo.h:148
DasModel & polarMotion()
Definition: SgModelsInfo.h:137
DasModel & atomicTime()
Definition: SgModelsInfo.h:135
QList< double > & siteZenDelays()
Definition: SgModelsInfo.h:152
SgMatrix *& ut1InterpData()
Definition: SgModelsInfo.h:153
DasModel & oceanLoading()
Definition: SgModelsInfo.h:144
DasModel & parallax()
Definition: SgModelsInfo.h:147
DasModel & poleTide()
Definition: SgModelsInfo.h:143
DasModel & polarMotionInterpolation()
Definition: SgModelsInfo.h:138
DasModel & ephemeris()
Definition: SgModelsInfo.h:133
DasModel & star()
Definition: SgModelsInfo.h:132
double getDversion() const
Definition: SgModelsInfo.h:114
DasModel & site()
Definition: SgModelsInfo.h:131
QList< int > & controlFlagValues()
Definition: SgModelsInfo.h:150
DasModel & axisOffset()
Definition: SgModelsInfo.h:146
DasModel & ut1()
Definition: SgModelsInfo.h:139
double getEarthTideData(int i) const
Definition: SgModelsInfo.h:119
DasModel & relativity()
Definition: SgModelsInfo.h:136
const char * data2char() const
Definition: SgNetCdf.cpp:459
const short * data2short() const
Definition: SgNetCdf.cpp:481
const double * data2double() const
Definition: SgNetCdf.cpp:525
SgNcdfVariable * lookupVar(const QString &name) const
Definition: SgNetCdf.h:395
void setServiceVars(const QString &stub, const QString &dataOrigin, const QString &timeTag, const QString &timeTagFile)
Definition: SgNetCdf.cpp:1263
const short * lookupData2short(const QString &name) const
Definition: SgNetCdf.h:406
bool putData()
Definition: SgNetCdf.cpp:1357
const double * lookupData2double(const QString &name) const
Definition: SgNetCdf.h:418
const QString & getFileName() const
Definition: SgNetCdf.h:497
@ OM_REGULAR
Definition: SgNetCdf.h:324
void setOperationMode(OperationMode om)
Definition: SgNetCdf.h:381
const char * lookupData2char(const QString &name) const
Definition: SgNetCdf.h:400
const int * lookupData2int(const QString &name) const
Definition: SgNetCdf.h:412
bool isEmpty() const
Definition: SgVgosDb.cpp:159
const QString & getSubDir() const
Definition: SgVgosDb.h:99
QString name4export(const QString &rootDir, SgNetCdf::OperationMode om, const QString &aBand="")
Definition: SgVgosDb.cpp:167
const QString & getStub() const
Definition: SgVgosDb.h:93
const QString & getFileName4Output() const
Definition: SgVgosDb.h:101
unsigned int n() const
Definition: SgVector.h:327
double getElement(unsigned int i) const
Definition: SgVector.h:362
const QString & getSoftwareName() const
Definition: SgVersion.h:254
QString toString() const
Definition: SgVersion.h:356
const QList< int > & dims() const
Definition: SgVgosDb.h:217
const QString & name() const
Definition: SgVgosDb.h:213
void clearDimensions()
Definition: SgVgosDb.h:224
void addDimension(int num)
Definition: SgVgosDb.h:223
void alternateDimension(int i, int num)
Definition: SgVgosDb.h:222
SgVdbVariable vDiffTec_
Definition: SgVgosDb.h:1473
SgVdbVariable vCal_EarthTide_
Definition: SgVgosDb.h:1478
SgVdbVariable vErpApriori_
Definition: SgVgosDb.h:1453
SgVdbVariable vClockBreak_
Definition: SgVgosDb.h:1422
SgVdbVariable vSourceCrossRef_
Definition: SgVgosDb.h:1438
bool storeClockSetup(const SgVector *interval, const SgVector *rateConstraint, const QList< QString > &sites, const QList< QString > &refSites)
SgVdbVariable vNutationNro_
Definition: SgVgosDb.h:1457
static const QString className()
Definition: SgVgosDb.cpp:251
SgVdbVariable vClockApriori_
Definition: SgVgosDb.h:1432
bool storeSessionHead(const QString &corrType, const QString &corrName, const QString &piName, const QString &experimentName, int experimentSerialNumber, const QString &experimentDescription, const QString &recordingMode, const QList< QString > &stations, const QList< QString > &sources, const SgMJD &tStart, const SgMJD &tFinis, int cppsIdx)
SgVdbVariable vCal_Wobble_
Definition: SgVgosDb.h:1488
SgVdbVariable vPart_Erp_
Definition: SgVgosDb.h:1509
bool setupFormat(const QList< FmtChkVar * > &, SgNetCdf &, const QString &stationKey=QString(""), const QString &bandKey=QString(""))
Definition: SgVgosDb.cpp:2336
SgVdbVariable vStationApriori_
Definition: SgVgosDb.h:1430
SgVdbVariable vPart_NutationNro_
Definition: SgVgosDb.h:1511
void composeObservationBlock(QTextStream &)
SgVdbVariable vEccentricity_
Definition: SgVgosDb.h:1434
SgVdbVariable vSource_
Definition: SgVgosDb.h:1467
SgVdbVariable vBaseline_
Definition: SgVgosDb.h:1466
SgVdbVariable vNutationEqx_
Definition: SgVgosDb.h:1456
QMap< QString, StationDescriptor > stnDescriptorByKey_
Definition: SgVgosDb.h:1444
SgVdbVariable vCal_PoleTideOldRestore_
Definition: SgVgosDb.h:1486
SgNetCdf::OperationMode operationMode_
Definition: SgVgosDb.h:1530
void composeHistoryBlock(QTextStream &)
SgVdbVariable vCal_BendSun_
Definition: SgVgosDb.h:1476
SgVdbVariable vPart_Parallax_
Definition: SgVgosDb.h:1512
void composeProgramGenericBlock(QTextStream &, const ProgramGenericDescriptor &)
bool storeClockApriories(const QList< QString > &siteNames, const SgMatrix *offsets_n_rates)
bool saveForeignHistory(const SgVlbiHistory &history, const QString &softwareName, const SgMJD &epochOfCreation, const QString &creator, const QString &defaultDir, const QString &historyFileName, const QString &version, bool isMk3Compatible=true)
bool isNewFile_
Definition: SgVgosDb.h:1381
bool storeMiscFourFit(const QString &band, SgVlbiSessionInfo::OriginType originType, const QVector< QString > &fourfitControlFile, const QVector< QString > &fourfitCommand, const QVector< int > &numLags, const QVector< double > &apLength)
SgVdbVariable vHead_
Definition: SgVgosDb.h:1418
int currentVersion_
Definition: SgVgosDb.h:1409
bool storeCalibrations(int obsCalFlags, const QVector< int > &statCalFlags, const QVector< QVector< int > > &flybyFlags, const QVector< QString > &statCalNames, const QVector< QString > &flybyNames, const QVector< QString > &calSiteNames, const QVector< QString > &obsCalNames)
bool storeIonoSetup(const QList< int > &flags, const QList< QString > &sites)
SgVdbVariable vPart_PoleTide_
Definition: SgVgosDb.h:1513
bool storeSourcesApriories(const QList< QString > &sourcesNames, const QList< QString > &sourcesRefs, const SgMatrix *cooRaDe)
QString wrapperFileName_
Definition: SgVgosDb.h:1395
bool have2adjustPermissions_
Definition: SgVgosDb.h:1382
SgVdbVariable vCal_BendSunHigher_
Definition: SgVgosDb.h:1477
bool storeSolveWeights(const QVector< QString > &baselineNames, SgMatrix *groupBlWeights)
SgVdbVariable vPart_Precession_
Definition: SgVgosDb.h:1514
bool storeAtmSetup(const SgVector *interval, const SgVector *rateConstraint, const QList< QString > &sites)
QList< HistoryDescriptor > historyDescriptors_
Definition: SgVgosDb.h:1407
bool storeStationsApriories(const QList< QString > &stationsNames, const SgMatrix *cooXYZ, const QList< QString > &tectonicPlateNames)
HistoryDescriptor localHistory_
Definition: SgVgosDb.h:1408
SgVdbVariable vPart_Xyz_
Definition: SgVgosDb.h:1516
SgVdbVariable vGroupBLWeights_
Definition: SgVgosDb.h:1421
void createWrapperFileName(QString &newName)
void composeStationBlock(QTextStream &, const StationDescriptor &)
int numOfStn_
Definition: SgVgosDb.h:1388
void composeScanBlock(QTextStream &)
SgVdbVariable vCal_HiFreqLibration_
Definition: SgVgosDb.h:1490
SgVdbVariable vObsCrossRef_
Definition: SgVgosDb.h:1497
SgVdbVariable vEdit_
Definition: SgVgosDb.h:1493
QString corrTypeId_
Definition: SgVgosDb.h:1396
bool storeLeapSecond(int leapSeconds)
SgVdbVariable vAntennaApriori_
Definition: SgVgosDb.h:1433
QString sessionName_
Definition: SgVgosDb.h:1417
SgVdbVariable vScanTimeUTC_
Definition: SgVgosDb.h:1451
bool storeErpSetup(double pmOffsetConstraint, double utOffsetConstraint)
bool storeCalcInfo(const SgModelsInfo &calcInfo)
SgVdbVariable vCal_OceanLoad_
Definition: SgVgosDb.h:1481
SgVdbVariable vNutationEqx_kWahr_
Definition: SgVgosDb.h:1455
SgVdbVariable vPart_Bend_
Definition: SgVgosDb.h:1507
SgVdbVariable vStationCrossRef_
Definition: SgVgosDb.h:1437
SgVdbVariable vMiscFourFit_
Definition: SgVgosDb.h:1425
SgVdbVariable vCal_HfErp_
Definition: SgVgosDb.h:1480
SgVdbVariable vMiscCable_
Definition: SgVgosDb.h:1426
SgVdbVariable vCal_PoleTide_
Definition: SgVgosDb.h:1485
SgVdbVariable vCal_OceanPoleTideLoad_
Definition: SgVgosDb.h:1483
bool storeBaselineClockSetup(const QList< QString > &baselines)
void writeNcFileName(QTextStream &, QString &currentSubDir, const SgVdbVariable &var)
QString sessionCode_
Definition: SgVgosDb.h:1416
bool storeAntennaApriories(const QList< QString > &stationsNames, const QList< int > &axisTypes, const SgVector *axisOffsets, const SgMatrix *axisTilts)
QMap< QString, ProgramGenericDescriptor > progDescriptorByName_
Definition: SgVgosDb.h:1526
QMap< QString, BandData > bandDataByName_
Definition: SgVgosDb.h:1470
SgVdbVariable vCal_Bend_
Definition: SgVgosDb.h:1475
bool storeClockBreaks(const QVector< QString > &cbNames, const QVector< SgMJD > &cbEpochs, const QVector< int > &cbFlags, const QString &band="")
void composeProgramSolveBlock(QTextStream &)
SgVdbVariable vCal_FeedCorrection_
Definition: SgVgosDb.h:1479
SgVdbVariable vCal_HfLibration_
Definition: SgVgosDb.h:1489
SgVdbVariable vPart_NutationEqx_
Definition: SgVgosDb.h:1510
SgVdbVariable vLeapSecond_
Definition: SgVgosDb.h:1423
bool storeMiscCable(const QMap< QString, QString > &cableSignByKey)
QString outputFormatId_
Definition: SgVgosDb.h:1402
SgVdbVariable vPart_Gamma_
Definition: SgVgosDb.h:1508
SgVdbVariable vSourceApriori_
Definition: SgVgosDb.h:1431
ProgramSolveDescriptor progSolveDescriptor_
Definition: SgVgosDb.h:1524
SgVdbVariable vFeedRotNet_
Definition: SgVgosDb.h:1500
SgVdbVariable vRateTheoretical_
Definition: SgVgosDb.h:1504
int numOfObs_
Definition: SgVgosDb.h:1385
bool have2redoLeapSecond_
Definition: SgVgosDb.h:1424
SgVdbVariable vCal_OceanLoadOld_
Definition: SgVgosDb.h:1482
SgVdbVariable vScanName_
Definition: SgVgosDb.h:1452
int numOfSrc_
Definition: SgVgosDb.h:1389
SgVdbVariable vRot_CF2J2K_
Definition: SgVgosDb.h:1458
QString path2RootDir_
Definition: SgVgosDb.h:1394
SgVdbVariable vEphemeris_
Definition: SgVgosDb.h:1454
SgVdbVariable vObservationTimeUTC_
Definition: SgVgosDb.h:1465
int numOfScans_
Definition: SgVgosDb.h:1386
void composeSessionBlock(QTextStream &)
void composeVersionBlock(QTextStream &)
bool storeCalcEop(const SgVector *pmArrayInfo, const SgVector *utArrayInfo, const SgMatrix *pmValues, const SgVector *utValues, const SgModelsInfo &calcInfo)
SgVdbVariable vPart_RaDec_
Definition: SgVgosDb.h:1515
bool storeEccentricities(const QVector< QString > &stationsNames, const QVector< QString > &eccTypes, const QVector< QString > &eccNums, SgMatrix *eccVals, const QString &eccFileName)
bool storeSelectionStatus(const QVector< int > &sourcesSelection, const QVector< QVector< int > > &stationsSelection)
bool saveLocalHistory(const SgVlbiHistory &history)
SgVdbVariable vCorrRootFile_
Definition: SgVgosDb.h:1459
SgVdbVariable vCal_TiltRemover_
Definition: SgVgosDb.h:1487
SgVdbVariable vNGSQualityFlag_
Definition: SgVgosDb.h:1494
SgVdbVariable vCal_Parallax_
Definition: SgVgosDb.h:1484
SgVdbVariable vDelayTheoretical_
Definition: SgVgosDb.h:1503
int getVersion() const
const SgMJD & getEpoch() const
const QString & getText() const
double getOLoadPhase(int iWave, int iCoord) const
double getOptLoadCoeff(int idx) const
double getOLoadAmplitude(int iWave, int iCoord) const
SgVdbVariable vEffFreq_
Definition: SgVgosDb.h:1360
SgVdbVariable vCal_SlantPathIonoGroup_
Definition: SgVgosDb.h:1361
SgVdbVariable vGroupDelayFull_
Definition: SgVgosDb.h:1368
SgVdbVariable vDelayDataFlag_
Definition: SgVgosDb.h:1354
SgVdbVariable vCorrelation_
Definition: SgVgosDb.h:1349
SgVdbVariable vEffFreq_EqWt_
Definition: SgVgosDb.h:1359
SgVdbVariable vPhaseDelayFull_
Definition: SgVgosDb.h:1357
SgVdbVariable vGroupDelay_
Definition: SgVgosDb.h:1352
SgVdbVariable vSBDelay_
Definition: SgVgosDb.h:1351
SgVdbVariable vChannelInfo_
Definition: SgVgosDb.h:1342
SgVdbVariable vGroupRate_
Definition: SgVgosDb.h:1353
SgVdbVariable vSNR_
Definition: SgVgosDb.h:1348
SgVdbVariable vPhase_
Definition: SgVgosDb.h:1350
SgVdbVariable vNumPhaseAmbig_
Definition: SgVgosDb.h:1367
SgVdbVariable vDataFlag_
Definition: SgVgosDb.h:1355
SgVdbVariable vRefFreq_
Definition: SgVgosDb.h:1346
SgVdbVariable vNumGroupAmbig_
Definition: SgVgosDb.h:1366
SgVdbVariable vCorrInfo_
Definition: SgVgosDb.h:1344
SgVdbVariable vMiscFourFit_
Definition: SgVgosDb.h:1370
SgVdbVariable vPhaseCalInfo_
Definition: SgVgosDb.h:1343
SgVdbVariable vAmbigSize_
Definition: SgVgosDb.h:1347
SgVdbVariable vQualityCode_
Definition: SgVgosDb.h:1345
SgVdbVariable vBaselineClockSetup_
Definition: SgVgosDb.h:1325
SgVdbVariable vRefClockOffset_
Definition: SgVgosDb.h:1290
SgVdbVariable vCal_SlantPathTropWet_
Definition: SgVgosDb.h:1281
SgVdbVariable vCal_SlantPathTropDry_
Definition: SgVgosDb.h:1280
SgVdbVariable vPart_HorizonGrad_
Definition: SgVgosDb.h:1287
SgVdbVariable vPart_ZenithPathTropDry_
Definition: SgVgosDb.h:1285
SgVdbVariable vCal_Cable_
Definition: SgVgosDb.h:1279
SgVdbVariable vFeedRotation_
Definition: SgVgosDb.h:1277
SgVdbVariable vCal_AxisOffset_
Definition: SgVgosDb.h:1278
SgVdbVariable vPart_AxisOffset_
Definition: SgVgosDb.h:1284
SgVdbVariable vDis_OceanLoad_
Definition: SgVgosDb.h:1288
SgVdbVariable vCal_OceanLoad_
Definition: SgVgosDb.h:1282
SgVdbVariable vPart_ZenithPathTropWet_
Definition: SgVgosDb.h:1286