Changeset 9526 in ntrip for trunk/BNC/src
- Timestamp:
- Oct 25, 2021, 3:15:33 PM (3 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppFilter.cpp
r9524 r9526 76 76 if (OPT->_obsModelType == OPT->DCMcodeBias || 77 77 OPT->_obsModelType == OPT->DCMphaseBias) { 78 // Save parameters of epoch before 79 _parlist_sav = _parlist; 78 rememberState(); 80 79 } 81 80 … … 85 84 return failure; 86 85 } 87 const vector<t_pppParam*>& params = _parlist.params(); 88 unsigned nPar = _parlist.nPar(); 86 89 87 #ifdef BNC_DEBUG_PPP 90 for (unsigned iPar = 0; iPar < nPar; iPar++) { 91 LOG << "t_pppFilter::processEpoch par_cur " << params[iPar]->toString() 92 << " lastObsTime().valid() " << params[iPar]->lastObsTime().valid() 93 << " epoTime-params[iPar]->lastObsTime() " << (_epoTime - params[iPar]->lastObsTime()) << endl; 94 } 88 _parlist.printParams(); 95 89 #endif 96 90 … … 99 93 ColumnVector xFltOld = _xFlt; 100 94 SymmetricMatrix QFltOld = _QFlt; 101 102 _QFlt.ReSize(nPar); _QFlt = 0.0; 103 _xFlt.ReSize(nPar); _xFlt = 0.0; 104 _x0.ReSize(nPar); _x0 = 0.0; 105 106 for (unsigned ii = 0; ii < nPar; ii++) { 107 t_pppParam* par1 = params[ii]; 108 if (QFltOld.size() == 0) { 109 par1->resetIndex(); 110 } 111 _x0[ii] = par1->x0(); 112 int iOld = par1->indexOld(); 113 if (iOld < 0) { 114 _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter 115 } 116 else { 117 _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise(); 118 _xFlt[ii] = xFltOld[iOld]; 119 for (unsigned jj = 0; jj < ii; jj++) { 120 t_pppParam* par2 = params[jj]; 121 int jOld = par2->indexOld(); 122 if (jOld >= 0) { 123 _QFlt[ii][jj] = QFltOld(iOld+1,jOld+1); 124 } 125 } 126 } 127 } 128 predictCovCrdPart(QFltOld); 95 setStateVectorAndVarCovMatrix(xFltOld, QFltOld); 96 129 97 130 98 // Pre-Process Satellite Systems separately … … 137 105 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 138 106 char sys = usedSystems[iSys]; 139 _refPrn = refSatMap[sys]->prn(); 107 _refPrn.set(sys, 0); 108 if (OPT->_refSatRequired) { 109 _refPrn = refSatMap[sys]->prn(); 110 } 140 111 vector<t_pppSatObs*> obsVector; 141 112 for (unsigned jj = 0; jj < allObs.size(); jj++) { … … 159 130 _xFlt = xFltOld; 160 131 _QFlt = QFltOld; 161 _parlist = _parlist_sav;132 restoreState(); 162 133 return success; 163 134 } … … 173 144 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 174 145 char sys = usedSystems[iSys]; 146 _refPrn.set(sys, 0); 175 147 if (OPT->_refSatRequired) { 176 148 _refPrn = refSatMap[sys]->prn(); 177 }178 else {179 _refPrn.set(sys, 0);180 149 } 181 150 unsigned int num = 0; … … 640 609 } 641 610 642 // Compute various DOP Values611 // 643 612 //////////////////////////////////////////////////////////////////////////// 644 613 void t_pppFilter::predictCovCrdPart(const SymmetricMatrix& QFltOld) { … … 680 649 } 681 650 651 // 652 //////////////////////////////////////////////////////////////////////////// 653 void t_pppFilter::setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, 654 const SymmetricMatrix& QFltOld) { 655 656 const vector<t_pppParam*>& params = _parlist.params(); 657 unsigned nPar = params.size(); 658 659 _QFlt.ReSize(nPar); _QFlt = 0.0; 660 _xFlt.ReSize(nPar); _xFlt = 0.0; 661 _x0.ReSize(nPar); _x0 = 0.0; 662 663 for (unsigned ii = 0; ii < nPar; ii++) { 664 t_pppParam* par1 = params[ii]; 665 if (QFltOld.size() == 0) { 666 par1->resetIndex(); 667 } 668 _x0[ii] = par1->x0(); 669 int iOld = par1->indexOld(); 670 if (iOld < 0) { 671 _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter 672 } 673 else { 674 _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise(); 675 _xFlt[ii] = xFltOld[iOld]; 676 for (unsigned jj = 0; jj < ii; jj++) { 677 t_pppParam* par2 = params[jj]; 678 int jOld = par2->indexOld(); 679 if (jOld >= 0) { 680 _QFlt[ii][jj] = QFltOld(iOld+1,jOld+1); 681 } 682 } 683 } 684 } 685 predictCovCrdPart(QFltOld); 686 } 687 682 688 // Compute datum transformation 683 689 //////////////////////////////////////////////////////////////////////////// … … 716 722 return failure; 717 723 } 718 const vector<t_pppParam*>& params = _parlist.params(); 719 unsigned nPar = _parlist.nPar(); 724 720 725 #ifdef BNC_DEBUG_PPP 721 LOG << " t_pppFilter::datumTransformation par last epoch: " << nPar << "/" << nPar << endl; 722 for (unsigned iPar = 0; iPar < nPar; iPar++) { 723 LOG << "t_pppFilter::processEpoch par_cur " << params[iPar]->toString() 724 << " lastObsTime().valid() " << params[iPar]->lastObsTime().valid() 725 << " epoTime-params[iPar]->lastObsTime() " << (_epoTime - params[iPar]->lastObsTime()) << endl; 726 } 726 _parlist.printParams(); 727 727 #endif 728 728 729 const QList<char>& usedSystems = _parlist.usedSystems(); 729 730 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { … … 757 758 maxObs -= 1; // pseudo obs iono with respect to refSat 758 759 } 760 761 const vector<t_pppParam*>& params = _parlist.params(); 762 unsigned nPar = _parlist.nPar(); 763 759 764 Matrix AA(maxObs, nPar); 760 765 … … 807 812 // ==================== 808 813 #ifdef BNC_DEBUG_PPP 809 //LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->numObs(), _datumTrafo->numPar());814 LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->numObs(), _datumTrafo->numPar()); 810 815 LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->numObs(), _datumTrafo->numPar()); 811 816 #endif … … 848 853 849 854 _obsPool->putEpoch(_epoTime, allObs, peseudoObsIono, refSatMap); 855 856 rememberState(); 850 857 851 858 return success; -
trunk/BNC/src/PPP/pppFilter.h
r9508 r9526 29 29 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono); 30 30 unsigned setTrafoObs(); 31 void restoreState() { LOG << "restore parameter from last epoch: _parlist = _parlist_old" << endl; 32 _QFlt = _QFlt_sav; 33 _parlist = _parlist_sav; 34 } 35 void rememberState() { LOG << "Remember parameters from epoch before: _parlist_old = _parlist" << endl; 36 _QFlt_sav = _QFlt; 37 _parlist_sav = _parlist; 38 } 31 39 32 40 int numSat() const {return _numSat;} … … 183 191 const QMap<char, t_pppRefSat*>& refSatMap); 184 192 193 void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld); 194 185 195 void predictCovCrdPart(const SymmetricMatrix& QFltOld); 186 196 … … 197 207 t_datumTrafo* _datumTrafo; 198 208 SymmetricMatrix _QFlt; 209 SymmetricMatrix _QFlt_sav; 199 210 ColumnVector _xFlt; 200 211 ColumnVector _x0; -
trunk/BNC/src/PPP/pppParlist.cpp
r9525 r9526 829 829 //////////////////////////////////////////////////////////////////////////// 830 830 void t_pppParlist::printParams() { 831 vector<t_pppParam*>::const_iterator it = _params.begin(); 832 while (it != _params.end()) {833 t_pppParam* par = *it;834 LOG << "par " << par->toString() << " lastObsTime valid? " << par->lastObsTime().valid()<< endl;835 } 836 } 837 831 832 for (unsigned iPar = 0; iPar < _params.size(); iPar++) { 833 LOG << "t_pppFilter::processEpoch par_cur " << _params[iPar]->toString() 834 << " lastObsTime().valid() " << _params[iPar]->lastObsTime().valid() << endl; 835 } 836 } 837
Note:
See TracChangeset
for help on using the changeset viewer.