Changeset 9431 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- May 18, 2021, 5:15:10 PM (3 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r9419 r9431 611 611 else { 612 612 LOG << "_filter->datumTransformation() == success" << endl; 613 _obsPool->saveLastEpoRefSats(); 613 if (!_obsPool->refSatChangeRequired()) { 614 _obsPool->saveLastEpoRefSats(); 615 } 614 616 } 615 617 } … … 644 646 (_opt->_obsModelType == OPT->DCMcodeBias || 645 647 _opt->_obsModelType == OPT->DCMphaseBias || 646 _opt->_pseudoObsIono)) { 648 _opt->_pseudoObsIono) 649 ) { 647 650 LOG << "refSatChanged()" << endl; 648 651 epochReProcessing = true; … … 685 688 epochReProcessing = false; 686 689 } 690 687 691 } while (epochReProcessing); 692 688 693 } 689 694 catch (Exception& exc) { … … 886 891 return failure; 887 892 } 888 QString str; 893 QString str;LOG << prn.toString() << endl; 889 894 if (prn == _obsPool->getRefSatMapElementLastEpoch(sys) || 890 895 _obsPool->getRefSatMapElementLastEpoch(sys) == t_prn() ) { -
trunk/BNC/src/PPP/pppFilter.cpp
r9421 r9431 130 130 OPT->_obsModelType == OPT->DCMphaseBias) { 131 131 preProcessing = true; 132 unsigned usableSys = 0;133 for ( unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {134 char sys = OPT->systems()[iSys];132 QList<char>& usedSystems = _parlist->usedSystems(); 133 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 134 char sys = usedSystems[iSys]; 135 135 _refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 136 136 vector<t_pppSatObs*> obsVector; … … 140 140 } 141 141 } 142 if (!obsVector.size()) { 143 continue; 144 } 145 else { 146 ++usableSys; 147 if (usableSys == 1) { 148 _datumTrafo->setFirstSystem(sys); 149 } 142 if (iSys == 0) { 143 _datumTrafo->setFirstSystem(sys); 150 144 } 151 145 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, … … 171 165 // ------------------------------------ 172 166 preProcessing = false; 173 unsigned usableSys = 0;174 for ( unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {175 char sys = OPT->systems()[iSys];167 QList<char>& usedSystems = _parlist-> usedSystems(); 168 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 169 char sys = usedSystems[iSys]; 176 170 if (OPT->_refSatRequired) { 177 171 _refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); … … 188 182 } 189 183 } 190 if (!num) { 191 continue; 192 } 193 else { 194 ++usableSys; 195 if (usableSys == 1 && 196 OPT->_obsModelType == OPT->UncombPPP) { 197 _datumTrafo->setFirstSystem(sys); 198 } 184 if (iSys == 0 && OPT->_obsModelType == OPT->UncombPPP) { 185 _datumTrafo->setFirstSystem(sys); 199 186 } 200 187 LOG << epoTimeStr << " SATNUM " << sys << ' ' << right << setw(2) << num << endl; … … 299 286 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC)); 300 287 } 288 } 289 } 290 if (OPT->_obsModelType == OPT->DCMcodeBias || 291 OPT->_obsModelType == OPT->DCMphaseBias) { 292 if (iObs < 2) { // TODO SATNUM => usableSys has to be removed 293 return failure; 301 294 } 302 295 } … … 394 387 t_pppSatObs* obs = usedObs[maxOutlierIndex]; 395 388 t_pppParam* par = 0; 396 #ifdef BNC_DEBUG_PPP397 389 LOG << epoTimeStr << " Outlier (" 398 390 << ((preProcessing) ? "pre-processing) " : "fin-processing) ") << t_lc::toString(maxOutlierLC) << ' ' 399 391 << obs->prn().toString() << ' ' 400 392 << setw(8) << setprecision(4) << maxOutlier << endl; 401 #endif402 393 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 403 394 t_pppParam* hlp = params[iPar]; … … 710 701 // ============================================================= 711 702 if (resetRefSatellitesLastEpoch(allObs) != true) { 712 LOG << "re setRefSatellitesLastEpoch = failure" << endl;713 return failure;703 LOG << "refsatChange required" << endl; 704 return success; 714 705 } 715 706 … … 725 716 } 726 717 vector<t_pppParam*>& params = parlist->params(); 718 unsigned nPar = parlist->nPar(); 727 719 #ifdef BNC_DEBUG_PPP 728 720 LOG << " parameters of last epoch" << endl; 729 for (unsigned iPar = 0; iPar < params.size(); iPar++) {721 for (unsigned iPar = 0; iPar < nPar; iPar++) { 730 722 LOG << params[iPar]->toString() << "\t\t" << endl; 731 723 } 732 724 #endif 733 unsigned nPar = parlist->nPar(); 734 unsigned usableSys = 0; 735 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 736 char sys = OPT->systems()[iSys]; 725 QList<char>& usedSystems = _parlist->usedSystems(); 726 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 727 char sys = usedSystems[iSys]; 737 728 t_prn refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 738 729 vector<t_pppSatObs*> obsVector; … … 742 733 } 743 734 } 744 if (!obsVector.size()) { 745 continue; 746 } 747 else { 748 ++usableSys; 749 if (usableSys == 1) { 750 _datumTrafo->setFirstSystem(sys); 751 } 735 if (iSys == 0) { 736 _datumTrafo->setFirstSystem(sys); 752 737 } 753 738 vector<t_lc::type> LCs = OPT->LCs(sys); … … 839 824 // Reset Ambiguities after Datum Transformation 840 825 // ============================================ 841 for ( unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {842 char sys = OPT->systems()[iSys];826 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 827 char sys = usedSystems[iSys]; 843 828 t_prn refPrnOld = _obsPool->getRefSatMapElementLastEpoch(sys); 844 829 t_prn refPrnNew = (_obsPool->getRefSatMapElement(sys))->prn(); … … 868 853 bool pseudoObsIono) { 869 854 unsigned trafoObs = 0; 870 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 871 char sys = OPT->systems()[iSys]; 855 QList<char>& usedSystems = _parlist-> usedSystems(); 856 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 857 char sys = usedSystems[iSys]; 872 858 int satNum = 0; 873 859 for (unsigned jj = 0; jj < allObs.size(); jj++) { … … 875 861 satNum++; 876 862 } 877 }878 if (!satNum) {879 continue;880 863 } 881 864 // all LCs … … 905 888 ////////////////////////////////////////////////////////////////////////////// 906 889 bool t_pppFilter::resetRefSatellitesLastEpoch(std::vector<t_pppSatObs*>& obsVector) { 907 908 bool resetRefSat = false; 890 bool resetRefSat; 909 891 // reference satellite definition per system 910 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 911 char sys = OPT->systems()[iSys]; 892 QList<char>& usedSystems = _parlist-> usedSystems(); 893 for (int iSys = 0; iSys < usedSystems.size(); iSys++) { 894 resetRefSat = false; 895 char sys = usedSystems[iSys]; 912 896 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(sys); 913 897 t_prn newPrn = refSat->prn(); … … 928 912 it++; 929 913 } 914 if (!resetRefSat) { 915 _obsPool->setRefSatChangeRequired(sys, true); 916 return resetRefSat; 917 } 930 918 } 931 919 return resetRefSat; -
trunk/BNC/src/PPP/pppFilter.h
r9419 r9431 23 23 t_irc processEpoch(); 24 24 25 const ColumnVector& x() const {return _xFlt;} 26 const SymmetricMatrix& Q() const {return _QFlt;} 27 25 28 t_irc datumTransformation(); 26 29 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono); 27 30 unsigned setTrafoObs(); 28 29 const ColumnVector& x() const {return _xFlt;}30 const SymmetricMatrix& Q() const {return _QFlt;}31 31 32 32 int numSat() const {return _numSat;} … … 80 80 class t_datumTrafo { 81 81 public: 82 t_datumTrafo () { 83 initIndices();84 } 85 ~t_datumTrafo () {86 87 }88 89 void initIndices() {90 _firstRow = 1; _lastRow = 0;91 }92 93 void setFirstSystem(char firstSys) {94 _firstSys = firstSys;95 } 96 82 t_datumTrafo () {initIndices();} 83 ~t_datumTrafo (){} 84 85 void initIndices() {_firstRow = 1; _lastRow = 0;} 86 void updateIndices(char sys, int maxObsSys) { 87 if (firstSystem(sys)) { 88 initIndices(); 89 } 90 else { 91 _firstRow = _lastRow + 1; 92 } 93 _lastRow += maxObsSys;//LOG << "updateIndices: lastRow: " << _lastRow << endl; 94 }; 95 96 void setFirstSystem(char firstSys) { _firstSys = firstSys;} 97 97 bool firstSystem(char sys) { 98 98 if (_firstSys == sys) { … … 101 101 return false; 102 102 } 103 104 void updateIndices(char sys, int maxObsSys) {105 if (firstSystem(sys)) {106 initIndices();107 }108 else {109 _firstRow = _lastRow + 1;110 }111 _lastRow += maxObsSys;//LOG << "updateIndices: lastRow: " << _lastRow << endl;112 };113 114 103 void setNumObs(int maxObs) {_maxObs = maxObs;} 115 void setNumPar(int numPar) { _numPar = numPar;} 104 void setNumPar(int numPar) {_numPar = numPar;} 105 int numPar() {return _numPar;} 106 int numObs() {return _maxObs;} 107 void updateNumObs() { 108 _maxObs = _lastRow; 109 _AA1 = _AA1.SubMatrix(1, _lastRow, 1, _numPar); 110 _AA2 = _AA2.SubMatrix(1, _lastRow, 1, _numPar); 111 } 112 116 113 void setLastEpoParlist(t_pppParlist* parlist) {_parlist = parlist;} 117 114 t_pppParlist* lastEpoParlist() {return _parlist;} 118 int numPar() {return _numPar;}119 int numObs() {return _maxObs;}120 void updateNumObs() {//LOG << "updateObsNum _maxObs " << _maxObs;121 _maxObs = _lastRow;//LOG << "=> _maxObs " << _maxObs << " _numPar: " << _numPar << endl;122 _AA1 = _AA1.SubMatrix(1, _lastRow, 1, _numPar);123 _AA2 = _AA2.SubMatrix(1, _lastRow, 1, _numPar);124 }125 115 126 116 const Matrix& AA1() {return _AA1;} … … 128 118 const Matrix& D21() {return _D21;} 129 119 130 void initAA() { //LOG << "initAA: _maxObs: " << _maxObs << " _numPar: " << _numPar << endl;120 void initAA() { 131 121 _AA1.ReSize(_maxObs, _numPar); _AA1 = 0.0; 132 122 _AA2.ReSize(_maxObs, _numPar); _AA2 = 0.0; 133 123 _D21.ReSize(_numPar, _numPar); _D21 = 0.0; 134 124 } 135 136 125 void prepareAA(const Matrix& AA, int ind) { 137 126 Matrix* Prep = &_AA2; … … 141 130 Prep->SubMatrix(_firstRow, _lastRow, 1, _numPar) << AA; 142 131 } 143 144 132 void switchAA() { 145 133 _AA1 = _AA2; 146 134 } 147 148 135 t_irc computeTrafoMatrix() { 149 136 if (((_AA2.t() * _AA2)).Determinant() == 0.0) { -
trunk/BNC/src/PPP/pppParlist.h
r9419 r9431 109 109 const std::vector<t_pppParam*>& params() const {return _params;} 110 110 std::vector<t_pppParam*>& params() {return _params;} 111 QList<char>& usedSystems() {return _usedSystems;} 111 112 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ, 112 113 const ColumnVector& xx) const;
Note:
See TracChangeset
for help on using the changeset viewer.