- Timestamp:
- Apr 6, 2020, 10:43:22 AM (5 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r8910 r8912 68 68 69 69 if (_opt->_refSatRequired) { 70 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {71 char system = OPT->systems()[iSys];70 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { 71 char system = _opt->systems()[iSys]; 72 72 _obsPool->initRefSatMapElement(system); 73 73 } … … 165 165 for (unsigned ii = 0; ii < satObs.size(); ii++) { 166 166 char system = satObs[ii]->_prn.system(); 167 if ( OPT->useSystem(system)) {167 if (_opt->useSystem(system)) { 168 168 t_pppSatObs* pppSatObs = new t_pppSatObs(*satObs[ii]); 169 169 if (pppSatObs->isValid()) { … … 180 180 if (_opt->_refSatRequired) { 181 181 // reference satellite definition per system 182 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {183 char system = OPT->systems()[iSys];182 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { 183 char system = _opt->systems()[iSys]; 184 184 bool refSatDefined = false; 185 185 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system); … … 187 187 const t_pppSatObs* satObs = obsVector.at(ii); 188 188 // reference satellite is unchanged 189 if (!_obsPool-> epoReProcessing() && refSat->prn() == satObs->prn()) {189 if (!_obsPool->refSatChangeRequired() && refSat->prn() == satObs->prn()) { 190 190 refSatDefined = true; 191 191 obsVector[ii]->setAsReference(); … … 193 193 } 194 194 // reference satellite has changed 195 else if ( _obsPool->epoReProcessing() && refSat->prn() != satObs->prn()) {195 else if ( _obsPool->refSatChangeRequired() && refSat->prn() != satObs->prn()) { 196 196 if (satObs->prn().system() == system) { 197 197 refSatDefined = true; … … 217 217 } 218 218 } 219 _obsPool->set EpoReProcessing(false); //TODO: später erst nach Trafo false setzen219 _obsPool->setRefSatChangeRequired(false); 220 220 } 221 221 … … 252 252 bool pseudoObsIono = false; 253 253 254 if ( OPT->_pseudoObsIono) {254 if (_opt->_pseudoObsIono) { 255 255 vector<t_pppSatObs*>::iterator it = obsVector.begin(); 256 256 while (it != obsVector.end()) { … … 295 295 } 296 296 } 297 if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {297 if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) { 298 298 ++iObs; 299 299 BB[iObs][0] = satObs->xc()[0]; … … 303 303 } 304 304 } 305 if (iObs + 1 < OPT->_minObs) {305 if (iObs + 1 < _opt->_minObs) { 306 306 LOG << "t_pppClient::cmpBancroft not enough observations" << endl; 307 307 return failure; … … 321 321 if (satObs->isValid() && 322 322 satObs->prn().system() == 'G' && 323 (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {323 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) { 324 324 ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3); 325 325 double res = rr.NormFrobenius() - satObs->obsValue(tLC) … … 363 363 double offGG = 0.0; 364 364 365 if ( OPT->useSystem('R')) {365 if (_opt->useSystem('R')) { 366 366 while (obsVector.size() > 0) { 367 367 offGG = 0.0; … … 376 376 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 377 377 } 378 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) {378 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 379 379 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 380 380 ++nObs; … … 465 465 bncTime time; 466 466 time = _epoTimeRover; 467 station->setName( OPT->_roverName);468 station->setAntName( OPT->_antNameRover);467 station->setName(_opt->_roverName); 468 station->setAntName(_opt->_antNameRover); 469 469 station->setEpochTime(time); 470 if ( OPT->xyzAprRoverSet()) {471 station->setXyzApr( OPT->_xyzAprRover);470 if (_opt->xyzAprRoverSet()) { 471 station->setXyzApr(_opt->_xyzAprRover); 472 472 } 473 473 else { 474 474 station->setXyzApr(xyzc.Rows(1,3)); 475 475 } 476 station->setNeuEcc( OPT->_neuEccRover);476 station->setNeuEcc(_opt->_neuEccRover); 477 477 478 478 // Receiver Clock … … 495 495 } 496 496 if (satObs->isValid() && 497 satObs->eleSat() >= OPT->_minEle &&497 satObs->eleSat() >= _opt->_minEle && 498 498 modelSetup == success) { 499 if (satObs->isReference() && OPT->_pseudoObsIono) {499 if (satObs->isReference() && _opt->_pseudoObsIono) { 500 500 char system = satObs->prn().system(); 501 501 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system); … … 519 519 try { 520 520 initOutput(output); 521 _num = 0;522 _obsPool->setEpoReProcessing(false); // initialize for epoch521 int num = 0; 522 bool epochReProcessing = false; 523 523 524 524 do { 525 _num++;525 num++; 526 526 527 527 // Prepare Observations of the Rover … … 550 550 // Prepare Pseudo Observations of the Rover 551 551 // ---------------------------------------- 552 _pseudoObsIono = preparePseudoObs(_obsRover);//qDebug() << "_pseudoObsIonoAvailable: " << _pseudoObsIono; 553 554 if (int(_obsRover.size()) < OPT->_minObs) { 552 _pseudoObsIono = preparePseudoObs(_obsRover); 553 if (int(_obsRover.size()) < _opt->_minObs) { 555 554 LOG << "t_pppClient::processEpoch not enough observations" << endl; 556 555 return finish(failure); 557 556 } 558 557 559 if ( OPT->_refSatRequired) {558 if (_opt->_refSatRequired) { 560 559 LOG.setf(ios::fixed); 561 560 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap()); … … 575 574 // Process Epoch in Filter 576 575 // ----------------------- 577 if (_filter->processEpoch( _num) != success) {576 if (_filter->processEpoch(num) != success) { 578 577 return finish(failure); 579 578 } 580 // if num > 1 und !obsPool->epoReProcessing() => filter ->datumTransformation 581 } while (_obsPool->epoReProcessing()); 579 580 // Epoch re-processing required? 581 // ----------------------------- 582 if (_obsPool->refSatChangeRequired()) { 583 epochReProcessing = true; 584 } 585 else { 586 epochReProcessing = false; 587 } 588 // Datum transformation required? 589 // ------------------------------ 590 if (num > 1 && epochReProcessing) { 591 _filter->datumTransformation(); 592 } 593 594 } while (epochReProcessing); 582 595 } 583 596 catch (Exception& exc) { -
trunk/BNC/src/PPP/pppFilter.cpp
r8910 r8912 51 51 t_irc t_pppFilter::processEpoch(int num) { 52 52 _numSat = 0; 53 _numOfEpochProcessing = num; 53 54 const double maxSolGap = 60.0; 54 55 … … 87 88 ColumnVector xFltOld = _xFlt; 88 89 SymmetricMatrix QFltOld = _QFlt; 89 90 90 _QFlt.ReSize(_parlist->nPar()); _QFlt = 0.0; 91 91 _xFlt.ReSize(_parlist->nPar()); _xFlt = 0.0; 92 92 _x0.ReSize(_parlist->nPar()); _x0 = 0.0; 93 94 93 for (unsigned ii = 0; ii < params.size(); ii++) { 95 94 const t_pppParam* par1 = params[ii]; … … 111 110 } 112 111 } 113 114 112 predictCovCrdPart(QFltOld); 115 113 … … 141 139 // Process Satellite Systems separately 142 140 // ------------------------------------ 141 int numOfAllUsedLCs = 0; 142 preProcessing = false; 143 143 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 144 144 char system = OPT->systems()[iSys]; 145 numOfAllUsedLCs += OPT->LCs(system).size(); 145 146 if (OPT->_refSatRequired) { 146 147 _refPrn = (_obsPool->getRefSatMapElement(system))->prn(); … … 160 161 } 161 162 } 162 if (_obsPool->epoReProcessing()) { 163 // set A1 und A2 abhängig von num 164 // if num == 1 => A1 165 // if num > 1 => A2 166 } 163 164 // refSat change required? 165 // ----------------------- 166 if (_obsPool->refSatChangeRequired()) { 167 _xFlt = xFltOld; 168 _QFlt = QFltOld; 169 initDatumTransformation(numOfAllUsedLCs); 170 } 171 // close epoch processing 172 // ---------------------- 167 173 else { 168 174 cmpDOP(allObs); … … 223 229 ColumnVector ll(maxObs); 224 230 DiagonalMatrix PP(maxObs); PP = 0.0; 225 //TETSPLOT 231 232 // TETSPLOT 226 233 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 227 234 const t_pppParam* par = params[iPar]; … … 229 236 } 230 237 cout << endl; 238 //END TETSPLOT 231 239 232 240 int iObs = -1; … … 307 315 if (par && preProcessing) { 308 316 if (par->prn() == refPrn) { 309 _obsPool->set EpoReProcessing(true);317 _obsPool->setRefSatChangeRequired(true); 310 318 } 311 319 } … … 392 400 if (preProcessing) { 393 401 if (obs->prn() == refPrn) { 394 _obsPool->set EpoReProcessing(true);402 _obsPool->setRefSatChangeRequired(true); 395 403 } 396 404 } … … 412 420 if (preProcessing) { 413 421 if (obs->prn() == refPrn) { 414 _obsPool->set EpoReProcessing(true);422 _obsPool->setRefSatChangeRequired(true); 415 423 } 416 424 } … … 542 550 } 543 551 } 552 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 -
trunk/BNC/src/PPP/pppFilter.h
r8910 r8912 21 21 22 22 t_irc processEpoch(int num); 23 24 void datumTransformation(); 23 25 24 26 const ColumnVector& x() const {return _xFlt;} … … 91 93 void predictCovCrdPart(const SymmetricMatrix& QFltOld); 92 94 95 void initDatumTransformation(int numOfAllUsedLCs); 96 93 97 bncTime _epoTime; 94 98 t_pppParlist* _parlist; 95 99 t_pppObsPool* _obsPool; 96 100 SymmetricMatrix _QFlt; 101 Matrix _AA1; 102 Matrix _AA2; 97 103 ColumnVector _xFlt; 98 104 ColumnVector _x0; 99 105 t_slip _slips[t_prn::MAXPRN+1]; 100 106 int _numSat; 107 int _numOfEpochProcessing; 101 108 t_dop _dop; 102 109 bncTime _firstEpoTime;
Note:
See TracChangeset
for help on using the changeset viewer.