- Timestamp:
- Apr 9, 2020, 10:31:37 PM (5 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppFilter.cpp
r8912 r8915 39 39 _obsPool = obsPool; 40 40 _refPrn = t_prn(); 41 _datumTrafo = new t_datumTrafo(); 41 42 } 42 43 … … 45 46 t_pppFilter::~t_pppFilter() { 46 47 delete _parlist; 48 delete _datumTrafo; 47 49 } 48 50 … … 51 53 t_irc t_pppFilter::processEpoch(int num) { 52 54 _numSat = 0; 53 _num OfEpochProcessing = num;55 _numEpoProcessing = num; 54 56 const double maxSolGap = 60.0; 55 57 … … 119 121 OPT->_obsModelType == OPT->DCMphaseBias) { 120 122 preProcessing = true; 123 _numAllUsedLCs = 0; 121 124 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 122 125 char system = OPT->systems()[iSys]; 126 _numAllUsedLCs += OPT->LCs(system).size(); 127 if (OPT->_pseudoObsIono && !epoch->pseudoObsIono()) { 128 _numAllUsedLCs -= 1; // GIM not used 129 } 123 130 if (OPT->_refSatRequired) { 124 131 _refPrn = (_obsPool->getRefSatMapElement(system))->prn(); … … 137 144 } 138 145 146 if (_numEpoProcessing == 1) { 147 int maxObs = allObs.size() * _numAllUsedLCs; 148 _datumTrafo->initAA(maxObs, _parlist->nPar()); 149 } 150 139 151 // Process Satellite Systems separately 140 152 // ------------------------------------ 141 int numOfAllUsedLCs = 0;142 153 preProcessing = false; 143 154 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 144 155 char system = OPT->systems()[iSys]; 145 numOfAllUsedLCs += OPT->LCs(system).size(); 156 (iSys) ? _datumTrafo->setFirstSystem(false) : 157 _datumTrafo->setFirstSystem(true); 146 158 if (OPT->_refSatRequired) { 147 159 _refPrn = (_obsPool->getRefSatMapElement(system))->prn(); … … 167 179 _xFlt = xFltOld; 168 180 _QFlt = QFltOld; 169 initDatumTransformation(numOfAllUsedLCs);170 181 } 171 182 // close epoch processing … … 264 275 } 265 276 277 if ((!preProcessing) && 278 (OPT->_obsModelType == OPT->DCMcodeBias || 279 OPT->_obsModelType == OPT->DCMphaseBias)) { 280 _datumTrafo->updateIndices(maxObs); 281 _datumTrafo->prepareAA(AA, _numEpoProcessing, _parlist->nPar()); 282 } 283 266 284 // Check number of observations, truncate matrices 267 285 // ----------------------------------------------- … … 551 569 } 552 570 553 // 554 //////////////////////////////////////////////////////////////////////////// 555 void t_pppFilter::initDatumTransformation(int numOfUsedLCs) { 556 557 if (_numOfEpochProcessing == 1) { 558 _AA1.ReSize(numOfUsedLCs, _parlist->nPar()); 559 _AA1 = 0.0; 560 _AA2.ReSize(numOfUsedLCs, _parlist->nPar()); 561 _AA2 = 0.0; 562 } 563 } 564 565 // 566 //////////////////////////////////////////////////////////////////////////// 567 void t_pppFilter::datumTransformation() { 568 569 Matrix D21 = (_AA2.t() * _AA2).i() * _AA2.t() * _AA1; 570 571 _QFlt = D21 * _QFlt * D21.t(); 572 } 573 574 575 576 571 // Compute datum transformation 572 //////////////////////////////////////////////////////////////////////////// 573 void t_pppFilter::datumTransformation(void) { 574 _QFlt = _datumTrafo->varCov(Q()); 575 } 576 -
trunk/BNC/src/PPP/pppFilter.h
r8912 r8915 75 75 }; 76 76 77 class t_datumTrafo{ 78 public: 79 t_datumTrafo () {initIndices();} 80 void initIndices() {_firstRow = 1; _lastRow = 0;} 81 void setFirstSystem(bool firstSys) {_firstSys = firstSys;} 82 bool firstSystem() {return _firstSys;} 83 void updateIndices(int maxObs) { 84 if (_firstSys) { 85 initIndices(); 86 } 87 else { 88 _firstRow += maxObs; 89 } 90 _lastRow += maxObs; 91 }; 92 void initAA(int maxObs, int numPar) { 93 _AA1.ReSize(maxObs, numPar); _AA1 = 0.0; 94 _AA2.ReSize(maxObs, numPar); _AA2 = 0.0; 95 } 96 void prepareAA(Matrix& AA, int _numEpoProcessing, int nPar) { 97 Matrix& Prep = _AA2; 98 if (_numEpoProcessing == 1) { 99 Prep = _AA1; 100 } 101 Prep.SubMatrix(_firstRow, _lastRow, 1, nPar) = AA; 102 } 103 Matrix varCov(const SymmetricMatrix& QFlt) { 104 Matrix D21 = (_AA2.t() * _AA2).i() * _AA2.t() * _AA1; 105 return D21 * QFlt * D21.t(); 106 } 107 int _firstRow; 108 int _lastRow; 109 Matrix _AA1; 110 Matrix _AA2; 111 bool _firstSys; 112 }; 113 77 114 t_irc processSystem(const std::vector<t_lc::type>& LCs, 78 115 const std::vector<t_pppSatObs*>& obsVector, … … 93 130 void predictCovCrdPart(const SymmetricMatrix& QFltOld); 94 131 95 void initDatumTransformation(int numOfAllUsedLCs);96 97 132 bncTime _epoTime; 98 133 t_pppParlist* _parlist; 99 134 t_pppObsPool* _obsPool; 135 t_datumTrafo* _datumTrafo; 100 136 SymmetricMatrix _QFlt; 101 Matrix _AA1;102 Matrix _AA2;103 137 ColumnVector _xFlt; 104 138 ColumnVector _x0; 105 139 t_slip _slips[t_prn::MAXPRN+1]; 106 140 int _numSat; 107 int _numOfEpochProcessing; 141 int _numEpoProcessing; 142 int _numAllUsedLCs; 108 143 t_dop _dop; 109 144 bncTime _firstEpoTime;
Note:
See TracChangeset
for help on using the changeset viewer.