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 
167  inline const QString& getSessionType() const;
168 
171  inline const QString& getNetworkID() const;
172 
175  inline const QString& getDescription() const;
176 
179  inline const QString& getUserFlag() const;
180 
183  inline const QString& getOfficialName() const;
184 
187  inline const QString& getCorrelatorName() const;
188 
191  inline const QString& getCorrelatorType() const;
192 
195  inline const QString& getSubmitterName() const;
196 
199  inline const QString& getSchedulerName() const;
200 
203  inline const QString& getPiAgencyName() const;
204 
206  inline const QString& getRecordingMode() const {return recordingMode_;};
207 
210  inline int getNumOfStations() const;
211 
214  inline int getNumOfBaselines() const;
215 
218  inline int getNumOfSources() const;
219 
222  inline int getNumOfObservations() const;
223 
225 
226 
227 
228  // sets:
232  inline void setOriginType(OriginType type);
233 
236  inline void setTCreation(const SgMJD& t);
237 
240  inline void setTStart(const SgMJD& t);
241 
244  inline void setTFinis(const SgMJD& t);
245 
248  inline void setName(const QString& name);
249 
252  inline void setNetworkSuffix(const QString& suffix);
253 
256  inline void setSessionCode(const QString& code);
257 
258  inline void setSessionType(const QString& tp);
259 
262  inline void setNetworkID(const QString& netID);
263 
266  inline void setDescription(const QString& description);
267 
270  inline void setUserFlag(const QString& flag);
271 
274  inline void setOfficialName(const QString& name);
275 
278  inline void setCorrelatorName(const QString& name);
279 
282  inline void setCorrelatorType(const QString& name);
283 
286  inline void setSubmitterName(const QString& name);
287 
290  inline void setSchedulerName(const QString& name);
291 
294  inline void setPiAgencyName(const QString& name);
295 
297  inline void setRecordingMode(const QString& mode) {recordingMode_ = mode;};
298 
301  inline void setNumOfStations(int n);
302 
305  inline void setNumOfBaselines(int n);
306 
309  inline void setNumOfSources(int n);
310 
313  inline void setNumOfObservations(int n);
314 
315  inline void setCppsSoft(CorrelatorPostProcSoftware soft) {cppsSoft_ = soft;};
316 
317 
318  //
319  // Functions:
320  //
323  inline void addDelayWRMS(double o_c, double w);
324 
327  inline void addRateWRMS(double o_c, double w);
328 
331  inline double delayWRMS() const;
332 
335  inline double rateWRMS() const;
336 
339  inline void clearRMSs();
340 
343  void guessNetworkId();
344 
345 
346  //
347  // Friends:
348  //
349 
350  //
351  // I/O:
352  //
353  // ...
354 
355 protected:
361 
362  QString name_;
363  QString networkSuffix_;
364  QString sessionCode_;
365  QString sessionType_;
366  QString networkID_;
367  QString description_;
368  QString userFlag_;
369  QString officialName_;
370  QString correlatorName_;
371  QString correlatorType_;
372  QString submitterName_;
373  QString schedulerName_;
374  QString piAgencyName_;
375  QString recordingMode_;
377 
378 
384 
386  double rateSumRMS2_;
387  double delaySumW_;
388  double rateSumW_;
389 
390  virtual inline void calcTMean();
391 };
392 /*=====================================================================================================*/
393 
394 
395 
396 
397 
398 /*=====================================================================================================*/
399 /* */
400 /* SgVlbiSessionInfo inline members: */
401 /* */
402 /*=====================================================================================================*/
403 //
404 //
405 // INTERFACES:
406 //
407 //
409 {
410  return originType_;
411 };
412 
413 
414 
415 //
417 {
418  return tCreation_;
419 };
420 
421 
422 
423 //
424 inline const SgMJD& SgVlbiSessionInfo::getTStart() const
425 {
426  return tStart_;
427 };
428 
429 
430 
431 //
432 inline const SgMJD& SgVlbiSessionInfo::getTFinis() const
433 {
434  return tFinis_;
435 };
436 
437 
438 
439 //
440 inline const SgMJD& SgVlbiSessionInfo::getTMean() const
441 {
442  return tMean_;
443 };
444 
445 
446 
447 //
448 inline const QString& SgVlbiSessionInfo::getName() const
449 {
450  return name_;
451 };
452 
453 
454 
455 //
456 inline const QString& SgVlbiSessionInfo::getNetworkSuffix() const
457 {
458  return networkSuffix_;
459 };
460 
461 
462 
463 //
464 inline const QString& SgVlbiSessionInfo::getSessionCode() const
465 {
466  return sessionCode_;
467 };
468 
469 
470 
471 //
472 inline const QString& SgVlbiSessionInfo::getSessionType() const
473 {
474  return sessionType_;
475 };
476 
477 
478 
479 //
480 inline const QString& SgVlbiSessionInfo::getNetworkID() const
481 {
482  return networkID_;
483 };
484 
485 
486 
487 //
488 inline const QString& SgVlbiSessionInfo::getDescription() const
489 {
490  return description_;
491 };
492 
493 
494 
495 //
496 inline const QString& SgVlbiSessionInfo::getUserFlag() const
497 {
498  return userFlag_;
499 };
500 
501 
502 
503 //
504 inline const QString& SgVlbiSessionInfo::getOfficialName() const
505 {
506  return officialName_;
507 };
508 
509 
510 
511 //
512 inline const QString& SgVlbiSessionInfo::getCorrelatorName() const
513 {
514  return correlatorName_;
515 };
516 
517 
518 
519 //
520 inline const QString& SgVlbiSessionInfo::getCorrelatorType() const
521 {
522  return correlatorType_;
523 };
524 
525 
526 
527 //
528 inline const QString& SgVlbiSessionInfo::getSubmitterName() const
529 {
530  return submitterName_;
531 };
532 
533 
534 
535 //
536 inline const QString& SgVlbiSessionInfo::getSchedulerName() const
537 {
538  return schedulerName_;
539 };
540 
541 
542 
543 //
544 inline const QString& SgVlbiSessionInfo::getPiAgencyName() const
545 {
546  return piAgencyName_;
547 };
548 
549 
550 
551 //
553 {
554  return numOfStations_;
555 };
556 
557 
558 
559 //
561 {
562  return numOfBaselines_;
563 };
564 
565 
566 
567 //
569 {
570  return numOfSources_;
571 };
572 
573 
574 
575 //
577 {
578  return numOfObservations_;
579 };
580 
581 
582 
583 
584 
585 
586 //
588 {
589  originType_ = type;
590 };
591 
592 
593 
594 //
596 {
597  tCreation_ = t;
598 };
599 
600 
601 
602 //
603 inline void SgVlbiSessionInfo::setTStart(const SgMJD& t)
604 {
605  tStart_ = t;
606 };
607 
608 
609 
610 //
611 inline void SgVlbiSessionInfo::setTFinis(const SgMJD& t)
612 {
613  tFinis_ = t;
614 };
615 
616 
617 
618 //
619 inline void SgVlbiSessionInfo::setName(const QString& name)
620 {
621  name_ = name;
622 };
623 
624 
625 
626 //
627 inline void SgVlbiSessionInfo::setNetworkSuffix(const QString& suffix)
628 {
629  networkSuffix_ = suffix;
630 };
631 
632 
633 
634 //
635 inline void SgVlbiSessionInfo::setSessionCode(const QString& code)
636 {
637  sessionCode_ = code;
638 };
639 
640 
641 
642 //
643 inline void SgVlbiSessionInfo::setSessionType(const QString& tp)
644 {
645  sessionType_ = tp;
646 };
647 
648 
649 
650 //
651 inline void SgVlbiSessionInfo::setNetworkID(const QString& netID)
652 {
653  networkID_ = netID;
654 };
655 
656 
657 
658 //
659 inline void SgVlbiSessionInfo::setDescription(const QString& description)
660 {
661  description_ = description;
662 };
663 
664 
665 
666 //
667 inline void SgVlbiSessionInfo::setUserFlag(const QString& flag)
668 {
669  userFlag_ = flag;
670 };
671 
672 
673 
674 //
675 inline void SgVlbiSessionInfo::setOfficialName(const QString& name)
676 {
677  officialName_ = name;
678 };
679 
680 
681 
682 //
683 inline void SgVlbiSessionInfo::setCorrelatorName(const QString& name)
684 {
685  correlatorName_ = name;
686 };
687 
688 
689 
690 //
691 inline void SgVlbiSessionInfo::setCorrelatorType(const QString& type)
692 {
693  correlatorType_ = type;
694 };
695 
696 
697 
698 //
699 inline void SgVlbiSessionInfo::setSubmitterName(const QString& name)
700 {
701  submitterName_ = name;
702 };
703 
704 
705 
706 //
707 inline void SgVlbiSessionInfo::setSchedulerName(const QString& name)
708 {
709  schedulerName_ = name;
710 };
711 
712 
713 
714 //
715 inline void SgVlbiSessionInfo::setPiAgencyName(const QString& name)
716 {
717  piAgencyName_ = name;
718 };
719 
720 
721 
722 //
724 {
725  numOfStations_ = n;
726 };
727 
728 
729 
730 //
732 {
733  numOfBaselines_ = n;
734 };
735 
736 
737 
738 //
740 {
741  numOfSources_ = n;
742 };
743 
744 
745 
746 //
748 {
749  numOfObservations_ = n;
750 };
751 
752 
753 //
754 // FUNCTIONS:
755 //
756 //
757 //
758 //
760 {
761  tMean_ = (tStart_.toDouble() + tFinis_.toDouble())/2.0;
762 };
763 
764 
765 
766 //
767 inline void SgVlbiSessionInfo::addDelayWRMS(double o_c, double w)
768 {
769  delaySumRMS2_ += o_c*o_c*w;
770  delaySumW_ += w;
771 };
772 
773 
774 
775 //
776 inline void SgVlbiSessionInfo::addRateWRMS(double o_c, double w)
777 {
778  rateSumRMS2_ += o_c*o_c*w;
779  rateSumW_ += w;
780 };
781 
782 
783 
784 //
785 inline double SgVlbiSessionInfo::delayWRMS() const
786 {
787  return delaySumW_ > 0.0 ? sqrt(delaySumRMS2_/delaySumW_) : 0.0;
788 };
789 
790 
791 
792 //
793 inline double SgVlbiSessionInfo::rateWRMS() const
794 {
795  return rateSumW_ > 0.0 ? sqrt(rateSumRMS2_/rateSumW_) : 0.0;
796 };
797 
798 
799 
800 //
802 {
804 };
805 
806 
807 
808 //
809 // FRIENDS:
810 //
811 //
812 //
813 
814 
815 /*=====================================================================================================*/
816 
817 
818 
819 
820 
821 /*=====================================================================================================*/
822 //
823 // aux functions:
824 //
826 
827 /*=====================================================================================================*/
828 #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:531
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)
void setSessionType(const QString &tp)
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 sessionType_
official session type (from Masterfile);
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;
const QString & getSessionType() const
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;