- Timestamp:
- Mar 25, 2021, 3:17:35 PM (4 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r9288 r9386 309 309 } 310 310 if (!std::isnan(maxRes) && maxRes < BLUNDER) { 311 if (print ) {311 if (print && _numEpoProcessing == 1) { 312 312 LOG.setf(ios::fixed); 313 313 LOG << string(epoTime) << " BANCROFT:" << ' ' … … 370 370 offGR = 0.0; 371 371 } 372 373 if (fabs(maxRes) > 1000.0) { 372 if (fabs(maxRes) > OPT->_aprSigOGC) { 374 373 LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl; 375 374 delete obsVector.at(maxResIndex); … … 424 423 } 425 424 426 if (fabs(maxRes) > 1000.0) {425 if (fabs(maxRes) > OPT->_aprSigOGE) { 427 426 LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl; 428 427 delete obsVector.at(maxResIndex); … … 477 476 } 478 477 479 if (fabs(maxRes) > 1000.0) {478 if (fabs(maxRes) > OPT->_aprSigOGC) { 480 479 LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl; 481 480 delete obsVector.at(maxResIndex); … … 529 528 _output->_trpStdev = _filter->trpStdev(); 530 529 531 _output->_numSat 532 _output->_hDop 530 _output->_numSat = _filter->numSat(); 531 _output->_hDop = _filter->HDOP(); 533 532 _output->_error = false; 534 533 } … … 593 592 void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) { 594 593 595 _historicalRefSats.clear();596 594 try { 597 595 initOutput(output); 598 int num = 0;599 596 bool epochReProcessing = false; 600 597 _numEpoProcessing = 0; 601 598 do { 602 num++; 603 if (num == 1) { 604 LOG << "\nPPP of Epoch "; 605 if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover); 606 LOG << "\n---------------------------------------------------------------\n"; 607 } 608 599 _numEpoProcessing++; 600 if (_obsPool->refSatChanged()) { 601 if(_filter->datumTransformation() != success) { 602 return finish(failure); 603 } 604 else { 605 _obsPool->saveLastEpoRefSats(); 606 } 607 } 609 608 // Prepare Observations of the Rover 610 609 // --------------------------------- 611 610 if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) { 612 611 return finish(failure); 612 } 613 614 if (_numEpoProcessing == 1) { 615 LOG << "\nPPP of Epoch "; 616 if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover); 617 LOG << "\n---------------------------------------------------------------\n"; 613 618 } 614 619 … … 624 629 } 625 630 631 if (_opt->_refSatRequired) { 632 if (handleRefSatellites(_obsRover) != success) { 633 _historicalRefSats.clear(); 634 return finish(failure); 635 } 636 if (_obsPool->refSatChanged()) { 637 epochReProcessing = true; 638 continue; 639 } 640 } 641 626 642 _offGR = cmpOffGR(_obsRover); 627 643 _offGE = cmpOffGE(_obsRover); 628 644 _offGC = cmpOffGC(_obsRover); 629 645 630 if (_opt->_refSatRequired) {631 setRefSatellites(_obsRover);632 LOG.setf(ios::fixed);633 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap());634 while (it.hasNext()) {635 it.next();636 char sys = it.key();637 string prn = it.value()->prn().toString();638 if (num == 1) {639 LOG << "set ";640 }641 else {642 LOG << "reset ";643 }644 LOG << string(_epoTimeRover) << " REFSAT " << sys << ": " << prn << endl;645 }646 }647 648 649 646 // Prepare Pseudo Observations of the Rover 650 647 // ---------------------------------------- … … 656 653 } 657 654 658 659 655 // Store last epoch of data 660 656 // ------------------------ 661 657 _obsPool->putEpoch(_epoTimeRover, _obsRover, _pseudoObsIono); 662 _obsPool->setHistoricalRefSatList(_historicalRefSats);663 658 664 659 // Process Epoch in Filter 665 660 // ----------------------- 666 if (_filter->processEpoch( num) != success) {661 if (_filter->processEpoch() != success) { 667 662 return finish(failure); 668 663 } … … 670 665 // Epoch re-processing required? 671 666 // ----------------------------- 672 if (_obsPool->refSatChangeRequired()) { 667 if (_obsPool->refSatChangeRequired()) {//SLIP 673 668 epochReProcessing = true; 674 669 _obsPool->deleteLastEpoch(); 675 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap()); 676 while (it.hasNext()) { 677 it.next(); 678 _historicalRefSats.append(it.value()->prn()); 679 } 670 setHistoricalRefSats(); 680 671 } 681 672 else { 682 673 epochReProcessing = false; 683 674 _historicalRefSats.clear(); 684 675 } 685 676 } while (epochReProcessing); … … 789 780 // reference satellite definition per system 790 781 for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) { 791 char sys tem= _opt->systems()[iSys];782 char sys = _opt->systems()[iSys]; 792 783 bool refSatDefined = false; 793 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(sys tem);784 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(sys); 794 785 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 795 786 t_pppSatObs* satObs = obsVector.at(ii); 796 if (satObs->eleSat() < _opt->_minEle) {continue;} 787 if (satObs->eleSat() < _opt->_minEle) { 788 continue; 789 } 797 790 // reference satellite is unchanged 798 if (!_obsPool->refSatChangeRequired( ) &&refSat->prn() == satObs->prn()) {791 if (!_obsPool->refSatChangeRequired(sys) && refSat->prn() == satObs->prn()) { 799 792 refSatDefined = true; 800 793 obsVector[ii]->setAsReference(); 794 #ifdef BNC_DEBUG_PPP 795 LOG << "=> unchanged refsatprn: " << satObs->prn().toString() << endl; 796 #endif 801 797 } 802 798 // reference satellite has changed 803 else if ( _obsPool->refSatChangeRequired() && refSat->prn() != satObs->prn() && !_historicalRefSats.contains(satObs->prn())) { 804 if (satObs->prn().system() == system) { 799 else if ( _obsPool->refSatChangeRequired(sys) && 800 refSat->prn() != satObs->prn() && 801 !_historicalRefSats[sys].contains(satObs->prn())) { 802 if (satObs->prn().system() == sys) { 805 803 refSatDefined = true; 806 804 obsVector[ii]->setAsReference(); 807 805 refSat->setPrn(satObs->prn()); 806 #ifdef BNC_DEBUG_PPP 807 LOG << "=> set refsatprn: " << satObs->prn().toString() << endl; 808 #endif 808 809 } 809 810 } … … 822 823 continue; 823 824 } 824 if (satObs->prn().system() == system) { 825 if (satObs->prn().system() == sys && 826 !_historicalRefSats[sys].contains(satObs->prn())) { 825 827 obsVector[ii]->setAsReference(); 826 828 refSat->setPrn(satObs->prn()); 829 #ifdef BNC_DEBUG_PPP 830 LOG << " => set refsatprn: " << satObs->prn().toString() << endl; 831 #endif 827 832 if (OPT->_pseudoObsIono) { 828 833 refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1)); … … 833 838 } 834 839 } 835 } 836 _obsPool->setRefSatChangeRequired(false); 837 840 if (!refSatDefined) { 841 refSat->setPrn(t_prn()); 842 } 843 _obsPool->setRefSatChangeRequired(sys, false); 844 } 845 } 846 847 // 848 ////////////////////////////////////////////////////////////////////////////// 849 t_irc t_pppClient::handleRefSatellites(std::vector<t_pppSatObs*>& obsVector) { 850 851 // set refSats in current epoch 852 // ============================ 853 setRefSatellites(obsVector); // current epoch 854 LOG.setf(ios::fixed); 855 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap()); 856 while (it.hasNext()) { 857 it.next(); 858 char sys = it.key(); 859 t_prn prn = it.value()->prn(); 860 if (prn.number() == 0) { 861 return failure; 862 } 863 QString str; 864 if (prn == _obsPool->getRefSatMapElementLastEpoch(sys) || 865 _obsPool->getRefSatMapElementLastEpoch(sys) == t_prn() ) { 866 _obsPool->setRefSatChanged(sys, false); 867 str = " SET "; 868 } 869 else { 870 _obsPool->setRefSatChanged(sys, true); 871 str = " RESET "; 872 } 873 LOG << string(_epoTimeRover) << str.toStdString() << " REFSAT " << sys << ": " << prn.toString() << endl; 874 } 875 return success; 876 } 877 878 void t_pppClient::setHistoricalRefSats() { 879 QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap()); 880 while (it.hasNext()) { 881 it.next(); 882 t_prn prn = it.value()->prn(); 883 char sys = prn.system(); 884 if (_obsPool->refSatChangeRequired(sys)){ 885 _historicalRefSats[sys].append(prn); 886 } 887 } 838 888 } 839 889 -
trunk/BNC/src/PPP/pppClient.h
r9288 r9386 64 64 double cmpOffGE(std::vector<t_pppSatObs*>& obsVector); 65 65 double cmpOffGC(std::vector<t_pppSatObs*>& obsVector); 66 t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector); 66 67 void setRefSatellites(std::vector<t_pppSatObs*>& obsVector); 68 void setHistoricalRefSats(); 67 69 68 70 t_output* _output; … … 81 83 t_tides* _tides; 82 84 bool _pseudoObsIono; 83 QList<t_prn> _historicalRefSats; 85 int _numEpoProcessing; 86 QMap<char, QList<t_prn>> _historicalRefSats; 84 87 }; 85 88 -
trunk/BNC/src/PPP/pppFilter.cpp
r9088 r9386 27 27 #include "pppObsPool.h" 28 28 #include "pppStation.h" 29 #include "pppClient.h"30 29 31 30 using namespace BNC_PPP; … … 51 50 // Process Single Epoch 52 51 //////////////////////////////////////////////////////////////////////////// 53 t_irc t_pppFilter::processEpoch( int num) {52 t_irc t_pppFilter::processEpoch() { 54 53 _numSat = 0; 55 _numEpoProcessing = num;56 54 const double maxSolGap = 60.0; 57 55 … … 85 83 _parlist->set(_epoTime, allObs, _obsPool->getRefSatMap()); 86 84 const vector<t_pppParam*>& params = _parlist->params(); 87 85 #ifdef BNC_DEBUG_PPP 86 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 87 LOG << params[iPar]->toString() << endl; 88 } 89 #endif 88 90 // Status Vector, Variance-Covariance Matrix 89 91 // ----------------------------------------- … … 94 96 _xFlt.ReSize(_parlist->nPar()); _xFlt = 0.0; 95 97 _x0.ReSize(_parlist->nPar()); _x0 = 0.0; 98 96 99 for (unsigned ii = 0; ii < params.size(); ii++) { 97 const t_pppParam* par1 = params[ii]; 100 t_pppParam* par1 = params[ii]; 101 if (QFltOld.size() == 0) { 102 par1->resetIndex(); 103 } 98 104 _x0[ii] = par1->x0(); 99 105 int iOld = par1->indexOld(); … … 105 111 _xFlt[ii] = xFltOld[iOld]; 106 112 for (unsigned jj = 0; jj < ii; jj++) { 107 constt_pppParam* par2 = params[jj];108 int 113 t_pppParam* par2 = params[jj]; 114 int jOld = par2->indexOld(); 109 115 if (jOld >= 0) { 110 116 _QFlt[ii][jj] = QFltOld(iOld+1,jOld+1); … … 114 120 } 115 121 predictCovCrdPart(QFltOld); 116 117 // Init Datum Trafo118 // ----------------------------------------119 if ((OPT->_obsModelType == OPT->DCMcodeBias ||120 OPT->_obsModelType == OPT->DCMphaseBias) &&(_numEpoProcessing == 1)) {121 _numAllUsedLCs = 0;122 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {123 char system = OPT->systems()[iSys];124 _numAllUsedLCs += OPT->LCs(system).size();125 if (OPT->_pseudoObsIono && epoch->pseudoObsIono() == false) {126 _numAllUsedLCs -= 1; // GIM not used127 if (OPT->_pseudoObsTropo) { // if no VTEC values /pseudo obs iono then no pseudo obs tropo128 _numAllUsedLCs -= 1;129 }130 }131 int modifyLCs = 0;132 if (OPT->_pseudoObsTropo &&133 OPT->_pseudoObsIono && epoch->pseudoObsIono() == true) {134 modifyLCs = -1;135 }136 // max Obs137 int maxObs = allObs.size() * (_numAllUsedLCs + modifyLCs);138 if (OPT->_pseudoObsIono && epoch->pseudoObsIono() == true) {139 maxObs -= 1; // pseudo obs iono with respect to refSat140 }141 if (OPT->_pseudoObsIono && epoch->pseudoObsIono() == true &&142 OPT->_pseudoObsTropo) {143 maxObs += 1; // pseudo obs tropo once per station144 }145 _datumTrafo->initAA(maxObs, _parlist->nPar());146 }147 }148 122 149 123 // Pre-Process Satellite Systems separately … … 154 128 preProcessing = true; 155 129 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 156 (iSys) ? _datumTrafo->setFirstSystem(false) : _datumTrafo->setFirstSystem(true); 157 char system = OPT->systems()[iSys]; 130 char sys = OPT->systems()[iSys]; 158 131 if (OPT->_refSatRequired) { 159 _refPrn = (_obsPool->getRefSatMapElement(system))->prn(); 160 if (_obsPool->hasHistoricalRefSat(_refPrn)) { 161 LOG << epoTimeStr << " Warning: prevent to process erroneous refSat again!"; 162 return failure; 163 } 164 } 165 vector<t_pppSatObs*> obsVector; 132 _refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 133 } 134 vector<t_pppSatObs*> obsVector; 166 135 for (unsigned jj = 0; jj < allObs.size(); jj++) { 167 if (allObs[jj]->prn().system() == sys tem) {136 if (allObs[jj]->prn().system() == sys) { 168 137 obsVector.push_back(allObs[jj]); 169 138 } 170 139 } 171 if (processSystem(OPT->LCs(sys tem), obsVector, _refPrn,140 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, 172 141 epoch->pseudoObsIono(), preProcessing) != success) { 142 _xFlt = xFltOld; 143 _QFlt = QFltOld; 173 144 return failure; 174 145 } … … 181 152 return success; 182 153 } 183 else if (!_obsPool->refSatChangeRequired() && 184 _numEpoProcessing > 1) { 185 datumTransformation(xFltOld, QFltOld); 154 else if (!_obsPool->refSatChangeRequired()) { 155 initDatumTransformation(allObs); 186 156 } 187 157 } … … 191 161 preProcessing = false; 192 162 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 163 (iSys) ? _datumTrafo->setFirstSystem(false) : _datumTrafo->setFirstSystem(true); 193 164 char system = OPT->systems()[iSys]; 194 165 if (OPT->_refSatRequired) { … … 215 186 _parlist->printResult(_epoTime, _QFlt, _xFlt); 216 187 _lastEpoTimeOK = _epoTime; // remember time of last successful epoch processing 217 188 if (OPT->_refSatRequired) { 189 _obsPool->saveLastEpoRefSats(); 190 } 218 191 return success; 219 192 } … … 227 200 bool preProcessing) { 228 201 LOG.setf(ios::fixed); 202 char sys = refPrn.system(); 229 203 230 204 // Detect Cycle Slips … … 233 207 return failure; 234 208 } 235 236 unsigned usedLCs = LCs.size(); 209 if (preProcessing && _obsPool->refSatChangeRequired(sys)) { // from detectCycleSlips() 210 #ifdef BNC_DEBUG_PPP 211 LOG << "_obsPool->refSatChangeRequired(" << sys << ") from detectCycleSlips()" << endl; 212 #endif 213 return success; 214 } 237 215 238 216 ColumnVector xSav = _xFlt; … … 241 219 const vector<t_pppParam*>& params = _parlist->params(); 242 220 221 unsigned usedLCs = LCs.size(); 222 unsigned realUsedLCs = usedLCs; 243 223 if (OPT->_pseudoObsIono && !pseudoObsIonoAvailable) { 244 usedLCs -= 1; // GIM not used 245 if (OPT->_pseudoObsTropo) { // if no VTEC values /pseudo obs iono then no pseudo obs tropo 246 usedLCs -= 1; 247 } 248 } 249 250 int modifyLCs = 0; 251 if (OPT->_pseudoObsTropo && 252 OPT->_pseudoObsIono && pseudoObsIonoAvailable) { 253 modifyLCs = -1; 224 usedLCs -= 1; // GIM not used 225 } 226 int hlpLCs = 0; 227 if (OPT->_pseudoObsTropo) { 228 hlpLCs = -1; 229 realUsedLCs -= 1; 254 230 } 255 231 // max Obs 256 unsigned maxObs = obsVector.size() * (usedLCs + modifyLCs); 232 unsigned maxObs = obsVector.size() * (usedLCs + hlpLCs); 233 if (OPT->_pseudoObsTropo) { 234 maxObs += 1; 235 } 257 236 if (OPT->_pseudoObsIono && pseudoObsIonoAvailable) { 258 237 maxObs -= 1; // pseudo obs iono with respect to refSat 259 }260 if (OPT->_pseudoObsIono && pseudoObsIonoAvailable &&261 OPT->_pseudoObsTropo) {262 maxObs += 1; // pseudo obs tropo once per station263 238 } 264 239 … … 281 256 vector<t_pppSatObs*> usedObs; 282 257 vector<t_lc::type> usedTypes; 258 259 // Real Observations 260 // ================= 283 261 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 284 262 t_pppSatObs* obs = obsVector[ii]; 285 unsigned hlp = ii+1;286 263 if (!obs->outlier()) { 287 264 for (unsigned jj = 0; jj < usedLCs; jj++) { 288 265 const t_lc::type tLC = LCs[jj]; 289 if (tLC == t_lc::GIM && obs->isReference()) {continue;}290 if (tLC == t_lc::Tz0 && hlp != obsVector.size()) {continue;}266 if (tLC == t_lc::GIM) {continue;} 267 if (tLC == t_lc::Tz0) {continue;} 291 268 ++iObs; 292 269 usedObs.push_back(obs); … … 302 279 } 303 280 304 if ((preProcessing && ! iOutlier) && 305 (OPT->_obsModelType == OPT->DCMcodeBias || OPT->_obsModelType == OPT->DCMphaseBias)) { 306 _datumTrafo->updateIndices(maxObs); 307 _datumTrafo->prepareAA(AA, _numEpoProcessing, _parlist->nPar()); 308 if (_obsPool->refSatChangeRequired()) { // from detectCycleSlips() 309 return success; 281 if ((!iOutlier) && 282 (OPT->_obsModelType == OPT->DCMcodeBias || 283 OPT->_obsModelType == OPT->DCMphaseBias ) && (!preProcessing)) { 284 _datumTrafo->updateIndices(iObs+1); 285 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, _parlist->nPar()), 1); 286 } 287 288 // Pseudo Obs Iono 289 // ================ 290 if (OPT->_pseudoObsIono && pseudoObsIonoAvailable) { 291 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 292 t_pppSatObs* obs = obsVector[ii]; 293 if (!obs->outlier()) { 294 for (unsigned jj = 0; jj < usedLCs; jj++) { 295 const t_lc::type tLC = LCs[jj]; 296 if (tLC == t_lc::GIM && !obs->isReference()) { 297 ++iObs; 298 } else {continue;} 299 usedObs.push_back(obs); 300 usedTypes.push_back(tLC); 301 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 302 const t_pppParam* par = params[iPar]; 303 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn); 304 } 305 ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs+1)); 306 PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC)); 307 } 308 } 309 } 310 } 311 // pseudo Obs Tropo 312 // ================ 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 } 310 330 } 311 331 } … … 347 367 t_pppSatObs* obs = usedObs[maxOutlierIndex]; 348 368 t_pppParam* par = 0; 349 if (!preProcessing) { 350 LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' ' 351 << obs->prn().toString() << ' ' 352 << setw(8) << setprecision(4) << maxOutlier << endl; 353 } 369 #ifdef BNC_DEBUG_PPP 370 LOG << epoTimeStr << " Outlier (" 371 << ((preProcessing) ? "pre-processing) " : "fin-processing) ") << t_lc::toString(maxOutlierLC) << ' ' 372 << obs->prn().toString() << ' ' 373 << setw(8) << setprecision(4) << maxOutlier << endl; 374 #endif 354 375 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 355 376 t_pppParam* hlp = params[iPar]; … … 361 382 } 362 383 if (preProcessing) { 363 if (par && obs->prn() == refPrn) { 364 _obsPool->setRefSatChangeRequired(true); 365 break; 366 } 367 else if (par && obs->prn() != refPrn) { 368 par->setAmbResetCandidate(); 369 } 370 } 371 else { 384 // for refSats no ambiguity parameter exists 385 if ((obs->prn() == refPrn) && 386 (t_lc::toString(maxOutlierLC) == "l1" || 387 t_lc::toString(maxOutlierLC) == "l2") ) { 388 _obsPool->setRefSatChangeRequired(sys, true); 389 } 390 else { 391 if (par) { 392 par->setAmbResetCandidate(); 393 obs->setOutlier(); 394 } 395 else { 396 obs->setOutlier(); 397 } 398 } 399 } 400 else {// fin-processing 372 401 if (par) { 373 if (par->ambResetCandidate() || _obsPool->hasHistoricalRefSat(par->prn())) {402 if (par->ambResetCandidate()) { 374 403 resetAmb(par->prn(), obsVector, &QSav, &xSav); 375 404 } … … 391 420 for (unsigned ii = 0; ii < usedObs.size(); ii++) { 392 421 const t_lc::type tLC = usedTypes[ii]; 393 t_pppSatObs* 422 t_pppSatObs* obs = usedObs[ii]; 394 423 if (tLC == LCs[jj]) { 395 424 obs->setRes(tLC, vv[ii]); 396 425 LOG << epoTimeStr << " RES " 397 << left << setw(3) << t_lc::toString(tLC) << right << ' ' 398 << obs->prn().toString().substr(0,3) << ' ' 399 << setw(8) << setprecision(4) << vv[ii] << endl; 426 << left << setw(3) << t_lc::toString(tLC) << right << ' '; 427 if (t_lc::toString(tLC) == "Tz0") {LOG << sys << " ";} 428 else {LOG << obs->prn().toString();} 429 LOG << setw(8) << setprecision(4) << vv[ii] << endl; 400 430 } 401 431 } … … 405 435 } 406 436 } 407 408 437 return success; 409 438 } … … 415 444 const t_prn& refPrn, 416 445 bool preProcessing) { 417 if (_obsPool->hasHistoricalRefSat(refPrn)) { 418 return success; 419 } 420 421 //double SLIP = 20.0; // slip threshold 422 double SLIP = 200.0; // slip threshold deactivated 423 string epoTimeStr = string(_epoTime); 446 447 const double SLIP = 20.0; 448 char sys = refPrn.system(); 449 string epoTimeStr = string(_epoTime); 424 450 const vector<t_pppParam*>& params = _parlist->params(); 425 451 … … 430 456 const t_pppSatObs* obs = obsVector[iObs]; 431 457 432 if (preProcessing && obs->prn() != refPrn) {continue;}433 434 458 // Check set Slips and Jump Counters 435 459 // --------------------------------- 436 460 bool slip = false; 461 462 // in pre-processing only the reference satellite has to be checked 463 if (preProcessing && obs->prn() != refPrn) { 464 continue; 465 } 466 437 467 if (obs->slip()) { 438 468 LOG << epoTimeStr << "cycle slip set (obs) " << obs->prn().toString() << endl; … … 460 490 if (slip) { 461 491 if (preProcessing) { 462 _obsPool->setRefSatChangeRequired( true);492 _obsPool->setRefSatChangeRequired(sys, true); 463 493 } 464 494 else { … … 474 504 AA[iPar] = par->partial(_epoTime, obs, tLC, refPrn); 475 505 } 476 477 506 double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA); 478 507 double vv = DotProduct(AA, _xFlt) - ll; 479 480 508 if (fabs(vv) > SLIP) { 509 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 510 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 481 511 if (preProcessing) { 482 _obsPool->setRefSatChangeRequired( true);512 _obsPool->setRefSatChangeRequired(sys, true); 483 513 } 484 514 else { 485 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' '486 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;487 515 resetAmb(obs->prn(), obsVector); 488 516 } … … 533 561 } 534 562 563 // Add innfinite noise to iono 564 //////////////////////////////////////////////////////////////////////////// 565 t_irc t_pppFilter::addNoiseToIono(char sys) { 566 567 t_irc irc = failure; 568 vector<t_pppParam*>& params = _parlist->params(); 569 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 570 t_pppParam* par = params[iPar]; 571 if (par->type() == t_pppParam::ion && par->prn().system() == sys) { 572 int ind = par->indexNew(); 573 LOG << string(_epoTime) << " ADD IONO_NOISE TO " << par->prn().toString() << endl; 574 par->setIndex(ind); 575 _QFlt(ind+1,ind+1) += par->sigma0() * par->sigma0(); 576 irc = success; 577 } 578 } 579 580 return irc; 581 } 582 535 583 // Compute various DOP Values 536 584 //////////////////////////////////////////////////////////////////////////// … … 617 665 // Compute datum transformation 618 666 //////////////////////////////////////////////////////////////////////////// 619 void t_pppFilter::datumTransformation(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld) { 667 t_irc t_pppFilter::datumTransformation() { 668 t_pppObsPool::t_epoch* epoch = _obsPool->lastEpoch(); 669 if (!epoch) {LOG << "!epoch" << endl; 670 return failure; 671 } 672 else { 673 LOG.setf(ios::fixed); 674 LOG << string(epoch->epoTime()) << " DATUM TRANSFORMATION " << endl; 675 } 676 vector<t_pppSatObs*>& allObs = epoch->obsVector(); 677 678 // reset old and set new refSats in last epoch (ambiguities) 679 // ======================================================== 680 if (resetRefSatellitesLastEpoch(allObs) != true) { 681 return failure; 682 } 683 684 // set AA2 685 // ======= 686 _parlist->set(epoch->epoTime(), allObs, _obsPool->getRefSatMap()); 687 const vector<t_pppParam*>& params = _parlist->params(); 688 #ifdef BNC_DEBUG_PPP 689 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 690 LOG << params[iPar]->toString() << "\t\t" << endl; 691 } 692 #endif 693 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 694 (iSys) ? _datumTrafo->setFirstSystem(false) : _datumTrafo->setFirstSystem(true); 695 char sys = OPT->systems()[iSys]; 696 t_prn refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 697 #ifdef BNC_DEBUG_PPP 698 LOG << "refPrn: " << refPrn.toString() << endl; 699 #endif 700 vector<t_pppSatObs*> obsVector; 701 for (unsigned jj = 0; jj < allObs.size(); jj++) { 702 if (allObs[jj]->prn().system() == sys) { 703 obsVector.push_back(allObs[jj]); 704 } 705 } 706 707 vector<t_lc::type> LCs = OPT->LCs(sys); 708 unsigned usedLCs = LCs.size(); 709 unsigned realUsedLCs = usedLCs; 710 if (OPT->_pseudoObsIono && !epoch->pseudoObsIono()) { 711 usedLCs -= 1; // GIM not used 712 } 713 int hlpLCs = 0; 714 if (OPT->_pseudoObsTropo) { 715 hlpLCs = -1; 716 realUsedLCs -= 1; 717 } 718 // max Obs 719 unsigned maxObs = obsVector.size() * (usedLCs + hlpLCs); 720 if (OPT->_pseudoObsTropo) { 721 maxObs += 1; 722 } 723 if (OPT->_pseudoObsIono && epoch->pseudoObsIono()) { 724 maxObs -= 1; // pseudo obs iono with respect to refSat 725 } 726 727 Matrix AA(maxObs, _parlist->nPar()); 728 729 // Real Observations 730 // ----------------- 731 int iObs = -1; 732 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 733 t_pppSatObs* obs = obsVector[ii]; 734 if (!obs->outlier()) { 735 for (unsigned jj = 0; jj < usedLCs; jj++) { 736 const t_lc::type tLC = LCs[jj]; 737 if (tLC == t_lc::GIM) {continue;} 738 if (tLC == t_lc::Tz0) {continue;} 739 ++iObs; 740 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 741 const t_pppParam* par = params[iPar]; 742 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn); 743 } 744 } 745 } 746 } 747 _datumTrafo->updateIndices(iObs+1); 748 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, _parlist->nPar()), 2); 749 } 750 751 // Datum Transformation 752 // ==================== 753 #ifdef BNC_DEBUG_PPP 754 LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->obsNum(), _datumTrafo->parNum()); 755 LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->obsNum(), _datumTrafo->parNum()); 756 #endif 620 757 Matrix D21 = _datumTrafo->computeTrafoMatrix(); 758 #ifdef BNC_DEBUG_PPP 759 LOG << "D21" << endl; _datumTrafo->printMatrix(D21, _datumTrafo->parNum(), _datumTrafo->parNum()); 760 #endif 761 ColumnVector xFltOld = _xFlt; 762 SymmetricMatrix QFltOld = _QFlt; 763 621 764 _QFlt << D21 * QFltOld * D21.t(); 622 _xFlt = D21 * xFltOld; 623 } 624 625 626 // Reset Ambiguity Parameter (cycle slip) 627 //////////////////////////////////////////////////////////////////////////// 628 t_irc t_pppFilter::addInfiniteNoise(t_pppParam::e_type para) { 629 t_irc irc = failure; 630 vector<t_pppParam*>& params = _parlist->params(); 631 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 632 t_pppParam* par = params[iPar]; 633 if (par->type() == para) { 634 int ind = par->indexNew(); 635 if (ind < 0) { 636 return irc; 637 } 638 _QFlt(ind+1,ind+1) += par->sigma0() * par->sigma0(); 639 irc = success; 640 } 641 } 642 return irc; 643 } 765 _xFlt = D21 * xFltOld; 766 767 #ifdef BNC_DEBUG_PPP 768 LOG << "xFltOld:\n" << xFltOld << endl; 769 LOG << "xFlt :\n" << _xFlt << endl; 770 #endif 771 772 // Reset Ambiguities after Datum Transformation 773 // ============================================ 774 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 775 char sys = OPT->systems()[iSys]; 776 t_irc irc = resetAmb(_obsPool->getRefSatMapElementLastEpoch(sys), allObs); 777 if (OPT->_obsModelType == OPT->DCMcodeBias) { 778 if (irc == success) { 779 addNoiseToIono(sys);} 780 } 781 } 782 783 // switch AA2 to AA1 784 // ================= 785 _datumTrafo->switchAA(); 786 787 return success; 788 } 789 790 // Init datum transformation 791 //////////////////////////////////////////////////////////////////////////// 792 void t_pppFilter::initDatumTransformation(const std::vector<t_pppSatObs*>& allObs) { 793 unsigned realObs = 0; 794 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 795 char system = OPT->systems()[iSys]; 796 int satNum = 0; 797 for (unsigned jj = 0; jj < allObs.size(); jj++) { 798 if (allObs[jj]->prn().system() == system) { 799 satNum++; 800 } 801 } 802 // all LCs 803 unsigned realUsedLCs = OPT->LCs(system).size(); 804 // exclude pseudo obs GIM 805 if (OPT->_pseudoObsIono) { 806 realUsedLCs -= 1; 807 } 808 if (OPT->_pseudoObsTropo) { 809 realUsedLCs -= 1; 810 } 811 realObs += satNum * realUsedLCs; 812 } 813 _datumTrafo->setObsNum(realObs); 814 _datumTrafo->setParNum(_parlist->nPar()); 815 _datumTrafo->initAA(); 816 } 817 818 // 819 ////////////////////////////////////////////////////////////////////////////// 820 bool t_pppFilter::resetRefSatellitesLastEpoch(std::vector<t_pppSatObs*>& obsVector) { 821 822 bool resetRefSat = false; 823 // reference satellite definition per system 824 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 825 char sys = OPT->systems()[iSys]; 826 t_pppRefSat* refSat = _obsPool->getRefSatMapElement(sys); 827 t_prn newPrn = refSat->prn(); 828 t_prn oldPrn = _obsPool->getRefSatMapElementLastEpoch(sys); 829 #ifdef BNC_DEBUG_PPP 830 LOG << "oldPrn: " << oldPrn.toString() << " => newPrn: " << newPrn.toString() << endl; 831 #endif 832 vector<t_pppSatObs*>::iterator it = obsVector.begin(); 833 while (it != obsVector.end()) { 834 t_pppSatObs* satObs = *it; 835 if (satObs->prn() == newPrn) { 836 resetRefSat = true; 837 satObs->setAsReference(); 838 } 839 else if (satObs->prn() == oldPrn) { 840 satObs->resetReference(); 841 } 842 it++; 843 } 844 } 845 return resetRefSat; 846 } -
trunk/BNC/src/PPP/pppFilter.h
r9304 r9386 8 8 #include "bnctime.h" 9 9 #include "t_prn.h" 10 #include "pppClient.h" 10 11 11 12 namespace BNC_PPP { … … 20 21 ~t_pppFilter(); 21 22 22 t_irc processEpoch( int num);23 t_irc processEpoch(); 23 24 24 void datumTransformation(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld); 25 t_irc datumTransformation(); 26 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs); 25 27 26 28 const ColumnVector& x() const {return _xFlt;} … … 81 83 void setFirstSystem(bool firstSys) {_firstSys = firstSys;} 82 84 bool firstSystem() {return _firstSys;} 83 void updateIndices(int maxObs ) {85 void updateIndices(int maxObsSys) { 84 86 if (firstSystem()) { 85 87 initIndices(); … … 88 90 _firstRow = _lastRow + 1; 89 91 } 90 _lastRow += maxObs; 92 _lastRow += maxObsSys; 93 91 94 }; 92 void initAA(int maxObs, int numPar) { 93 _AA1.ReSize(maxObs, numPar); _AA1 = 0.0; 94 _AA2.ReSize(maxObs, numPar); _AA2 = 0.0; 95 void setObsNum(int maxObs) {_maxObs = maxObs;} 96 void setParNum(int numPar) {_numPar = numPar;} 97 int obsNum() {return _maxObs;} 98 int parNum() {return _numPar;} 99 const Matrix& AA1() {return _AA1;} 100 const Matrix& AA2() {return _AA2;} 101 102 void initAA() { 103 _AA1.ReSize(_maxObs, _numPar); _AA1 = 0.0; 104 _AA2.ReSize(_maxObs, _numPar); _AA2 = 0.0; 95 105 } 96 void prepareAA(const Matrix& AA, int numEpoProcessing, int nPar) { 106 107 void prepareAA(const Matrix& AA, int ind) { 97 108 Matrix* Prep = &_AA2; 98 if ( numEpoProcessing== 1) {109 if (ind == 1) { 99 110 Prep = &_AA1; 100 111 } 101 Prep->SubMatrix(_firstRow, _lastRow, 1, nPar) << AA; 112 Prep->SubMatrix(_firstRow, _lastRow, 1, _numPar) << AA; 113 } 114 void switchAA() { 115 _AA1 = _AA2; 116 } 117 Matrix& getAA(int ind) { 118 if (ind == 1) { 119 return _AA1; 120 } 121 return _AA2; 122 } 123 Matrix computeTrafoMatrix() { 124 Matrix D21 = ((_AA2.t() * _AA2).i()) * _AA2.t() * _AA1; 125 return D21; 126 } 127 void printMatrix(const Matrix& X, int nRow, int nCol) { 128 for (int rr = 0; rr < nRow; rr++) { 129 for (int cc = 0; cc < nCol; cc++) { 130 LOG << setw(6) << setprecision(3) << X[rr][cc] << " ;"; 131 } 132 LOG << endl; 133 } 134 LOG << endl; 102 135 } 103 136 104 Matrix computeTrafoMatrix() { 105 Matrix D21 = (_AA2.t() * _AA2).i() * _AA2.t() * _AA1; 106 return D21; 107 } 108 109 static void printMatrix(const Matrix& X, int nRow, int nCol) { 110 for (int rr = 0; rr < nRow; rr++) { 111 for (int cc = 0; cc < nCol; cc++) { 112 cout << setw(7) << setprecision(4) << X[rr][cc] << " "; 113 } 114 cout << endl; } 115 cout << endl; 116 } 117 int _firstRow; 118 int _lastRow; 119 Matrix _AA1; 120 Matrix _AA2; 121 bool _firstSys; 137 int _firstRow; 138 int _lastRow; 139 Matrix _AA1; 140 Matrix _AA2; 141 bool _firstSys; 142 int _maxObs; 143 int _numPar; 144 QMap<char, t_prn> _refSatMapPseudoObs; 122 145 }; 123 146 … … 140 163 void predictCovCrdPart(const SymmetricMatrix& QFltOld); 141 164 142 t_irc addInfiniteNoise(t_pppParam::e_type para); 165 t_irc addNoiseToIono(char sys); 166 167 bool resetRefSatellitesLastEpoch(std::vector<t_pppSatObs*>& obsVector); 143 168 144 169 bncTime _epoTime; … … 151 176 t_slip _slips[t_prn::MAXPRN+1]; 152 177 int _numSat; 153 int _numEpoProcessing;154 int _numAllUsedLCs;155 178 t_dop _dop; 156 179 bncTime _firstEpoTime; -
trunk/BNC/src/PPP/pppObsPool.cpp
r8956 r9386 50 50 } 51 51 _vTec = 0; 52 _refSatChangeRequired = false; 52 _refSatChangeRequiredMap['G'] = false; 53 _refSatChangeRequiredMap['R'] = false; 54 _refSatChangeRequiredMap['E'] = false; 55 _refSatChangeRequiredMap['C'] = false; 56 53 57 } 54 58 -
trunk/BNC/src/PPP/pppObsPool.h
r8956 r9386 5 5 #include <deque> 6 6 #include <QMap> 7 #include <iostream> 7 8 #include "pppSatObs.h" 8 9 #include "bnctime.h" … … 57 58 } 58 59 59 void initRefSatMapElement(char system) {60 _refSatMap[system] = new t_pppRefSat();61 }60 // RefSatMap of the current epoch 61 // ============================== 62 void initRefSatMapElement(char system) {_refSatMap[system] = new t_pppRefSat();} 62 63 void clearRefSatMap() { 63 64 QMapIterator<char, t_pppRefSat*> it(_refSatMap); … … 68 69 _refSatMap.clear(); 69 70 } 70 t_pppRefSat* getRefSatMapElement(char system) { 71 return _refSatMap[system]; 71 QMap<char, t_pppRefSat*> getRefSatMap() {return _refSatMap;} 72 t_pppRefSat* getRefSatMapElement(char sys) {return _refSatMap[sys];} 73 74 75 // RefSatMap of the last epoch 76 // =========================== 77 QMap<char, t_prn> getRefSatMapLastEpoch() {return _refSatMapLastEpoch;} 78 t_prn getRefSatMapElementLastEpoch(char sys) {return _refSatMapLastEpoch[sys];} 79 void setRefSatMapElementLastEpoch(char sys, t_prn prn) {_refSatMapLastEpoch[sys] = prn;} 80 void saveLastEpoRefSats() { 81 QMapIterator<char, t_pppRefSat*> it(getRefSatMap()); 82 while (it.hasNext()) { 83 it.next(); 84 t_prn prn = it.value()->prn(); 85 setRefSatMapElementLastEpoch(prn.system(), prn); 86 }; 72 87 } 73 QMap<char, t_pppRefSat*> getRefSatMap() {return _refSatMap;}74 88 75 void setRefSatChangeRequired(bool refSatChangeRequired) { 76 _refSatChangeRequired = refSatChangeRequired; 89 // RefSat change required in current epoch 90 // ======================================= 91 void setRefSatChangeRequired(char sys, bool refSatChangeRequired) { 92 _refSatChangeRequiredMap[sys] = refSatChangeRequired; 77 93 } 78 bool refSatChangeRequired() {return _refSatChangeRequired;} 94 bool refSatChangeRequired() { 95 QMapIterator<char, bool> it(_refSatChangeRequiredMap); 96 while (it.hasNext()) { 97 it.next(); 98 if (it.value() == true) { 99 return true; 100 } 101 } 102 return false; 103 } 104 bool refSatChangeRequired(char sys) { 105 return _refSatChangeRequiredMap[sys]; 106 } 79 107 80 void setHistoricalRefSatList(QList<t_prn>& historicalRefSats) {_historicalRefSats = historicalRefSats;} 81 82 bool hasHistoricalRefSat(t_prn prn) {return _historicalRefSats.contains(prn);} 108 // RefSat changed in current epoch (different from last epoch) 109 // =========================================================== 110 void setRefSatChanged(char sys, bool refSatChanged) { 111 _refSatChangedMap[sys] = refSatChanged; 112 } 113 bool refSatChanged() { 114 QMapIterator<char, bool> it(_refSatChangedMap); 115 while (it.hasNext()) { 116 it.next(); 117 if (it.value() == true) { 118 return true; 119 } 120 } 121 return false; 122 } 123 bool refSatChanged(char sys) { 124 return _refSatChangedMap[sys]; 125 } 83 126 84 127 private: … … 88 131 std::deque<t_epoch*> _epochs; 89 132 QMap<char, t_pppRefSat*> _refSatMap; 90 bool _refSatChangeRequired; 91 QList<t_prn> _historicalRefSats; 133 QMap<char, bool> _refSatChangeRequiredMap; 134 QMap<char, bool> _refSatChangedMap; 135 QMap<char, t_prn> _refSatMapLastEpoch; 92 136 }; 93 137 -
trunk/BNC/src/PPP/pppParlist.cpp
r9303 r9386 94 94 case offGR: 95 95 _epoSpec = true; 96 _sigma0 = 1000.0;96 _sigma0 = OPT->_aprSigOGR; 97 97 _x0 = PPP_CLIENT->offGR(); 98 98 break; 99 99 case offGE: 100 100 _epoSpec = true; 101 _sigma0 = 1000.0;101 _sigma0 = OPT->_aprSigOGE; 102 102 _x0 = PPP_CLIENT->offGE(); 103 103 break; 104 104 case offGC: 105 105 _epoSpec = true; 106 _sigma0 = 1000.0;106 _sigma0 = OPT->_aprSigOGC; 107 107 _x0 = PPP_CLIENT->offGC(); 108 108 break; … … 113 113 break; 114 114 case ion: 115 _epoSpec = false; 116 _sigma0 = OPT->_aprSigIon; 117 _noise = OPT->_noiseIon; 118 break; 119 case cBias1: 120 case cBias2: 121 _epoSpec = false; 115 _epoSpec = true; 116 _sigma0 = OPT->_aprSigIon; 117 break; 118 case cBiasG1: case cBiasR1: case cBiasE1: case cBiasC1: 119 case cBiasG2: case cBiasR2: case cBiasE2: case cBiasC2: 120 _epoSpec = true; 122 121 _sigma0 = OPT->_aprSigCodeBias; 123 _noise = OPT->_noiseCodeBias; 124 break; 125 case pBias1: 126 case pBias2: 127 _epoSpec = false; 122 break; 123 case pBiasG1: case pBiasR1: case pBiasE1: case pBiasC1: 124 case pBiasG2: case pBiasR2: case pBiasE2: case pBiasC2: 125 _epoSpec = true; 128 126 _sigma0 = OPT->_aprSigPhaseBias; 129 _noise = OPT->_noisePhaseBias;130 127 break; 131 128 } … … 186 183 (OPT->_obsModelType == OPT->DCMcodeBias && !obs->isReference()) || 187 184 (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference()) ) { 185 188 186 if (obs->prn() == _prn) { 189 187 if (tLC == _tLC) { … … 236 234 } 237 235 break; 238 case cBias1: 239 if (tLC == t_lc::c1) { 240 return 1.0; 241 } 242 else { 243 return 0.0; 244 } 245 break; 246 case cBias2: 247 if (tLC == t_lc::c2) { 248 return 1.0; 249 } 250 else { 251 return 0.0; 252 } 253 break; 254 case pBias1: 255 if (tLC == t_lc::l1) { 256 return 1.0; 257 } 258 else { 259 return 0.0; 260 } 261 break; 262 case pBias2: 263 if (tLC == t_lc::l2) { 264 return 1.0; 265 } 266 else { 267 return 0.0; 268 } 236 case cBiasG1: 237 if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 238 break; 239 case cBiasR1: 240 if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 241 break; 242 case cBiasE1: 243 if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 244 break; 245 case cBiasC1: 246 if ((obs->prn().system() == 'C') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 247 break; 248 case cBiasG2: 249 if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 250 break; 251 case cBiasR2: 252 if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 253 break; 254 case cBiasE2: 255 if ((obs->prn().system() == 'E') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 256 break; 257 case cBiasC2: 258 if ((obs->prn().system() == 'C') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 259 break; 260 case pBiasG1: 261 if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 262 break; 263 case pBiasR1: 264 if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 265 break; 266 case pBiasE1: 267 if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 268 break; 269 case pBiasC1: 270 if ((obs->prn().system() == 'C') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 271 break; 272 case pBiasG2: 273 if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 274 break; 275 case pBiasR2: 276 if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 277 break; 278 case pBiasE2: 279 if ((obs->prn().system() == 'E') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 280 break; 281 case pBiasC2: 282 if ((obs->prn().system() == 'C') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 283 break; 284 269 285 } 270 286 return 0.0; … … 286 302 break; 287 303 case clkR: 288 ss << "REC_CLK ";304 ss << "REC_CLK "; 289 305 break; 290 306 case offGR: 291 ss << "OGR ";307 ss << "OGR "; 292 308 break; 293 309 case offGE: 294 ss << "OGE ";310 ss << "OGE "; 295 311 break; 296 312 case offGC: 297 ss << "OGC ";313 ss << "OGC "; 298 314 break; 299 315 case trp: 300 ss << "TRP ";316 ss << "TRP "; 301 317 break; 302 318 case amb: … … 306 322 ss << "ION " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString(); 307 323 break; 308 case cBias1: 309 case cBias2: 310 case pBias1: 311 case pBias2: 312 ss << "BIAS " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << "REC"; 324 case cBiasG1: case pBiasG1: 325 case cBiasG2: case pBiasG2: 326 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " G "; 327 break; 328 case cBiasR1: case pBiasR1: 329 case cBiasR2: case pBiasR2: 330 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " R "; 331 break; 332 case cBiasE1: case pBiasE1: 333 case cBiasE2: case pBiasE2: 334 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " E "; 335 break; 336 case cBiasC1: case pBiasC1: 337 case cBiasC2: case pBiasC2: 338 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " C "; 313 339 break; 314 340 } … … 360 386 refPrn = (refSatMap[system])->prn(); 361 387 } 362 if ((par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) || 363 ( refPrn == par->prn())) { 388 if ((par->lastObsTime().valid() && 389 (epoTime - par->lastObsTime() > 60.0)) || 390 (refPrn == par->prn())) { 364 391 remove = true; 365 392 } … … 409 436 required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy)); 410 437 438 // Receiver Code Biases 439 // -------------------- 440 if (OPT->_obsModelType == OPT->DCMcodeBias) { 441 if (OPT->useSystem('G')) { 442 required.push_back(new t_pppParam(t_pppParam::cBiasG1, t_prn(), t_lc::c1)); 443 required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2)); 444 } 445 if (OPT->useSystem('R')) { 446 required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1)); 447 required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2)); 448 } 449 if (OPT->useSystem('E')) { 450 required.push_back(new t_pppParam(t_pppParam::cBiasE1, t_prn(), t_lc::c1)); 451 required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2)); 452 } 453 if (OPT->useSystem('C')) { 454 required.push_back(new t_pppParam(t_pppParam::cBiasC1, t_prn(), t_lc::c1)); 455 required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2)); 456 } 457 } 458 459 // Receiver Phase Biases 460 // --------------------- 461 if ((OPT->_obsModelType == OPT->DCMphaseBias) || 462 (OPT->_obsModelType == OPT->PPPRTK) ) { 463 if (OPT->useSystem('G')) { 464 required.push_back(new t_pppParam(t_pppParam::pBiasG1, t_prn(), t_lc::l1)); 465 required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2)); 466 } 467 if (OPT->useSystem('R')) { 468 required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1)); 469 required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2)); 470 } 471 if (OPT->useSystem('E')) { 472 required.push_back(new t_pppParam(t_pppParam::pBiasE1, t_prn(), t_lc::l1)); 473 required.push_back(new t_pppParam(t_pppParam::pBiasE2, t_prn(), t_lc::l2)); 474 } 475 if (OPT->useSystem('C')) { 476 required.push_back(new t_pppParam(t_pppParam::pBiasC1, t_prn(), t_lc::l1)); 477 required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2)); 478 } 479 } 411 480 // Receiver Clock 412 481 // -------------- … … 415 484 // GPS-GLONASS Clock Offset 416 485 // ------------------------ 417 if (OPT->useSystem('R') ) {486 if (OPT->useSystem('R') && OPT->useSystem('G')) { 418 487 required.push_back(new t_pppParam(t_pppParam::offGR, t_prn(), t_lc::dummy)); 419 488 } … … 421 490 // GPS-Galileo Clock Offset 422 491 // ------------------------ 423 if (OPT->useSystem('E') ) {492 if (OPT->useSystem('E') && OPT->useSystem('G')) { 424 493 required.push_back(new t_pppParam(t_pppParam::offGE, t_prn(), t_lc::dummy)); 425 494 } … … 427 496 // GPS-BDS Clock Offset 428 497 // ------------------------ 429 if (OPT->useSystem('C') ) {498 if (OPT->useSystem('C') && OPT->useSystem('G')) { 430 499 required.push_back(new t_pppParam(t_pppParam::offGC, t_prn(), t_lc::dummy)); 431 500 } … … 443 512 OPT->_obsModelType == OPT->DCMphaseBias ) { 444 513 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 445 const t_pppSatObs* 514 const t_pppSatObs* satObs = obsVector[jj]; 446 515 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy)); 447 516 } 448 517 } 449 450 518 // Ambiguities 451 519 // ----------- … … 464 532 } 465 533 466 // Receiver Code Biases467 // --------------------468 if (OPT->_obsModelType == OPT->DCMcodeBias) {469 required.push_back(new t_pppParam(t_pppParam::cBias1, t_prn(), t_lc::c1));470 required.push_back(new t_pppParam(t_pppParam::cBias2, t_prn(), t_lc::c2));471 }472 473 // Receiver Phase Biases474 // ---------------------475 if ((OPT->_obsModelType == OPT->DCMphaseBias) ||476 (OPT->_obsModelType == OPT->PPPRTK) ) {477 required.push_back(new t_pppParam(t_pppParam::pBias1, t_prn(), t_lc::l1));478 required.push_back(new t_pppParam(t_pppParam::pBias2, t_prn(), t_lc::l2));479 }480 481 534 // Check if all required parameters are present 482 535 // -------------------------------------------- -
trunk/BNC/src/PPP/pppParlist.h
r9288 r9386 15 15 class t_pppParam { 16 16 public: 17 enum e_type {crdX, crdY, crdZ, clkR, amb, offGR, offGE, offGC, trp, ion, cBias1, cBias2, pBias1, pBias2}; 17 enum e_type {crdX, crdY, crdZ, clkR, trp, ion, amb, offGR, offGE, offGC, 18 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 19 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; 18 20 19 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, 20 const std::vector<t_pppSatObs*>* obsVector = 0); 21 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0); 21 22 22 23 ~t_pppParam(); … … 33 34 _indexOld = _indexNew; 34 35 _indexNew = indexNew; 36 } 37 void resetIndex() { 38 _indexOld = -1; 39 _indexNew = -1; 35 40 } 36 41 int indexOld() const {return _indexOld;} -
trunk/BNC/src/PPP/pppSatObs.cpp
r9303 r9386 63 63 64 64 // Select pseudoranges and phase observations 65 // ------------------------------------------ 65 // ------------------------------------------- 66 66 const string preferredAttrib = "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX"; 67 67 … … 296 296 297 297 if (tLC == t_lc::GIM) { 298 retVal = OPT->_sigmaGIM * OPT->_sigmaGIM ;298 retVal = OPT->_sigmaGIM * OPT->_sigmaGIM + OPT->_sigmaGIM * OPT->_sigmaGIM; 299 299 } 300 300 … … 304 304 305 305 map<t_frequency::type, double>::const_iterator it; 306 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {// qDebug() << "codeCoeff : " << t_frequency::toString(it->first).c_str() << ": " << it->second;306 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {//cout << "codeCoeff : " << t_frequency::toString(it->first).c_str() << ": " << it->second << endl; 307 307 retVal += it->second * it->second * OPT->_sigmaC1 * OPT->_sigmaC1; 308 308 } 309 309 310 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {// qDebug() << "phaseCoeff: " << t_frequency::toString(it->first).c_str() << ": " << it->second;310 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {//cout << "phaseCoeff: " << t_frequency::toString(it->first).c_str() << ": " << it->second << endl; 311 311 retVal += it->second * it->second * OPT->_sigmaL1 * OPT->_sigmaL1; 312 312 } … … 316 316 // De-Weight GLONASS and BDS 317 317 // -------------------------- 318 if ( _prn.system() == 'R'||319 _prn.system() == 'C') {318 if ((_prn.system() == 'R' && (t_lc::includesCode(tLC) || t_lc::includesPhase(tLC))) || 319 (_prn.system() == 'C' && (t_lc::includesCode(tLC) || t_lc::includesPhase(tLC)))) { 320 320 retVal *= 5.0; 321 321 } … … 336 336 // 337 337 //////////////////////////////////////////////////////////////////////////// 338 double t_pppSatObs::maxRes(t_lc::type tLC) const { //qDebug() << "t_pppSatObs::maxRes(t_lc::type tLC)";338 double t_pppSatObs::maxRes(t_lc::type tLC) const { 339 339 double retVal = 0.0; 340 340 … … 345 345 346 346 map<t_frequency::type, double>::const_iterator it; 347 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {// qDebug() << "codeCoeff: " << it->first << ": " << it->second;347 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {//cout << "codeCoeff: " << it->first << ": " << it->second << endl; 348 348 retVal += it->second * it->second * OPT->_maxResC1 * OPT->_maxResC1; 349 349 } 350 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {// qDebug() << "phaseCoeff: " << it->first << ": " << it->second;350 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {//cout << "phaseCoeff: " << it->first << ": " << it->second << endl; 351 351 retVal += it->second * it->second * OPT->_maxResL1 * OPT->_maxResL1; 352 352 } 353 353 if (tLC == t_lc::GIM) { 354 retVal = 3.0 * OPT->_sigmaGIM * OPT->_sigmaGIM;354 retVal = 3.0 * (OPT->_sigmaGIM * OPT->_sigmaGIM + OPT->_sigmaGIM * OPT->_sigmaGIM); 355 355 } 356 356 if (tLC == t_lc::Tz0) { 357 357 retVal = 3.0 * OPT->_sigmaTz0 * OPT->_sigmaTz0; 358 358 } 359 return sqrt(retVal); 359 360 retVal = sqrt(retVal); 361 362 return retVal; 360 363 } 361 364 -
trunk/BNC/src/PPP/pppSatObs.h
r8961 r9386 21 21 bool isReference() const {return _reference;}; 22 22 void setAsReference() {_reference = true;}; 23 void resetReference() {_reference = false;}; 23 24 const t_prn& prn() const {return _prn;} 24 25 const ColumnVector& xc() const {return _xcSat;} -
trunk/BNC/src/bncwindow.cpp
r9302 r9386 1454 1454 _pppWidgets._sigmaC1->setWhatsThis(tr("<p>Enter a Sigma for GNSS C1 code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of C1 code observations to a PPP solution from combined code and phase data. 2.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma C1 = 2.0' <i>[key: PPP/sigmaC1]</i></p>")); 1455 1455 _pppWidgets._sigmaL1->setWhatsThis(tr("<p>Enter a Sigma for GNSS L1 phase observations in meters.</p><p>The higher the sigma you enter, the less the contribution of L1 phase observations to a PPP solutions from combined code and phase data. 0.01 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma L1 = 0.01' <i>[key: PPP/sigmaL1]</i></p>")); 1456 _pppWidgets._sigmaGIM->setWhatsThis(tr("<p>Enter a Sigma for GIM pseudo observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GIM pseudo observations to a PPP solution. 0.05 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma GIM = 0.05' <i>[key: PPP/sigmaGIM]</i></p>"));1456 _pppWidgets._sigmaGIM->setWhatsThis(tr("<p>Enter a Sigma for GIM pseudo observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GIM pseudo observations to a PPP solution. 4.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma GIM = 4.0' <i>[key: PPP/sigmaGIM]</i></p>")); 1457 1457 _pppWidgets._sigmaTz0->setWhatsThis(tr("<p>Enter a Sigma for a Tropospheric pseudo observation in zenith direction in meters.</p><p>The higher the sigma you enter, the less the contribution of Tz0 pseudo observations to a PPP solution. 0.10 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma Tzo = 0.10' <i>[key: PPP/sigmaTz0]</i></p>")); 1458 1458 _pppWidgets._maxResC1->setWhatsThis(tr("<p>Specify a maximum for residuals from C1 code observations in a PPP solution. '3.0' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Rex C1 = 3.0' <i>[key: PPP/maxResC1]</i></p>")); -
trunk/BNC/src/pppInclude.h
r8961 r9386 98 98 else if (sys == 'R') return t_frequency::R2; 99 99 else if (sys == 'E') return t_frequency::E5; 100 else if (sys == 'C') return t_frequency::C 7;100 else if (sys == 'C') return t_frequency::C6; 101 101 else return t_frequency::dummy; 102 102 case lIF: case cIF: case MW: case CL: -
trunk/BNC/src/pppMain.cpp
r9302 r9386 175 175 opt->_blqFileName.assign(settings.value("PPP/blqFile").toString().toStdString()); 176 176 #endif 177 opt->_sigmaC1 = settings.value("PPP/sigmaC1").toDouble(); if (opt->_sigmaC1 <= 0.0) opt->_sigmaC1 = 2.0;177 opt->_sigmaC1 = settings.value("PPP/sigmaC1").toDouble(); if (opt->_sigmaC1 <= 0.0) opt->_sigmaC1 = 2.00; 178 178 opt->_sigmaL1 = settings.value("PPP/sigmaL1").toDouble(); if (opt->_sigmaL1 <= 0.0) opt->_sigmaL1 = 0.01; 179 opt->_sigmaGIM = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 0.05;179 opt->_sigmaGIM = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 4.00; 180 180 opt->_sigmaTz0 = settings.value("PPP/sigmaTz0").toDouble();if (opt->_sigmaTz0 <= 0.0) opt->_sigmaTz0 = 0.10; 181 181 opt->_corrWaitTime = settings.value("PPP/corrWaitTime").toDouble(); … … 189 189 #ifdef USE_PPP 190 190 // Pseudo Observations 191 if (settings.value("PPP/pseudoObs").toString() == " Ionosphere") {192 opt->_pseudoObsIono = true;193 opt->_pseudoObsTropo = false;191 if (settings.value("PPP/pseudoObs").toString() == "Troposphere") { 192 opt->_pseudoObsIono = false; 193 opt->_pseudoObsTropo = true; 194 194 } 195 195 else if (settings.value("PPP/pseudoObs").toString() == "Iono+Tropo") { 196 196 opt->_pseudoObsIono = true; 197 197 opt->_pseudoObsTropo = true; 198 }199 else if (settings.value("PPP/pseudoObs").toString() == "no") {200 opt->_pseudoObsIono = false;201 opt->_pseudoObsTropo = false;202 198 } 203 199 // Observation Model … … 228 224 #endif 229 225 // GPS 230 if (settings.value("PPP/lcGPS").toString() == "Pi") { 231 if (opt->_obsModelType == t_pppOptions::IF) { 232 opt->_LCsGPS.push_back(t_lc::cIF); 233 } 234 else { 235 opt->_LCsGPS.push_back(t_lc::c1); 236 opt->_LCsGPS.push_back(t_lc::c2); 237 if (opt->_pseudoObsIono) { 238 opt->_LCsGPS.push_back(t_lc::GIM); 239 } 240 if (opt->_pseudoObsTropo) { 241 opt->_LCsGPS.push_back(t_lc::Tz0); 242 } 243 } 244 } 245 else if (settings.value("PPP/lcGPS").toString() == "Li") { 246 if (opt->_obsModelType == t_pppOptions::IF) { 247 opt->_LCsGPS.push_back(t_lc::lIF); 248 } 249 else { 250 opt->_LCsGPS.push_back(t_lc::l1); 251 opt->_LCsGPS.push_back(t_lc::l2); 252 if (opt->_pseudoObsIono) { 253 opt->_LCsGPS.push_back(t_lc::GIM); 254 } 255 if (opt->_pseudoObsTropo) { 256 opt->_LCsGPS.push_back(t_lc::Tz0); 257 } 258 } 259 } 260 else if (settings.value("PPP/lcGPS").toString() == "Pi&Li") { 226 if (settings.value("PPP/lcGPS").toString() == "Pi&Li") { 261 227 if (opt->_obsModelType == t_pppOptions::IF) { 262 228 opt->_LCsGPS.push_back(t_lc::cIF); … … 277 243 } 278 244 // GLONASS 279 if (settings.value("PPP/lcGLONASS").toString() == "Pi") { 280 if (opt->_obsModelType == t_pppOptions::IF) { 281 opt->_LCsGLONASS.push_back(t_lc::cIF); 282 } 283 else { 284 opt->_LCsGLONASS.push_back(t_lc::c1); 285 opt->_LCsGLONASS.push_back(t_lc::c2); 286 if (opt->_pseudoObsIono) { 287 opt->_LCsGLONASS.push_back(t_lc::GIM); 288 } 289 if (opt->_pseudoObsTropo) { 290 opt->_LCsGPS.push_back(t_lc::Tz0); 291 } 292 } 293 } 294 else if (settings.value("PPP/lcGLONASS").toString() == "Li") { 295 if (opt->_obsModelType == t_pppOptions::IF) { 296 opt->_LCsGLONASS.push_back(t_lc::lIF); 297 } 298 else { 299 opt->_LCsGLONASS.push_back(t_lc::l1); 300 opt->_LCsGLONASS.push_back(t_lc::l2); 301 if (opt->_obsModelType == t_pppOptions::IF) { 302 opt->_LCsGLONASS.push_back(t_lc::GIM); 303 } 304 if (opt->_pseudoObsTropo) { 305 opt->_LCsGPS.push_back(t_lc::Tz0); 306 } 307 } 308 } 309 else if (settings.value("PPP/lcGLONASS").toString() == "Pi&Li") { 245 if (settings.value("PPP/lcGLONASS").toString() == "Pi&Li") { 310 246 if (opt->_obsModelType == t_pppOptions::IF) { 311 247 opt->_LCsGLONASS.push_back(t_lc::cIF); … … 321 257 } 322 258 if (opt->_pseudoObsTropo) { 323 opt->_LCsG PS.push_back(t_lc::Tz0);259 opt->_LCsGLONASS.push_back(t_lc::Tz0); 324 260 } 325 261 } 326 262 } 327 263 // Galileo 328 if (settings.value("PPP/lcGalileo").toString() == "Pi") { 329 if (opt->_obsModelType == t_pppOptions::IF) { 330 opt->_LCsGalileo.push_back(t_lc::cIF); 331 } 332 else { 333 opt->_LCsGalileo.push_back(t_lc::c1); 334 opt->_LCsGalileo.push_back(t_lc::c2); 335 if (opt->_pseudoObsIono) { 336 opt->_LCsGalileo.push_back(t_lc::GIM); 337 } 338 if (opt->_pseudoObsTropo) { 339 opt->_LCsGPS.push_back(t_lc::Tz0); 340 } 341 } 342 } 343 else if (settings.value("PPP/lcGalileo").toString() == "Li") { 344 if (opt->_obsModelType == t_pppOptions::IF) { 345 opt->_LCsGalileo.push_back(t_lc::lIF); 346 } 347 else { 348 opt->_LCsGalileo.push_back(t_lc::l1); 349 opt->_LCsGalileo.push_back(t_lc::l2); 350 if (opt->_pseudoObsIono) { 351 opt->_LCsGalileo.push_back(t_lc::GIM); 352 } 353 if (opt->_pseudoObsTropo) { 354 opt->_LCsGPS.push_back(t_lc::Tz0); 355 } 356 } 357 } 358 else if (settings.value("PPP/lcGalileo").toString() == "Pi&Li") { 264 if (settings.value("PPP/lcGalileo").toString() == "Pi&Li") { 359 265 if (opt->_obsModelType == t_pppOptions::IF) { 360 266 opt->_LCsGalileo.push_back(t_lc::cIF); … … 370 276 } 371 277 if (opt->_pseudoObsTropo) { 372 opt->_LCsG PS.push_back(t_lc::Tz0);278 opt->_LCsGalileo.push_back(t_lc::Tz0); 373 279 } 374 280 } 375 281 } 376 282 // BDS 377 if (settings.value("PPP/lcBDS").toString() == "Pi") { 378 if (opt->_obsModelType == t_pppOptions::IF) { 379 opt->_LCsBDS.push_back(t_lc::cIF); 380 } 381 else { 382 opt->_LCsBDS.push_back(t_lc::c1); 383 opt->_LCsBDS.push_back(t_lc::c2); 384 if (opt->_pseudoObsIono) { 385 opt->_LCsBDS.push_back(t_lc::GIM); 386 } 387 if (opt->_pseudoObsTropo) { 388 opt->_LCsGPS.push_back(t_lc::Tz0); 389 } 390 } 391 } 392 else if (settings.value("PPP/lcBDS").toString() == "Li") { 393 if (opt->_obsModelType == t_pppOptions::IF) { 394 opt->_LCsBDS.push_back(t_lc::lIF); 395 } 396 else { 397 opt->_LCsBDS.push_back(t_lc::l1); 398 opt->_LCsBDS.push_back(t_lc::l2); 399 if (opt->_pseudoObsIono) { 400 opt->_LCsBDS.push_back(t_lc::GIM); 401 } 402 if (opt->_pseudoObsTropo) { 403 opt->_LCsGPS.push_back(t_lc::Tz0); 404 } 405 } 406 } 407 else if (settings.value("PPP/lcBDS").toString() == "Pi&Li") { 283 if (settings.value("PPP/lcBDS").toString() == "Pi&Li") { 408 284 if (opt->_obsModelType == t_pppOptions::IF) { 409 285 opt->_LCsBDS.push_back(t_lc::cIF); … … 419 295 } 420 296 if (opt->_pseudoObsTropo) { 421 opt->_LCs GPS.push_back(t_lc::Tz0);297 opt->_LCsBDS.push_back(t_lc::Tz0); 422 298 } 423 299 } … … 446 322 } 447 323 448 opt->_minObs = settings.value("PPP/minObs").toInt(); if (opt->_minObs < 4) opt->_minObs = 4;324 opt->_minObs = settings.value("PPP/minObs").toInt(); if (opt->_minObs < 5) opt->_minObs = 5; 449 325 opt->_minEle = settings.value("PPP/minEle").toDouble() * M_PI / 180.0; 450 opt->_maxResC1 = settings.value("PPP/maxResC1").toDouble(); if (opt->_maxResC1 <= 0.0) opt->_maxResC1 = 3.0 ;326 opt->_maxResC1 = settings.value("PPP/maxResC1").toDouble(); if (opt->_maxResC1 <= 0.0) opt->_maxResC1 = 3.00; 451 327 opt->_maxResL1 = settings.value("PPP/maxResL1").toDouble(); if (opt->_maxResL1 <= 0.0) opt->_maxResL1 = 0.03; 452 328 opt->_eleWgtCode = (settings.value("PPP/eleWgtCode").toInt() != 0); … … 459 335 opt->_aprSigIon = 1000.0; 460 336 opt->_aprSigClk = 1000.0; 337 opt->_aprSigOGR = 1000.0; 338 opt->_aprSigOGE = 1000.0; 339 opt->_aprSigOGC = 1000.0; 461 340 opt->_aprSigCodeBias = 1000.0; 462 341 opt->_aprSigPhaseBias = 1000.0; 463 // TODO: Find realistic values!!!!!!464 opt->_noiseIon = 5.00; // Todo: add all to table465 opt->_noiseCodeBias = 5.00;466 opt->_noisePhaseBias = 5.00;467 342 468 343 _options << opt; -
trunk/BNC/src/pppOptions.h
r9302 r9386 61 61 ColumnVector _noiseCrd; 62 62 double _aprSigClk; 63 double _aprSigOGR; 64 double _aprSigOGE; 65 double _aprSigOGC; 63 66 double _aprSigTrp; 64 67 double _noiseTrp; 65 68 double _aprSigIon; 66 double _noiseIon;67 69 double _aprSigCodeBias; 68 double _noiseCodeBias;69 70 double _aprSigPhaseBias; 70 double _noisePhaseBias;71 71 int _nmeaPort; 72 72 double _aprSigAmb; -
trunk/BNC/src/pppWidgets.cpp
r9302 r9386 124 124 _lcGPS->addItems(QString("P3,P3&L3").split(",")); 125 125 #else 126 _lcGPS->addItems(QString("no,Pi ,Li,Pi&Li").split(","));126 _lcGPS->addItems(QString("no,Pi&Li").split(",")); 127 127 #endif 128 128 … … 131 131 _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(",")); 132 132 #else 133 _lcGLONASS->addItems(QString("no,Pi ,Li,Pi&Li").split(","));133 _lcGLONASS->addItems(QString("no,Pi&Li").split(",")); 134 134 #endif 135 135 … … 138 138 _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(",")); 139 139 #else 140 _lcGalileo->addItems(QString("no,Pi ,Li,Pi&Li").split(","));140 _lcGalileo->addItems(QString("no,Pi&Li").split(",")); 141 141 #endif 142 142 … … 145 145 _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(",")); 146 146 #else 147 _lcBDS->addItems(QString("no,Pi ,Li,Pi&Li").split(","));147 _lcBDS->addItems(QString("no,Pi&Li").split(",")); 148 148 #endif 149 149 … … 155 155 #else 156 156 _modelObs->addItems(QString("Ionosphere-free PPP,Uncombined PPP,PPP-RTK,DCM with Code Biases,DCM with Phase Biases").split(",")); 157 _pseudoObs->addItems(QString(" no,Ionosphere,Iono+Tropo").split(","));157 _pseudoObs->addItems(QString("Troposphere,Iono+Tropo").split(",")); 158 158 #endif 159 159 … … 165 165 _snxtroIntr->setCurrentIndex(6); 166 166 167 _minObs->setMinimum( 4);167 _minObs->setMinimum(5); 168 168 _minObs->setMaximum(6); 169 169 _minObs->setSingleStep(1); … … 353 353 } 354 354 else { 355 _sigmaGIM->setText(" 0.05");355 _sigmaGIM->setText("4.0"); 356 356 } 357 357 … … 367 367 } 368 368 else { 369 _maxResC1->setText(" 4.0");369 _maxResC1->setText("3.0"); 370 370 } 371 371 … … 508 508 bool enablePseudoObs; 509 509 if (_modelObs->currentText() == "PPP-RTK" || 510 _modelObs->currentText() == "Ionosphere-free PPP") {510 _modelObs->currentText() == "Ionosphere-free PPP") { 511 511 enablePseudoObs = false; 512 512 } -
trunk/BNC/src/src.pri
r9237 r9386 27 27 release:MOC_DIR=.moc/release 28 28 29 debug:DEFINES += BNC_DEBUG 30 debug:DEFINES += BNC_DEBUG_BCEP 31 #debug:DEFINES += BNC_DEBUG_SSR 29 30 debug:DEFINES += BNC_DEBUG_BCEP 31 #debug:DEFINES += BNC_DEBUG_PPP 32 #debug:DEFINES += BNC_DEBUG_SSR 32 33 release:DEFINES += BNC_DEBUG_BCEP 34 33 35 34 36 # Include Path
Note:
See TracChangeset
for help on using the changeset viewer.