DelayModelRow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef DelayModelRow_CLASS
00035 #define DelayModelRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 #include <ArrayTime.h>
00052
00053
00054
00055 #include <Tag.h>
00056
00057
00058
00059 #include <Frequency.h>
00060
00061
00062
00063 #include <ArrayTimeInterval.h>
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 #include "CPolarizationType.h"
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 #include <ConversionException.h>
00130 #include <NoSuchRow.h>
00131 #include <IllegalAccessException.h>
00132
00133 #include <RowTransformer.h>
00134
00135
00136
00137
00138
00139
00140 namespace asdm {
00141
00142
00143
00144
00145
00146 class AntennaRow;
00147
00148
00149 class SpectralWindowRow;
00150
00151
00152 class FieldRow;
00153
00154
00155 class DelayModelRow;
00156 typedef void (DelayModelRow::*DelayModelAttributeFromBin) (EndianIStream& eis);
00157 typedef void (DelayModelRow::*DelayModelAttributeFromText) (const string& s);
00158
00165 class DelayModelRow {
00166 friend class asdm::DelayModelTable;
00167 friend class asdm::RowTransformer<DelayModelRow>;
00168
00169
00170 public:
00171
00172 virtual ~DelayModelRow();
00173
00177 DelayModelTable &getTable() const;
00178
00183 bool isAdded() const;
00184
00186
00188
00189
00190
00191
00192
00193
00194
00195
00200 ArrayTimeInterval getTimeInterval() const;
00201
00202
00203
00204
00214 void setTimeInterval (ArrayTimeInterval timeInterval);
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00232 int getNumPoly() const;
00233
00234
00235
00236
00244 void setNumPoly (int numPoly);
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00262 vector<double > getPhaseDelay() const;
00263
00264
00265
00266
00274 void setPhaseDelay (vector<double > phaseDelay);
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00292 vector<double > getPhaseDelayRate() const;
00293
00294
00295
00296
00304 void setPhaseDelayRate (vector<double > phaseDelayRate);
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00322 vector<double > getGroupDelay() const;
00323
00324
00325
00326
00334 void setGroupDelay (vector<double > groupDelay);
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00352 vector<double > getGroupDelayRate() const;
00353
00354
00355
00356
00364 void setGroupDelayRate (vector<double > groupDelayRate);
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00380 bool isTimeOriginExists() const;
00381
00382
00383
00389 ArrayTime getTimeOrigin() const;
00390
00391
00392
00393
00400 void setTimeOrigin (ArrayTime timeOrigin);
00401
00402
00403
00404
00408 void clearTimeOrigin ();
00409
00410
00411
00412
00413
00414
00415
00416
00421 bool isAtmosphericGroupDelayExists() const;
00422
00423
00424
00430 double getAtmosphericGroupDelay() const;
00431
00432
00433
00434
00441 void setAtmosphericGroupDelay (double atmosphericGroupDelay);
00442
00443
00444
00445
00449 void clearAtmosphericGroupDelay ();
00450
00451
00452
00453
00454
00455
00456
00457
00462 bool isAtmosphericGroupDelayRateExists() const;
00463
00464
00465
00471 double getAtmosphericGroupDelayRate() const;
00472
00473
00474
00475
00482 void setAtmosphericGroupDelayRate (double atmosphericGroupDelayRate);
00483
00484
00485
00486
00490 void clearAtmosphericGroupDelayRate ();
00491
00492
00493
00494
00495
00496
00497
00498
00503 bool isGeometricDelayExists() const;
00504
00505
00506
00512 double getGeometricDelay() const;
00513
00514
00515
00516
00523 void setGeometricDelay (double geometricDelay);
00524
00525
00526
00527
00531 void clearGeometricDelay ();
00532
00533
00534
00535
00536
00537
00538
00539
00544 bool isGeometricDelayRateExists() const;
00545
00546
00547
00553 double getGeometricDelayRate() const;
00554
00555
00556
00557
00564 void setGeometricDelayRate (double geometricDelayRate);
00565
00566
00567
00568
00572 void clearGeometricDelayRate ();
00573
00574
00575
00576
00577
00578
00579
00580
00585 bool isNumLOExists() const;
00586
00587
00588
00594 int getNumLO() const;
00595
00596
00597
00598
00605 void setNumLO (int numLO);
00606
00607
00608
00609
00613 void clearNumLO ();
00614
00615
00616
00617
00618
00619
00620
00621
00626 bool isLOOffsetExists() const;
00627
00628
00629
00635 vector<Frequency > getLOOffset() const;
00636
00637
00638
00639
00646 void setLOOffset (vector<Frequency > LOOffset);
00647
00648
00649
00650
00654 void clearLOOffset ();
00655
00656
00657
00658
00659
00660
00661
00662
00667 bool isLOOffsetRateExists() const;
00668
00669
00670
00676 vector<Frequency > getLOOffsetRate() const;
00677
00678
00679
00680
00687 void setLOOffsetRate (vector<Frequency > LOOffsetRate);
00688
00689
00690
00691
00695 void clearLOOffsetRate ();
00696
00697
00698
00699
00700
00701
00702
00703
00708 bool isDispersiveDelayExists() const;
00709
00710
00711
00717 double getDispersiveDelay() const;
00718
00719
00720
00721
00728 void setDispersiveDelay (double dispersiveDelay);
00729
00730
00731
00732
00736 void clearDispersiveDelay ();
00737
00738
00739
00740
00741
00742
00743
00744
00749 bool isDispersiveDelayRateExists() const;
00750
00751
00752
00758 double getDispersiveDelayRate() const;
00759
00760
00761
00762
00769 void setDispersiveDelayRate (double dispersiveDelayRate);
00770
00771
00772
00773
00777 void clearDispersiveDelayRate ();
00778
00779
00780
00781
00782
00783
00784
00785
00790 bool isAtmosphericDryDelayExists() const;
00791
00792
00793
00799 double getAtmosphericDryDelay() const;
00800
00801
00802
00803
00810 void setAtmosphericDryDelay (double atmosphericDryDelay);
00811
00812
00813
00814
00818 void clearAtmosphericDryDelay ();
00819
00820
00821
00822
00823
00824
00825
00826
00831 bool isAtmosphericWetDelayExists() const;
00832
00833
00834
00840 double getAtmosphericWetDelay() const;
00841
00842
00843
00844
00851 void setAtmosphericWetDelay (double atmosphericWetDelay);
00852
00853
00854
00855
00859 void clearAtmosphericWetDelay ();
00860
00861
00862
00863
00864
00865
00866
00867
00872 bool isPadDelayExists() const;
00873
00874
00875
00881 double getPadDelay() const;
00882
00883
00884
00885
00892 void setPadDelay (double padDelay);
00893
00894
00895
00896
00900 void clearPadDelay ();
00901
00902
00903
00904
00905
00906
00907
00908
00913 bool isAntennaDelayExists() const;
00914
00915
00916
00922 double getAntennaDelay() const;
00923
00924
00925
00926
00933 void setAntennaDelay (double antennaDelay);
00934
00935
00936
00937
00941 void clearAntennaDelay ();
00942
00943
00944
00945
00946
00947
00948
00949
00954 bool isNumReceptorExists() const;
00955
00956
00957
00963 int getNumReceptor() const;
00964
00965
00966
00967
00974 void setNumReceptor (int numReceptor);
00975
00976
00977
00978
00982 void clearNumReceptor ();
00983
00984
00985
00986
00987
00988
00989
00990
00995 bool isPolarizationTypeExists() const;
00996
00997
00998
01004 vector<PolarizationTypeMod::PolarizationType > getPolarizationType() const;
01005
01006
01007
01008
01015 void setPolarizationType (vector<PolarizationTypeMod::PolarizationType > polarizationType);
01016
01017
01018
01019
01023 void clearPolarizationType ();
01024
01025
01026
01027
01028
01029
01030
01031
01036 bool isElectronicDelayExists() const;
01037
01038
01039
01045 vector<double > getElectronicDelay() const;
01046
01047
01048
01049
01056 void setElectronicDelay (vector<double > electronicDelay);
01057
01058
01059
01060
01064 void clearElectronicDelay ();
01065
01066
01067
01068
01069
01070
01071
01072
01077 bool isElectronicDelayRateExists() const;
01078
01079
01080
01086 vector<double > getElectronicDelayRate() const;
01087
01088
01089
01090
01097 void setElectronicDelayRate (vector<double > electronicDelayRate);
01098
01099
01100
01101
01105 void clearElectronicDelayRate ();
01106
01107
01108
01109
01110
01111
01112
01113
01118 bool isReceiverDelayExists() const;
01119
01120
01121
01127 vector<double > getReceiverDelay() const;
01128
01129
01130
01131
01138 void setReceiverDelay (vector<double > receiverDelay);
01139
01140
01141
01142
01146 void clearReceiverDelay ();
01147
01148
01149
01150
01151
01152
01153
01154
01159 bool isIFDelayExists() const;
01160
01161
01162
01168 vector<double > getIFDelay() const;
01169
01170
01171
01172
01179 void setIFDelay (vector<double > IFDelay);
01180
01181
01182
01183
01187 void clearIFDelay ();
01188
01189
01190
01191
01192
01193
01194
01195
01200 bool isLODelayExists() const;
01201
01202
01203
01209 vector<double > getLODelay() const;
01210
01211
01212
01213
01220 void setLODelay (vector<double > LODelay);
01221
01222
01223
01224
01228 void clearLODelay ();
01229
01230
01231
01232
01233
01234
01235
01236
01241 bool isCrossPolarizationDelayExists() const;
01242
01243
01244
01250 double getCrossPolarizationDelay() const;
01251
01252
01253
01254
01261 void setCrossPolarizationDelay (double crossPolarizationDelay);
01262
01263
01264
01265
01269 void clearCrossPolarizationDelay ();
01270
01271
01272
01274
01276
01277
01278
01279
01280
01281
01282
01283
01288 Tag getAntennaId() const;
01289
01290
01291
01292
01302 void setAntennaId (Tag antennaId);
01303
01304
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314
01315
01320 Tag getFieldId() const;
01321
01322
01323
01324
01332 void setFieldId (Tag fieldId);
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343
01344
01345
01350 Tag getSpectralWindowId() const;
01351
01352
01353
01354
01364 void setSpectralWindowId (Tag spectralWindowId);
01365
01366
01367
01368
01369
01370
01372
01374
01375
01376
01377
01378
01385 AntennaRow* getAntennaUsingAntennaId();
01386
01387
01388
01389
01390
01391
01392
01393
01400 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
01401
01402
01403
01404
01405
01406
01407
01408
01415 FieldRow* getFieldUsingFieldId();
01416
01417
01418
01419
01420
01421
01422
01446 bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numPoly, vector<double > phaseDelay, vector<double > phaseDelayRate, vector<double > groupDelay, vector<double > groupDelayRate, Tag fieldId);
01447
01448
01449
01450
01468 bool compareRequiredValue(int numPoly, vector<double > phaseDelay, vector<double > phaseDelayRate, vector<double > groupDelay, vector<double > groupDelayRate, Tag fieldId);
01469
01470
01479 bool equalByRequiredValue(DelayModelRow* x) ;
01480
01481 #ifndef WITHOUT_ACS
01482
01486 asdmIDL::DelayModelRowIDL *toIDL() const;
01487
01495 void toIDL(asdmIDL::DelayModelRowIDL& x) const;
01496 #endif
01497
01498 #ifndef WITHOUT_ACS
01499
01504 void setFromIDL (asdmIDL::DelayModelRowIDL x) ;
01505 #endif
01506
01511 std::string toXML() const;
01512
01519 void setFromXML (std::string rowDoc) ;
01520
01523
01525
01526 std::map<std::string, DelayModelAttributeFromBin> fromBinMethods;
01527 void antennaIdFromBin( EndianIStream& eis);
01528 void spectralWindowIdFromBin( EndianIStream& eis);
01529 void timeIntervalFromBin( EndianIStream& eis);
01530 void numPolyFromBin( EndianIStream& eis);
01531 void phaseDelayFromBin( EndianIStream& eis);
01532 void phaseDelayRateFromBin( EndianIStream& eis);
01533 void groupDelayFromBin( EndianIStream& eis);
01534 void groupDelayRateFromBin( EndianIStream& eis);
01535 void fieldIdFromBin( EndianIStream& eis);
01536
01537 void timeOriginFromBin( EndianIStream& eis);
01538 void atmosphericGroupDelayFromBin( EndianIStream& eis);
01539 void atmosphericGroupDelayRateFromBin( EndianIStream& eis);
01540 void geometricDelayFromBin( EndianIStream& eis);
01541 void geometricDelayRateFromBin( EndianIStream& eis);
01542 void numLOFromBin( EndianIStream& eis);
01543 void LOOffsetFromBin( EndianIStream& eis);
01544 void LOOffsetRateFromBin( EndianIStream& eis);
01545 void dispersiveDelayFromBin( EndianIStream& eis);
01546 void dispersiveDelayRateFromBin( EndianIStream& eis);
01547 void atmosphericDryDelayFromBin( EndianIStream& eis);
01548 void atmosphericWetDelayFromBin( EndianIStream& eis);
01549 void padDelayFromBin( EndianIStream& eis);
01550 void antennaDelayFromBin( EndianIStream& eis);
01551 void numReceptorFromBin( EndianIStream& eis);
01552 void polarizationTypeFromBin( EndianIStream& eis);
01553 void electronicDelayFromBin( EndianIStream& eis);
01554 void electronicDelayRateFromBin( EndianIStream& eis);
01555 void receiverDelayFromBin( EndianIStream& eis);
01556 void IFDelayFromBin( EndianIStream& eis);
01557 void LODelayFromBin( EndianIStream& eis);
01558 void crossPolarizationDelayFromBin( EndianIStream& eis);
01559
01560
01568 static DelayModelRow* fromBin(EndianIStream& eis, DelayModelTable& table, const std::vector<std::string>& attributesSeq);
01569
01576 void fromText(const std::string& attributeName, const std::string& t);
01578
01579 private:
01583 DelayModelTable &table;
01587 bool hasBeenAdded;
01588
01589
01590 void isAdded(bool added);
01591
01592
01601 DelayModelRow (DelayModelTable &table);
01602
01620 DelayModelRow (DelayModelTable &table, DelayModelRow &row);
01621
01623
01625
01626
01627
01628
01629
01630
01631 ArrayTimeInterval timeInterval;
01632
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642 int numPoly;
01643
01644
01645
01646
01647
01648
01649
01650
01651
01652
01653 vector<double > phaseDelay;
01654
01655
01656
01657
01658
01659
01660
01661
01662
01663
01664 vector<double > phaseDelayRate;
01665
01666
01667
01668
01669
01670
01671
01672
01673
01674
01675 vector<double > groupDelay;
01676
01677
01678
01679
01680
01681
01682
01683
01684
01685
01686 vector<double > groupDelayRate;
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696 bool timeOriginExists;
01697
01698
01699 ArrayTime timeOrigin;
01700
01701
01702
01703
01704
01705
01706
01707
01708
01709 bool atmosphericGroupDelayExists;
01710
01711
01712 double atmosphericGroupDelay;
01713
01714
01715
01716
01717
01718
01719
01720
01721
01722 bool atmosphericGroupDelayRateExists;
01723
01724
01725 double atmosphericGroupDelayRate;
01726
01727
01728
01729
01730
01731
01732
01733
01734
01735 bool geometricDelayExists;
01736
01737
01738 double geometricDelay;
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748 bool geometricDelayRateExists;
01749
01750
01751 double geometricDelayRate;
01752
01753
01754
01755
01756
01757
01758
01759
01760
01761 bool numLOExists;
01762
01763
01764 int numLO;
01765
01766
01767
01768
01769
01770
01771
01772
01773
01774 bool LOOffsetExists;
01775
01776
01777 vector<Frequency > LOOffset;
01778
01779
01780
01781
01782
01783
01784
01785
01786
01787 bool LOOffsetRateExists;
01788
01789
01790 vector<Frequency > LOOffsetRate;
01791
01792
01793
01794
01795
01796
01797
01798
01799
01800 bool dispersiveDelayExists;
01801
01802
01803 double dispersiveDelay;
01804
01805
01806
01807
01808
01809
01810
01811
01812
01813 bool dispersiveDelayRateExists;
01814
01815
01816 double dispersiveDelayRate;
01817
01818
01819
01820
01821
01822
01823
01824
01825
01826 bool atmosphericDryDelayExists;
01827
01828
01829 double atmosphericDryDelay;
01830
01831
01832
01833
01834
01835
01836
01837
01838
01839 bool atmosphericWetDelayExists;
01840
01841
01842 double atmosphericWetDelay;
01843
01844
01845
01846
01847
01848
01849
01850
01851
01852 bool padDelayExists;
01853
01854
01855 double padDelay;
01856
01857
01858
01859
01860
01861
01862
01863
01864
01865 bool antennaDelayExists;
01866
01867
01868 double antennaDelay;
01869
01870
01871
01872
01873
01874
01875
01876
01877
01878 bool numReceptorExists;
01879
01880
01881 int numReceptor;
01882
01883
01884
01885
01886
01887
01888
01889
01890
01891 bool polarizationTypeExists;
01892
01893
01894 vector<PolarizationTypeMod::PolarizationType > polarizationType;
01895
01896
01897
01898
01899
01900
01901
01902
01903
01904 bool electronicDelayExists;
01905
01906
01907 vector<double > electronicDelay;
01908
01909
01910
01911
01912
01913
01914
01915
01916
01917 bool electronicDelayRateExists;
01918
01919
01920 vector<double > electronicDelayRate;
01921
01922
01923
01924
01925
01926
01927
01928
01929
01930 bool receiverDelayExists;
01931
01932
01933 vector<double > receiverDelay;
01934
01935
01936
01937
01938
01939
01940
01941
01942
01943 bool IFDelayExists;
01944
01945
01946 vector<double > IFDelay;
01947
01948
01949
01950
01951
01952
01953
01954
01955
01956 bool LODelayExists;
01957
01958
01959 vector<double > LODelay;
01960
01961
01962
01963
01964
01965
01966
01967
01968
01969 bool crossPolarizationDelayExists;
01970
01971
01972 double crossPolarizationDelay;
01973
01974
01975
01976
01977
01979
01981
01982
01983
01984
01985
01986
01987 Tag antennaId;
01988
01989
01990
01991
01992
01993
01994
01995
01996
01997
01998 Tag fieldId;
01999
02000
02001
02002
02003
02004
02005
02006
02007
02008
02009 Tag spectralWindowId;
02010
02011
02012
02013
02014
02016
02018
02019
02020
02021
02022
02023
02024
02025
02026
02027
02028
02029
02030
02031
02032
02033
02034
02035
02036
02037
02038
02039
02040
02041
02043
02045
02046
02047
02048
02049
02050
02051
02052
02053
02054
02055
02056
02057
02058
02059
02060
02061
02062
02063
02064
02065
02066
02067
02068
02069
02070
02071
02072
02073
02074
02075
02076
02077
02078
02079
02080
02082
02084 std::map<std::string, DelayModelAttributeFromText> fromTextMethods;
02085
02086 void antennaIdFromText (const string & s);
02087
02088
02089 void spectralWindowIdFromText (const string & s);
02090
02091
02092 void timeIntervalFromText (const string & s);
02093
02094
02095 void numPolyFromText (const string & s);
02096
02097
02098 void phaseDelayFromText (const string & s);
02099
02100
02101 void phaseDelayRateFromText (const string & s);
02102
02103
02104 void groupDelayFromText (const string & s);
02105
02106
02107 void groupDelayRateFromText (const string & s);
02108
02109
02110 void fieldIdFromText (const string & s);
02111
02112
02113
02114 void timeOriginFromText (const string & s);
02115
02116
02117 void atmosphericGroupDelayFromText (const string & s);
02118
02119
02120 void atmosphericGroupDelayRateFromText (const string & s);
02121
02122
02123 void geometricDelayFromText (const string & s);
02124
02125
02126 void geometricDelayRateFromText (const string & s);
02127
02128
02129 void numLOFromText (const string & s);
02130
02131
02132 void LOOffsetFromText (const string & s);
02133
02134
02135 void LOOffsetRateFromText (const string & s);
02136
02137
02138 void dispersiveDelayFromText (const string & s);
02139
02140
02141 void dispersiveDelayRateFromText (const string & s);
02142
02143
02144 void atmosphericDryDelayFromText (const string & s);
02145
02146
02147 void atmosphericWetDelayFromText (const string & s);
02148
02149
02150 void padDelayFromText (const string & s);
02151
02152
02153 void antennaDelayFromText (const string & s);
02154
02155
02156 void numReceptorFromText (const string & s);
02157
02158
02159 void polarizationTypeFromText (const string & s);
02160
02161
02162 void electronicDelayFromText (const string & s);
02163
02164
02165 void electronicDelayRateFromText (const string & s);
02166
02167
02168 void receiverDelayFromText (const string & s);
02169
02170
02171 void IFDelayFromText (const string & s);
02172
02173
02174 void LODelayFromText (const string & s);
02175
02176
02177 void crossPolarizationDelayFromText (const string & s);
02178
02179
02180
02185 void toBin(EndianOSStream& eoss);
02186
02196 };
02197
02198 }
02199
02200 #endif