- Timestamp:
- Nov 9, 2023, 2:34:05 PM (13 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppFilter.cpp
r10248 r10249 86 86 // Status Vector, Variance-Covariance Matrix 87 87 // ----------------------------------------- 88 ColumnVectorxFltOld = _xFlt;89 SymmetricMatrixQFltOld = _QFlt;90 setStateVectorAndVarCovMatrix( xFltOld, QFltOld,setNeuNoiseToZero);88 _xFltOld = _xFlt; 89 _QFltOld = _QFlt; 90 setStateVectorAndVarCovMatrix(setNeuNoiseToZero); 91 91 92 92 // Process Satellite Systems separately … … 267 267 } 268 268 if (par) { 269 //if (par->ambResetCandidate()) {269 //if (par->ambResetCandidate()) { 270 270 resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav); 271 adjustNoise(t_pppParam::ion, obs->prn(), 0.1, &QSav); 272 // } 273 // else { 274 // par->setAmbResetCandidate(); 275 // obs->setOutlier(); 276 // } 271 //} 272 //else { 273 // par->setAmbResetCandidate(); 274 // obs->setOutlier(); 275 //} 277 276 } 278 277 else { … … 344 343 if (slip) { 345 344 resetAmb(obs->prn(), obsVector, tLC); 346 adjustNoise(t_pppParam::ion, obs->prn(), 0.1);347 345 } 348 346 … … 363 361 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 364 362 resetAmb(obs->prn(), obsVector, tLC); 365 adjustNoise(t_pppParam::ion, obs->prn(), 0.1);366 363 } 367 364 } … … 383 380 t_pppParam *par = params[iPar]; 384 381 if (par->type() == t_pppParam::amb && par->prn() == prn) { 385 int ind= par->indexNew();386 double eleSat = par->ambEleSat();382 int ind = par->indexNew(); 383 double eleSat = par->ambEleSat(); 387 384 bncTime firstObsTime; 388 385 bncTime lastObsTime = par->lastObsTime(); 389 if (par->firstObsTime().undef()) { 390 firstObsTime = lastObsTime; 391 } 392 else { 393 firstObsTime = par->firstObsTime(); 394 } 386 (par->firstObsTime().undef()) ? 387 firstObsTime = lastObsTime : firstObsTime = par->firstObsTime(); 395 388 t_lc::type tLC = par->tLC(); 396 389 if (tLC != lc) {continue;} … … 405 398 _QFlt(ii, ind + 1) = 0.0; 406 399 if (QSav) { 407 (*QSav)(ii, ind + 1) = 0.0; 400 (*QSav)(ii, ind + 1) = 0.0; 408 401 } 409 402 } … … 434 427 t_pppParam *par = params[iPar]; 435 428 if (par->type() == parType && par->prn() == prn) { 436 int ind = par->indexNew(); 437 //LOG << string(_epoTime) << " ADJUSTNOISE " << par->toString() << endl; 438 for (unsigned ii = 1; ii <= params.size(); ii++) { 439 _QFlt(ii, ind + 1) = 0.0; 440 if (QSav) { 441 (*QSav)(ii, ind + 1) = 0.0; 442 } 443 } 444 _QFlt(ind + 1, ind + 1) = noise * noise; 429 int iOld = par->indexOld(); 430 int iNew = par->indexNew(); 431 LOG << string(_epoTime) << " ADJUSTNOISE " << prn.toString() << endl; 432 _QFlt[iNew][iNew] = _QFltOld[iOld][iOld] + noise * noise; 445 433 if (QSav) { 446 (*QSav)(ind + 1, ind + 1) = _QFlt(ind + 1, ind + 1); 447 } 448 irc = success; 449 } 450 } 451 434 (*QSav)(iNew + 1, iNew + 1) = _QFlt(iNew + 1, iNew + 1); 435 } 436 return success; 437 } 438 } 452 439 return irc; 453 440 } … … 492 479 // 493 480 //////////////////////////////////////////////////////////////////////////// 494 void t_pppFilter::predictCovCrdPart( const SymmetricMatrix &QFltOld,bool setNeuNoiseToZero) {481 void t_pppFilter::predictCovCrdPart(bool setNeuNoiseToZero) { 495 482 496 483 const vector<t_pppParam*>& params = _parlist->params(); … … 523 510 double dt = _epoTime - _firstEpoTime; 524 511 if (dt < OPT->_seedingTime || setNeuNoiseToZero) { 525 _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3);512 _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3); 526 513 } 527 514 else { 528 _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3) + Qxyz;515 _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3) + Qxyz; 529 516 } 530 517 } … … 533 520 // 534 521 //////////////////////////////////////////////////////////////////////////// 535 void t_pppFilter::setStateVectorAndVarCovMatrix(const ColumnVector &xFltOld, 536 const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) { 522 void t_pppFilter::setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero) { 537 523 538 524 const vector<t_pppParam*>& params = _parlist->params(); … … 545 531 for (unsigned ii = 0; ii < nPar; ii++) { 546 532 t_pppParam *par1 = params[ii]; 547 if ( QFltOld.size() == 0) {533 if (_QFltOld.size() == 0) { 548 534 par1->resetIndex(); 549 535 } … … 553 539 _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter 554 540 } else { 555 _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();556 _xFlt[ii] =xFltOld[iOld];541 _QFlt[ii][ii] = _QFltOld[iOld][iOld] + par1->noise() * par1->noise(); 542 _xFlt[ii] = _xFltOld[iOld]; 557 543 for (unsigned jj = 0; jj < ii; jj++) { 558 544 t_pppParam *par2 = params[jj]; 559 545 int jOld = par2->indexOld(); 560 546 if (jOld >= 0) { 561 _QFlt[ii][jj] = QFltOld(iOld + 1, jOld + 1);562 } 563 } 564 } 565 } 566 predictCovCrdPart( QFltOld,setNeuNoiseToZero);567 } 568 547 _QFlt[ii][jj] = _QFltOld(iOld + 1, jOld + 1); 548 } 549 } 550 } 551 } 552 predictCovCrdPart(setNeuNoiseToZero); 553 } 554 -
trunk/BNC/src/PPP/pppFilter.h
r10248 r10249 88 88 void cmpDOP(const std::vector<t_pppSatObs*>& obsVector); 89 89 90 void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld, 91 bool setNeuNoiseToZero); 90 void setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero); 92 91 93 void predictCovCrdPart( const SymmetricMatrix& QFltOld,bool setNeuNoiseToZero);92 void predictCovCrdPart(bool setNeuNoiseToZero); 94 93 95 94 bncTime _epoTime; 96 95 t_pppParlist* _parlist; 97 96 SymmetricMatrix _QFlt; 97 SymmetricMatrix _QFltOld; 98 98 ColumnVector _xFlt; 99 ColumnVector _xFltOld; 99 100 ColumnVector _x0; 100 101 t_slip _slips[t_prn::MAXPRN+1];
Note:
See TracChangeset
for help on using the changeset viewer.