- Timestamp:
- Oct 14, 2011, 8:17:32 PM (13 years ago)
- Location:
- trunk/BNC/combination
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r3474 r3475 438 438 // ---------------------------------------------------- 439 439 t_irc irc; 440 ColumnVector dx; 440 441 if (_method == filter) { 441 irc = processEpoch_filter(out, resCorr );442 irc = processEpoch_filter(out, resCorr, dx); 442 443 } 443 444 else { 444 irc = processEpoch_singleEpoch(out, resCorr );445 } 446 447 // Print Results448 // ------------- 445 irc = processEpoch_singleEpoch(out, resCorr, dx); 446 } 447 448 // Update Parameter Values, Print Results 449 // -------------------------------------- 449 450 if (irc == success) { 451 for (int iPar = 1; iPar <= _params.size(); iPar++) { 452 cmbParam* pp = _params[iPar-1]; 453 pp->xx += dx(iPar); 454 if (pp->type == cmbParam::clkSat) { 455 if (resCorr.find(pp->prn) != resCorr.end()) { 456 resCorr[pp->prn]->dClk = pp->xx / t_CST::c; 457 } 458 } 459 out << _resTime.datestr().c_str() << " " 460 << _resTime.timestr().c_str() << " "; 461 out.setRealNumberNotation(QTextStream::FixedNotation); 462 out.setFieldWidth(8); 463 out.setRealNumberPrecision(4); 464 out << pp->toString() << " " 465 << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl; 466 out.setFieldWidth(0); 467 } 450 468 printResults(out, resCorr); 451 469 dumpResults(resCorr); … … 461 479 //////////////////////////////////////////////////////////////////////////// 462 480 t_irc bncComb::processEpoch_filter(QTextStream& out, 463 QMap<QString, t_corr*>& resCorr) { 481 QMap<QString, t_corr*>& resCorr, 482 ColumnVector& dx) { 464 483 465 484 // Prediction Step … … 483 502 SymmetricMatrix QQ_sav = _QQ; 484 503 485 ColumnVector dx;486 487 504 // Update and outlier detection loop 488 505 // --------------------------------- … … 528 545 break; 529 546 } 530 }531 532 // Update Parameter Values533 // -----------------------534 for (int iPar = 1; iPar <= _params.size(); iPar++) {535 cmbParam* pp = _params[iPar-1];536 pp->xx += dx(iPar);537 if (pp->type == cmbParam::clkSat) {538 if (resCorr.find(pp->prn) != resCorr.end()) {539 resCorr[pp->prn]->dClk = pp->xx / t_CST::c;540 }541 }542 out << _resTime.datestr().c_str() << " "543 << _resTime.timestr().c_str() << " ";544 out.setRealNumberNotation(QTextStream::FixedNotation);545 out.setFieldWidth(8);546 out.setRealNumberPrecision(4);547 out << pp->toString() << " "548 << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl;549 out.setFieldWidth(0);550 547 } 551 548 … … 785 782 //////////////////////////////////////////////////////////////////////////// 786 783 t_irc bncComb::processEpoch_singleEpoch(QTextStream& out, 787 QMap<QString, t_corr*>& resCorr) { 784 QMap<QString, t_corr*>& resCorr, 785 ColumnVector& dx) { 788 786 789 787 // Initialize resCorr … … 875 873 SymmetricMatrix NN; NN << AA.t() * PP * AA; 876 874 ColumnVector bb = AA.t() * PP * ll; 877 SymmetricMatrix QQ = NN.i(); 878 879 ColumnVector xx = QQ * bb; 880 881 cout << xx.t() << endl; 875 876 _QQ = NN.i(); 877 dx = _QQ * bb; 882 878 883 879 return success; -
trunk/BNC/combination/bnccomb.h
r3472 r3475 77 77 void processEpoch(); 78 78 t_irc processEpoch_filter(QTextStream& out, 79 QMap<QString, t_corr*>& resCorr); 79 QMap<QString, t_corr*>& resCorr, 80 ColumnVector& dx); 80 81 t_irc processEpoch_singleEpoch(QTextStream& out, 81 QMap<QString, t_corr*>& resCorr); 82 QMap<QString, t_corr*>& resCorr, 83 ColumnVector& dx); 82 84 t_irc createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP, 83 85 const ColumnVector& x0, QMap<QString, t_corr*>& resCorr);
Note:
See TracChangeset
for help on using the changeset viewer.