General Purpose Geodetic Library
SgVlbiSessionInfo.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SG_VLBI_SESSION_INFO_H
24 #define SG_VLBI_SESSION_INFO_H
25 
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 
32 #include <math.h>
33 
34 
35 #include <QtCore/QMap>
36 
37 #include <SgAttribute.h>
38 #include <SgMJD.h>
39 
40 
41 
42 /***===================================================================================================*/
48 // typedefs:
49 class SgVlbiSessionInfo;
50 typedef QMap<QString, SgVlbiSessionInfo*> SessionInfosByName;
51 typedef QMap<QString, SgVlbiSessionInfo*>::iterator SessionInfosByName_it;
54 //
55 //
57 {
58 public:
60  {
61  OT_DBH = 0,
62  OT_NGS = 1,
63  OT_VDB = 2,
64  OT_MK4 = 3,
65  OT_KOMB = 4,
66  OT_AGV = 5,
67  OT_UNKNOWN = 0xff,
68  };
70  {
71  Attr_NOT_VALID = 1<< 0,
75  Attr_HAS_DTEC = 1<< 4,
79  // fulfillments:
80  Attr_FF_CREATED = 1<< 8,
92  // modifiers:
93  Attr_REF_CLOCKS_ADJUSTED = 1<<20,// for KOMB type input
94  };
96  {
97  CPPS_HOPS = 0,
98  CPPS_PIMA = 1,
99  CPPS_C5PP = 2,
100  CPPS_UNKNOWN = 0xff,
101  };
102 
103 
104  // Statics:
107  static QString className();
108 
109  //
110  // constructors/destructors:
111  //
116 
121 
125  virtual ~SgVlbiSessionInfo();
126 
127 
128 
129  //
130  // Interfaces:
131  //
133 
134  // gets:
137  inline OriginType getOriginType() const;
138 
141  inline const SgMJD& getTCreation() const;
142 
145  inline const SgMJD& getTStart() const;
146 
149  inline const SgMJD& getTFinis() const;
150 
153  inline const SgMJD& getTMean() const;
154 
157  inline const QString& getName() const;
158 
161  inline const QString& getNetworkSuffix() const;
162 
165  inline const QString& getSessionCode() const;
166 
169  inline const QString& getNetworkID() const;
170 
173  inline const QString& getDescription() const;
174 
177  inline const QString& getUserFlag() const;
178 
181  inline const QString& getOfficialName() const;
182 
185  inline const QString& getCorrelatorName() const;
186 
189  inline const QString& getCorrelatorType() const;
190 
193  inline const QString& getSubmitterName() const;
194 
197  inline const QString& getSchedulerName() const;
198 
201  inline const QString& getPiAgencyName() const;
202 
204  inline const QString& getRecordingMode() const {return recordingMode_;};
205 
208  inline int getNumOfStations() const;
209 
212  inline int getNumOfBaselines() const;
213 
216  inline int getNumOfSources() const;
217 
220  inline int getNumOfObservations() const;
221 
223 
224 
225 
226  // sets:
230  inline void setOriginType(OriginType type);
231 
234  inline void setTCreation(const SgMJD& t);
235 
238  inline void setTStart(const SgMJD& t);
239 
242  inline void setTFinis(const SgMJD& t);
243 
246  inline void setName(const QString& name);
247 
250  inline void setNetworkSuffix(const QString& suffix);
251 
254  inline void setSessionCode(const QString& code);
255 
258  inline void setNetworkID(const QString& netID);
259 
262  inline void setDescription(const QString& description);
263 
266  inline void setUserFlag(const QString& flag);
267 
270  inline void setOfficialName(const QString& name);
271 
274  inline void setCorrelatorName(const QString& name);
275 
278  inline void setCorrelatorType(const QString& name);
279 
282  inline void setSubmitterName(const QString& name);
283 
286  inline void setSchedulerName(const QString& name);
287 
290  inline void setPiAgencyName(const QString& name);
291 
293  inline void setRecordingMode(const QString& mode) {recordingMode_ = mode;};
294 
297  inline void setNumOfStations(int n);
298 
301  inline void setNumOfBaselines(int n);
302 
305  inline void setNumOfSources(int n);
306 
309  inline void setNumOfObservations(int n);
310 
311  inline void setCppsSoft(CorrelatorPostProcSoftware soft) {cppsSoft_ = soft;};
312 
313 
314  //
315  // Functions:
316  //
319  inline void addDelayWRMS(double o_c, double w);
320 
323  inline void addRateWRMS(double o_c, double w);
324 
327  inline double delayWRMS() const;
328 
331  inline double rateWRMS() const;
332 
335  inline void clearRMSs();
336 
339  void guessNetworkId();
340 
341 
342  //
343  // Friends:
344  //
345 
346  //
347  // I/O:
348  //
349  // ...
350 
351 protected:
357 
358  QString name_;
359  QString networkSuffix_;
360  QString sessionCode_;
361  QString networkID_;
362  QString description_;
363  QString userFlag_;
364  QString officialName_;
365  QString correlatorName_;
366  QString correlatorType_;
367  QString submitterName_;
368  QString schedulerName_;
369  QString piAgencyName_;
370  QString recordingMode_;
372 
373 
379 
381  double rateSumRMS2_;
382  double delaySumW_;
383  double rateSumW_;
384 
385  virtual inline void calcTMean();
386 };
387 /*=====================================================================================================*/
388 
389 
390 
391 
392 
393 /*=====================================================================================================*/
394 /* */
395 /* SgVlbiSessionInfo inline members: */
396 /* */
397 /*=====================================================================================================*/
398 //
399 //
400 // INTERFACES:
401 //
402 //
404 {
405  return originType_;
406 };
407 
408 
409 
410 //
412 {
413  return tCreation_;
414 };
415 
416 
417 
418 //
419 inline const SgMJD& SgVlbiSessionInfo::getTStart() const
420 {
421  return tStart_;
422 };
423 
424 
425 
426 //
427 inline const SgMJD& SgVlbiSessionInfo::getTFinis() const
428 {
429  return tFinis_;
430 };
431 
432 
433 
434 //
435 inline const SgMJD& SgVlbiSessionInfo::getTMean() const
436 {
437  return tMean_;
438 };
439 
440 
441 
442 //
443 inline const QString& SgVlbiSessionInfo::getName() const
444 {
445  return name_;
446 };
447 
448 
449 
450 //
451 inline const QString& SgVlbiSessionInfo::getNetworkSuffix() const
452 {
453  return networkSuffix_;
454 };
455 
456 
457 
458 //
459 inline const QString& SgVlbiSessionInfo::getSessionCode() const
460 {
461  return sessionCode_;
462 };
463 
464 
465 
466 //
467 inline const QString& SgVlbiSessionInfo::getNetworkID() const
468 {
469  return networkID_;
470 };
471 
472 
473 
474 //
475 inline const QString& SgVlbiSessionInfo::getDescription() const
476 {
477  return description_;
478 };
479 
480 
481 
482 //
483 inline const QString& SgVlbiSessionInfo::getUserFlag() const
484 {
485  return userFlag_;
486 };
487 
488 
489 
490 //
491 inline const QString& SgVlbiSessionInfo::getOfficialName() const
492 {
493  return officialName_;
494 };
495 
496 
497 
498 //
499 inline const QString& SgVlbiSessionInfo::getCorrelatorName() const
500 {
501  return correlatorName_;
502 };
503 
504 
505 
506 //
507 inline const QString& SgVlbiSessionInfo::getCorrelatorType() const
508 {
509  return correlatorType_;
510 };
511 
512 
513 
514 //
515 inline const QString& SgVlbiSessionInfo::getSubmitterName() const
516 {
517  return submitterName_;
518 };
519 
520 
521 
522 //
523 inline const QString& SgVlbiSessionInfo::getSchedulerName() const
524 {
525  return schedulerName_;
526 };
527 
528 
529 
530 //
531 inline const QString& SgVlbiSessionInfo::getPiAgencyName() const
532 {
533  return piAgencyName_;
534 };
535 
536 
537 
538 //
540 {
541  return numOfStations_;
542 };
543 
544 
545 
546 //
548 {
549  return numOfBaselines_;
550 };
551 
552 
553 
554 //
556 {
557  return numOfSources_;
558 };
559 
560 
561 
562 //
564 {
565  return numOfObservations_;
566 };
567 
568 
569 
570 
571 
572 
573 //
575 {
576  originType_ = type;
577 };
578 
579 
580 
581 //
583 {
584  tCreation_ = t;
585 };
586 
587 
588 
589 //
590 inline void SgVlbiSessionInfo::setTStart(const SgMJD& t)
591 {
592  tStart_ = t;
593 };
594 
595 
596 
597 //
598 inline void SgVlbiSessionInfo::setTFinis(const SgMJD& t)
599 {
600  tFinis_ = t;
601 };
602 
603 
604 
605 //
606 inline void SgVlbiSessionInfo::setName(const QString& name)
607 {
608  name_ = name;
609 };
610 
611 
612 
613 //
614 inline void SgVlbiSessionInfo::setNetworkSuffix(const QString& suffix)
615 {
616  networkSuffix_ = suffix;
617 };
618 
619 
620 
621 //
622 inline void SgVlbiSessionInfo::setSessionCode(const QString& code)
623 {
624  sessionCode_ = code;
625 };
626 
627 
628 
629 //
630 inline void SgVlbiSessionInfo::setNetworkID(const QString& netID)
631 {
632  networkID_ = netID;
633 };
634 
635 
636 
637 //
638 inline void SgVlbiSessionInfo::setDescription(const QString& description)
639 {
640  description_ = description;
641 };
642 
643 
644 
645 //
646 inline void SgVlbiSessionInfo::setUserFlag(const QString& flag)
647 {
648  userFlag_ = flag;
649 };
650 
651 
652 
653 //
654 inline void SgVlbiSessionInfo::setOfficialName(const QString& name)
655 {
656  officialName_ = name;
657 };
658 
659 
660 
661 //
662 inline void SgVlbiSessionInfo::setCorrelatorName(const QString& name)
663 {
664  correlatorName_ = name;
665 };
666 
667 
668 
669 //
670 inline void SgVlbiSessionInfo::setCorrelatorType(const QString& type)
671 {
672  correlatorType_ = type;
673 };
674 
675 
676 
677 //
678 inline void SgVlbiSessionInfo::setSubmitterName(const QString& name)
679 {
680  submitterName_ = name;
681 };
682 
683 
684 
685 //
686 inline void SgVlbiSessionInfo::setSchedulerName(const QString& name)
687 {
688  schedulerName_ = name;
689 };
690 
691 
692 
693 //
694 inline void SgVlbiSessionInfo::setPiAgencyName(const QString& name)
695 {
696  piAgencyName_ = name;
697 };
698 
699 
700 
701 //
703 {
704  numOfStations_ = n;
705 };
706 
707 
708 
709 //
711 {
712  numOfBaselines_ = n;
713 };
714 
715 
716 
717 //
719 {
720  numOfSources_ = n;
721 };
722 
723 
724 
725 //
727 {
728  numOfObservations_ = n;
729 };
730 
731 
732 //
733 // FUNCTIONS:
734 //
735 //
736 //
737 //
739 {
740  tMean_ = (tStart_.toDouble() + tFinis_.toDouble())/2.0;
741 };
742 
743 
744 
745 //
746 inline void SgVlbiSessionInfo::addDelayWRMS(double o_c, double w)
747 {
748  delaySumRMS2_ += o_c*o_c*w;
749  delaySumW_ += w;
750 };
751 
752 
753 
754 //
755 inline void SgVlbiSessionInfo::addRateWRMS(double o_c, double w)
756 {
757  rateSumRMS2_ += o_c*o_c*w;
758  rateSumW_ += w;
759 };
760 
761 
762 
763 //
764 inline double SgVlbiSessionInfo::delayWRMS() const
765 {
766  return delaySumW_ > 0.0 ? sqrt(delaySumRMS2_/delaySumW_) : 0.0;
767 };
768 
769 
770 
771 //
772 inline double SgVlbiSessionInfo::rateWRMS() const
773 {
774  return rateSumW_ > 0.0 ? sqrt(rateSumRMS2_/rateSumW_) : 0.0;
775 };
776 
777 
778 
779 //
781 {
783 };
784 
785 
786 
787 //
788 // FRIENDS:
789 //
790 //
791 //
792 
793 
794 /*=====================================================================================================*/
795 
796 
797 
798 
799 
800 /*=====================================================================================================*/
801 //
802 // aux functions:
803 //
805 
806 /*=====================================================================================================*/
807 #endif // SG_VLBI_SESSION_INFO_H
QMap< QString, SgVlbiSessionInfo * > SessionInfosByName
bool lessThan4_FirstEpochSortingOrder(SgVlbiSessionInfo *, SgVlbiSessionInfo *)
QMap< QString, SgVlbiSessionInfo * >::iterator SessionInfosByName_it
QList< SgVlbiSessionInfo * >::iterator SessionInfos_it
QList< SgVlbiSessionInfo * > SessionInfos
Definition: SgMJD.h:59
double toDouble() const
Definition: SgMJD.h:533
const QString & getCorrelatorType() const
const SgMJD & getTFinis() const
const QString & getName() const
void setOfficialName(const QString &name)
const QString & getNetworkID() const
const SgMJD & getTStart() const
void setSchedulerName(const QString &name)
void setRecordingMode(const QString &mode)
void setNetworkID(const QString &netID)
const QString & getSubmitterName() const
int getNumOfStations() const
void setSessionCode(const QString &code)
const QString & getUserFlag() const
virtual void calcTMean()
void setDescription(const QString &description)
QString userFlag_
A flag assigned by user;.
SgVlbiSessionInfo & operator=(const SgVlbiSessionInfo &)
@ OT_DBH
observations are from database files provided by correlators;
@ OT_MK4
observations are from Mk4-compatible correlator output;
@ OT_AGV
observations are in AGV format;
@ OT_VDB
observations are from vgosDb data tree;
@ OT_NGS
observations are from a NGS file provided by other AC;
@ OT_KOMB
observations are from KOMB output (generated by NICT, Japan);
@ OT_UNKNOWN
unknown (=all others) source of import;
void setName(const QString &name)
void addRateWRMS(double o_c, double w)
void setTFinis(const SgMJD &t)
QString officialName_
Official Name (from MasterFile)
void setCorrelatorType(const QString &name)
CorrelatorPostProcSoftware cppsSoft_
void setUserFlag(const QString &flag)
@ Attr_FF_AUX_OBS_MODIFIED
station log related data were modified; //vgosDbProcLogs
@ Attr_FF_EDIT_INFO_MODIFIED
edit info has been modified by user;
@ Attr_FF_WEIGHTS_CORRECTED
weights have been corrected;
@ Attr_PRE_PROCESSED
the observations has been prepared for analysis;
@ Attr_FF_ION_C_CALCULATED
ionospheric corrections have been calculated;
@ Attr_FF_CALC_DATA_MODIFIED
the theoretical values were modified; //vgosDbCalc
@ Attr_FF_PHASE_DEL_USED
station clocks or zenith delays were set.
@ Attr_FF_OUTLIERS_PROCESSED
outliers have been processed;
@ Attr_HAS_CALC_DATA
the theoretical values are available;
@ Attr_HAS_DTEC
the session contains diffTec values;
@ Attr_FF_STN_PWL_MODIFIED
station clocks or zenith delays were set.
@ Attr_FF_AMBIGS_RESOLVED
ambiguities have been resolved;
@ Attr_FF_CREATED
the session has been imported from correlator;//vgosDbMake
@ Attr_FF_ECC_UPDATED
eccentricity data for one of stations were updated;
@ Attr_FF_AUTOPROCESSED
automatic data processing performed successfully;
@ Attr_HAS_AUX_OBS
session contains aux.observations (e.g.: meteo data, cables);
@ Attr_HAS_IONO_CORR
the theoretical values are available;
@ Attr_HAS_WEIGHTS
the theoretical values are available;
@ Attr_HAS_CLOCK_BREAKS
there is at least one clock break at one of stations;
@ Attr_NOT_VALID
omit the session;
void setTCreation(const SgMJD &t)
SgMJD tFinis_
last epoch of the observations;
OriginType getOriginType() const
int getNumOfBaselines() const
const QString & getCorrelatorName() const
const QString & getOfficialName() const
QString networkID_
Network ID (a key);.
@ CPPS_UNKNOWN
unknown (=all others);
QString correlatorType_
Type of the correlator;.
QString networkSuffix_
a char that specifies network (e.g., A, E, U, etc.);
int getExperimentSerialNumber() const
void setExperimentSerialNumber(int sn)
void setNumOfStations(int n)
const QString & getPiAgencyName() const
const QString & getDescription() const
void setNumOfSources(int n)
void setNetworkSuffix(const QString &suffix)
void setNumOfObservations(int n)
const QString & getSchedulerName() const
double delayWRMS() const
const QString & getNetworkSuffix() const
int getNumOfSources() const
QString sessionCode_
official session code (from Masterfile);
int getNumOfObservations() const
CorrelatorPostProcSoftware getCppsSoft() const
void setNumOfBaselines(int n)
SgMJD tMean_
mean epoch of the observations;
void setSubmitterName(const QString &name)
void setCorrelatorName(const QString &name)
const QString & getSessionCode() const
const SgMJD & getTMean() const
QString piAgencyName_
Name of P.I. organization.
void setTStart(const SgMJD &t)
QString description_
Experiment description;.
QString schedulerName_
Name of resposible organization (from MasterFile)
void setPiAgencyName(const QString &name)
QString correlatorName_
Correlator Name (from MasterFile)
OriginType originType_
type of origin of the imported file(s);
void setOriginType(OriginType type)
const SgMJD & getTCreation() const
SgMJD tCreation_
date of creation of imported file(s);
void setCppsSoft(CorrelatorPostProcSoftware soft)
double rateWRMS() const
const QString & getRecordingMode() const
static QString className()
QString submitterName_
Name of resposible organization (from MasterFile)
QString name_
name of the session (e.g., 10JUL22XE);
void addDelayWRMS(double o_c, double w)
SgMJD tStart_
first epoch of the observations;