Changeset 9395 in ntrip for trunk/BNC/src
- Timestamp:
- Mar 30, 2021, 9:59:17 AM (4 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r9386 r9395 634 634 return finish(failure); 635 635 } 636 if (_obsPool->refSatChanged()) { 636 if (_obsPool->refSatChanged() && 637 _opt->_obsModelType != t_pppOptions::UncombPPP) { 637 638 epochReProcessing = true; 638 639 continue; … … 665 666 // Epoch re-processing required? 666 667 // ----------------------------- 667 if (_obsPool->refSatChangeRequired()) {//SLIP 668 if (_obsPool->refSatChangeRequired() && //SLIP 669 _opt->_obsModelType != t_pppOptions::UncombPPP) { 668 670 epochReProcessing = true; 669 671 _obsPool->deleteLastEpoch(); … … 777 779 ////////////////////////////////////////////////////////////////////////////// 778 780 void t_pppClient::setRefSatellites(std::vector<t_pppSatObs*>& obsVector) { 779 781 t_irc refSatReDefinition = success; 780 782 // reference satellite definition per system 781 783 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { … … 789 791 } 790 792 // reference satellite is unchanged 793 // ================================ 791 794 if (!_obsPool->refSatChangeRequired(sys) && refSat->prn() == satObs->prn()) { 792 795 refSatDefined = true; … … 797 800 } 798 801 // reference satellite has changed 799 else if ( _obsPool->refSatChangeRequired(sys) && 800 refSat->prn() != satObs->prn() && 801 !_historicalRefSats[sys].contains(satObs->prn())) { 802 // =============================== 803 else if ( _obsPool->refSatChangeRequired(sys) && refSat->prn() != satObs->prn()) { 802 804 if (satObs->prn().system() == sys) { 803 refSatDefined = true; 804 obsVector[ii]->setAsReference(); 805 refSat->setPrn(satObs->prn()); 805 if (!_historicalRefSats[sys].contains(satObs->prn())) { 806 refSatDefined = true; 807 obsVector[ii]->setAsReference(); 808 refSat->setPrn(satObs->prn()); 806 809 #ifdef BNC_DEBUG_PPP 807 810 LOG << "=> set refsatprn: " << satObs->prn().toString() << endl; 808 811 #endif 812 } 813 else if ( _historicalRefSats[sys].contains(satObs->prn())) { 814 refSatReDefinition = failure; 815 } 809 816 } 810 817 } … … 816 823 } 817 824 } 825 826 if ((!refSatDefined) && (refSatReDefinition == failure)) { 827 refSat->setPrn(t_prn(sys, 99)); 828 continue; 829 } 830 818 831 // reference satellite has to be initialized 832 // ========================================= 819 833 if (!refSatDefined) { 820 834 for (unsigned ii = 0; ii < obsVector.size(); ii++) { … … 823 837 continue; 824 838 } 825 if (satObs->prn().system() == sys && 826 !_historicalRefSats[sys].contains(satObs->prn())) { 839 if (satObs->prn().system() == sys) { 827 840 obsVector[ii]->setAsReference(); 828 841 refSat->setPrn(satObs->prn()); … … 838 851 } 839 852 } 840 if (!refSatDefined) { 853 854 if (!refSatDefined) { // no observations for that system 841 855 refSat->setPrn(t_prn()); 842 856 } … … 858 872 char sys = it.key(); 859 873 t_prn prn = it.value()->prn(); 860 if (prn.number() == 0) { 874 if (prn.number() == 0) { // no obs for that system available 875 continue; 876 } 877 else if (prn.number() == 99) { // refSat re-definition not possible 861 878 return failure; 862 879 } … … 885 902 _historicalRefSats[sys].append(prn); 886 903 } 887 } 888 } 904 }} 889 905 890 906 // -
trunk/BNC/src/PPP/pppFilter.cpp
r9386 r9395 138 138 } 139 139 } 140 if (!obsVector.size()) {continue;} 140 141 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, 141 142 epoch->pseudoObsIono(), preProcessing) != success) { … … 174 175 } 175 176 } 177 if (!num) {continue;} 176 178 LOG << epoTimeStr << " SATNUM " << system << ' ' << right << setw(2) << num << endl; 177 179 if (processSystem(OPT->LCs(system), obsVector, _refPrn, … … 266 268 if (tLC == t_lc::GIM) {continue;} 267 269 if (tLC == t_lc::Tz0) {continue;} 270 ++iObs; 271 usedObs.push_back(obs); 272 usedTypes.push_back(tLC); 273 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 274 const t_pppParam* par = params[iPar]; 275 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn); 276 } 277 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs+1)); 278 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC)); 279 } 280 } 281 } 282 283 // pseudo Obs Tropo 284 // ================ 285 if (OPT->_pseudoObsTropo) { 286 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 287 t_pppSatObs* obs = obsVector[ii]; 288 if (!obs->isReference()) {continue;} 289 for (unsigned jj = 0; jj < usedLCs; jj++) { 290 const t_lc::type tLC = LCs[jj]; 291 if (tLC != t_lc::Tz0) {continue;} 268 292 ++iObs; 269 293 usedObs.push_back(obs); … … 309 333 } 310 334 } 311 // pseudo Obs Tropo312 // ================313 if (OPT->_pseudoObsTropo) {314 for (unsigned ii = 0; ii < obsVector.size(); ii++) {315 t_pppSatObs* obs = obsVector[ii];316 if (!obs->isReference()) {continue;}317 for (unsigned jj = 0; jj < usedLCs; jj++) {318 const t_lc::type tLC = LCs[jj];319 if (tLC != t_lc::Tz0) {continue;}320 ++iObs;321 usedObs.push_back(obs);322 usedTypes.push_back(tLC);323 for (unsigned iPar = 0; iPar < params.size(); iPar++) {324 const t_pppParam* par = params[iPar];325 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn);326 }327 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs+1));328 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));329 }330 }331 }332 335 333 336 // Check number of observations, truncate matrices … … 561 564 } 562 565 563 // Add in nfinite noise to iono566 // Add infinite noise to iono 564 567 //////////////////////////////////////////////////////////////////////////// 565 568 t_irc t_pppFilter::addNoiseToIono(char sys) { … … 745 748 } 746 749 } 750 // pseudo Obs Tropo 751 // ================ 752 if (OPT->_pseudoObsTropo) { 753 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 754 t_pppSatObs* obs = obsVector[ii]; 755 if (!obs->isReference()) {continue;} 756 for (unsigned jj = 0; jj < usedLCs; jj++) { 757 const t_lc::type tLC = LCs[jj]; 758 if (tLC != t_lc::Tz0) {continue;} 759 ++iObs; 760 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 761 const t_pppParam* par = params[iPar]; 762 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn); 763 } 764 } 765 } 766 } 747 767 _datumTrafo->updateIndices(iObs+1); 748 768 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, _parlist->nPar()), 2); … … 791 811 //////////////////////////////////////////////////////////////////////////// 792 812 void t_pppFilter::initDatumTransformation(const std::vector<t_pppSatObs*>& allObs) { 793 unsigned realObs = 0;813 unsigned trafoObs = 0; 794 814 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 795 815 char system = OPT->systems()[iSys]; … … 809 829 realUsedLCs -= 1; 810 830 } 811 realObs += satNum * realUsedLCs; 812 } 813 _datumTrafo->setObsNum(realObs); 831 trafoObs += satNum * realUsedLCs; 832 833 if (OPT->_pseudoObsTropo) { 834 trafoObs += 1; 835 } 836 837 } 838 _datumTrafo->setObsNum(trafoObs); 814 839 _datumTrafo->setParNum(_parlist->nPar()); 815 840 _datumTrafo->initAA();
Note:
See TracChangeset
for help on using the changeset viewer.