Changeset 9431 in ntrip for trunk/BNC/src/PPP/pppFilter.cpp
- Timestamp:
- May 18, 2021, 5:15:10 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.