Changeset 9419 in ntrip
- Timestamp:
- May 3, 2021, 2:18:39 PM (4 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r9398 r9419 73 73 } 74 74 } 75 75 76 _offGR = 0.0; 76 77 _offGE = 0.0; … … 596 597 bool epochReProcessing = false; 597 598 _numEpoProcessing = 0; 599 _historicalRefSats.clear(); 600 598 601 do { 599 602 _numEpoProcessing++; 603 #ifdef BNC_DEBUG_PPP 604 LOG << "_numEpoProcessing " << _numEpoProcessing << endl; 605 #endif 600 606 if (_obsPool->refSatChanged()) { 601 607 if(_filter->datumTransformation() != success) { 608 LOG << "_filter->datumTransformation() != success" << endl; 602 609 return finish(failure); 603 610 } 604 611 else { 612 LOG << "_filter->datumTransformation() == success" << endl; 605 613 _obsPool->saveLastEpoRefSats(); 606 614 } … … 631 639 if (_opt->_refSatRequired) { 632 640 if (handleRefSatellites(_obsRover) != success) { 633 _historicalRefSats.clear();634 641 return finish(failure); 635 642 } 636 643 if (_obsPool->refSatChanged() && 637 _opt->_obsModelType != t_pppOptions::UncombPPP) { 644 (_opt->_obsModelType == OPT->DCMcodeBias || 645 _opt->_obsModelType == OPT->DCMphaseBias || 646 _opt->_pseudoObsIono)) { 647 LOG << "refSatChanged()" << endl; 638 648 epochReProcessing = true; 639 649 continue; … … 674 684 else { 675 685 epochReProcessing = false; 676 _historicalRefSats.clear();677 686 } 678 687 } while (epochReProcessing); … … 795 804 refSatDefined = true; 796 805 obsVector[ii]->setAsReference(); 797 #ifdef BNC_DEBUG_PPP798 LOG << "=> unchanged refsatprn: " << satObs->prn().toString() << endl;799 #endif800 806 } 801 807 // reference satellite has changed … … 807 813 obsVector[ii]->setAsReference(); 808 814 refSat->setPrn(satObs->prn()); 809 #ifdef BNC_DEBUG_PPP810 LOG << "=> set refsatprn: " << satObs->prn().toString() << endl;811 #endif812 815 } 813 816 else if ( _historicalRefSats[sys].contains(satObs->prn())) { … … 841 844 obsVector[ii]->setAsReference(); 842 845 refSat->setPrn(satObs->prn()); 843 #ifdef BNC_DEBUG_PPP844 LOG << " => set refsatprn: " << satObs->prn().toString() << endl;845 #endif846 846 if (OPT->_pseudoObsIono) { 847 847 refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1)); … … 858 858 refSat->setPrn(t_prn()); 859 859 } 860 861 860 _obsPool->setRefSatChangeRequired(sys, false); // done or impossible 862 861 } -
trunk/BNC/src/PPP/pppFilter.cpp
r9398 r9419 81 81 // Set Parameters 82 82 // -------------- 83 _parlist->set(_epoTime, allObs, _obsPool->getRefSatMap()); 83 if (_parlist->set(_epoTime, allObs, _obsPool->getRefSatMap()) != success) { 84 return failure; 85 } 84 86 const vector<t_pppParam*>& params = _parlist->params(); 85 87 #ifdef BNC_DEBUG_PPP … … 88 90 } 89 91 #endif 92 90 93 // Status Vector, Variance-Covariance Matrix 91 94 // ----------------------------------------- … … 127 130 OPT->_obsModelType == OPT->DCMphaseBias) { 128 131 preProcessing = true; 132 unsigned usableSys = 0; 129 133 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 130 134 char sys = OPT->systems()[iSys]; … … 138 142 } 139 143 } 140 if (!obsVector.size()) {continue;} 144 if (!obsVector.size()) { 145 continue; 146 } 147 else { 148 ++usableSys; 149 if (usableSys == 1) { 150 _datumTrafo->setFirstSystem(sys); 151 } 152 } 141 153 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, 142 154 epoch->pseudoObsIono(), preProcessing) != success) { … … 154 166 } 155 167 else if (!_obsPool->refSatChangeRequired()) { 156 initDatumTransformation(allObs );168 initDatumTransformation(allObs, epoch->pseudoObsIono()); 157 169 } 158 170 } … … 162 174 preProcessing = false; 163 175 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 164 (iSys) ? _datumTrafo->setFirstSystem(false) : _datumTrafo->setFirstSystem(true); 165 char system = OPT->systems()[iSys]; 176 char sys = OPT->systems()[iSys]; 166 177 if (OPT->_refSatRequired) { 167 _refPrn = (_obsPool->getRefSatMapElement(sys tem))->prn();178 _refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 168 179 } 169 180 unsigned int num = 0; 170 181 vector<t_pppSatObs*> obsVector; 171 182 for (unsigned jj = 0; jj < allObs.size(); jj++) { 172 if (allObs[jj]->prn().system() == sys tem) {183 if (allObs[jj]->prn().system() == sys) { 173 184 obsVector.push_back(allObs[jj]); 174 num++; 175 } 176 } 177 if (!num) {continue;} 178 LOG << epoTimeStr << " SATNUM " << system << ' ' << right << setw(2) << num << endl; 179 if (processSystem(OPT->LCs(system), obsVector, _refPrn, 185 ++num; 186 } 187 } 188 if (!num) { 189 continue; 190 } 191 LOG << epoTimeStr << " SATNUM " << sys << ' ' << right << setw(2) << num << endl; 192 if (processSystem(OPT->LCs(sys), obsVector, _refPrn, 180 193 epoch->pseudoObsIono(), preProcessing) != success) { 181 194 return failure; … … 190 203 if (OPT->_refSatRequired) { 191 204 _obsPool->saveLastEpoRefSats(); 205 _datumTrafo->setLastEpoParlist(_parlist); 192 206 } 193 207 return success; … … 219 233 220 234 unsigned usedLCs = LCs.size(); 221 unsigned realUsedLCs = usedLCs;222 235 if (OPT->_pseudoObsIono && !pseudoObsIonoAvailable) { 223 236 usedLCs -= 1; // GIM not used … … 226 239 if (OPT->_pseudoObsTropo) { 227 240 hlpLCs = -1; 228 realUsedLCs -= 1;229 241 } 230 242 // max Obs 231 243 unsigned maxObs = obsVector.size() * (usedLCs + hlpLCs); 232 if (OPT->_pseudoObsTropo ) {244 if (OPT->_pseudoObsTropo && _datumTrafo->firstSystem(sys)) { 233 245 maxObs += 1; 234 246 } … … 260 272 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 261 273 t_pppSatObs* obs = obsVector[ii]; 274 if (iOutlier == 0 && !preProcessing) { 275 obs->resetOutlier(); 276 } 262 277 if (!obs->outlier()) { 263 278 for (unsigned jj = 0; jj < usedLCs; jj++) { … … 280 295 // pseudo Obs Tropo 281 296 // ================ 282 if (OPT->_pseudoObsTropo ) {297 if (OPT->_pseudoObsTropo && _datumTrafo->firstSystem(sys)) { 283 298 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 284 299 t_pppSatObs* obs = obsVector[ii]; … … 302 317 if ((!iOutlier) && 303 318 (OPT->_obsModelType == OPT->DCMcodeBias || 304 OPT->_obsModelType == OPT->DCMphaseBias ) && (!preProcessing)) { 305 _datumTrafo->updateIndices(iObs+1); 319 OPT->_obsModelType == OPT->DCMphaseBias) && 320 (!preProcessing)) { 321 _datumTrafo->updateIndices(sys, iObs+1); 306 322 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, _parlist->nPar()), 1); 307 323 } … … 499 515 // ----------------------- 500 516 else { 517 if (refPrn != t_prn()) {return success;} 501 518 ColumnVector AA(params.size()); 502 519 for (unsigned iPar = 0; iPar < params.size(); iPar++) { … … 666 683 //////////////////////////////////////////////////////////////////////////// 667 684 t_irc t_pppFilter::datumTransformation() { 685 // get last epoch 668 686 t_pppObsPool::t_epoch* epoch = _obsPool->lastEpoch(); 669 if (!epoch) {LOG << "!epoch" << endl; 687 if (!epoch) { 688 LOG << "!lastEpoch" << endl; 670 689 return failure; 671 690 } … … 674 693 LOG << string(epoch->epoTime()) << " DATUM TRANSFORMATION " << endl; 675 694 } 695 676 696 vector<t_pppSatObs*>& allObs = epoch->obsVector(); 677 697 678 // reset old and set new refSats in last epoch (ambiguities )679 // ======================================================== 698 // reset old and set new refSats in last epoch (ambiguities/GIM) 699 // ============================================================= 680 700 if (resetRefSatellitesLastEpoch(allObs) != true) { 701 LOG << "resetRefSatellitesLastEpoch = failure" << endl; 681 702 return failure; 703 } 704 705 if (OPT->_obsModelType == OPT->UncombPPP) { 706 return success; 682 707 } 683 708 684 709 // set AA2 685 710 // ======= 686 _parlist->set(epoch->epoTime(), allObs, _obsPool->getRefSatMap()); 687 const vector<t_pppParam*>& params = _parlist->params(); 711 t_pppParlist* parlist = _datumTrafo->lastEpoParlist(); 712 if (parlist->set(epoch->epoTime(), allObs, _obsPool->getRefSatMap()) != success) { 713 return failure; 714 } 715 vector<t_pppParam*>& params = parlist->params(); 688 716 #ifdef BNC_DEBUG_PPP 717 LOG << " parameters of last epoch" << endl; 689 718 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 690 719 LOG << params[iPar]->toString() << "\t\t" << endl; 691 720 } 692 721 #endif 722 unsigned nPar = parlist->nPar(); 723 unsigned usableSys = 0; 693 724 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 694 (iSys) ? _datumTrafo->setFirstSystem(false) : _datumTrafo->setFirstSystem(true);695 725 char sys = OPT->systems()[iSys]; 696 726 t_prn refPrn = (_obsPool->getRefSatMapElement(sys))->prn(); 697 #ifdef BNC_DEBUG_PPP698 LOG << "refPrn: " << refPrn.toString() << endl;699 #endif700 727 vector<t_pppSatObs*> obsVector; 701 728 for (unsigned jj = 0; jj < allObs.size(); jj++) { … … 704 731 } 705 732 } 706 733 if (!obsVector.size()) { 734 continue; 735 } 736 else { 737 ++usableSys; 738 if (usableSys == 1) { 739 _datumTrafo->setFirstSystem(sys); 740 } 741 } 707 742 vector<t_lc::type> LCs = OPT->LCs(sys); 708 743 unsigned usedLCs = LCs.size(); 709 unsigned realUsedLCs = usedLCs;710 744 if (OPT->_pseudoObsIono && !epoch->pseudoObsIono()) { 711 745 usedLCs -= 1; // GIM not used … … 714 748 if (OPT->_pseudoObsTropo) { 715 749 hlpLCs = -1; 716 realUsedLCs -= 1;717 750 } 718 751 // max Obs 719 752 unsigned maxObs = obsVector.size() * (usedLCs + hlpLCs); 720 if (OPT->_pseudoObsTropo) { 753 754 if (OPT->_pseudoObsTropo && _datumTrafo->firstSystem(sys)) { 721 755 maxObs += 1; 722 756 } … … 724 758 maxObs -= 1; // pseudo obs iono with respect to refSat 725 759 } 726 727 Matrix AA(maxObs, _parlist->nPar()); 760 Matrix AA(maxObs, nPar); 728 761 729 762 // Real Observations … … 732 765 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 733 766 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 } 767 for (unsigned jj = 0; jj < usedLCs; jj++) { 768 const t_lc::type tLC = LCs[jj]; 769 if (tLC == t_lc::GIM) {continue;} 770 if (tLC == t_lc::Tz0) {continue;} 771 ++iObs; 772 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 773 const t_pppParam* par = params[iPar]; 774 AA[iObs][iPar] = par->partial(_epoTime, obs, tLC, refPrn); 744 775 } 745 776 } … … 747 778 // pseudo Obs Tropo 748 779 // ================ 749 if (OPT->_pseudoObsTropo ) {780 if (OPT->_pseudoObsTropo && _datumTrafo->firstSystem(sys)) { 750 781 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 751 782 t_pppSatObs* obs = obsVector[ii]; … … 762 793 } 763 794 } 764 _datumTrafo->updateIndices(iObs+1); 765 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, _parlist->nPar()), 2); 766 } 795 if (!iObs) { 796 continue; 797 } 798 _datumTrafo->updateIndices(sys, iObs+1); 799 _datumTrafo->prepareAA(AA.SubMatrix(1, iObs+1 , 1, nPar), 2); 800 } 801 _datumTrafo->updateNumObs(); 767 802 768 803 // Datum Transformation 769 804 // ==================== 770 805 #ifdef BNC_DEBUG_PPP 771 LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->obsNum(), _datumTrafo->parNum());772 LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->obsNum(), _datumTrafo->parNum());806 //LOG << "AA1\n"; _datumTrafo->printMatrix(_datumTrafo->AA1(), _datumTrafo->numObs(), _datumTrafo->numPar()); 807 //LOG << "AA2\n"; _datumTrafo->printMatrix(_datumTrafo->AA2(), _datumTrafo->numObs(), _datumTrafo->numPar()); 773 808 #endif 774 Matrix D21 = _datumTrafo->computeTrafoMatrix(); 809 if(_datumTrafo->computeTrafoMatrix() != success) { 810 return failure; 811 } 775 812 #ifdef BNC_DEBUG_PPP 776 LOG << "D21" << endl; _datumTrafo->printMatrix(D21, _datumTrafo->parNum(), _datumTrafo->parNum());813 //LOG << "D21" << endl; _datumTrafo->printMatrix(_datumTrafo->D21(), _datumTrafo->numObs(), _datumTrafo->numPar()); 777 814 #endif 778 815 ColumnVector xFltOld = _xFlt; 779 816 SymmetricMatrix QFltOld = _QFlt; 780 817 781 _QFlt << D21 * QFltOld * D21.t();782 _xFlt = D21* xFltOld;818 _QFlt << _datumTrafo->D21() * QFltOld * _datumTrafo->D21().t(); 819 _xFlt = _datumTrafo->D21() * xFltOld; 783 820 784 821 #ifdef BNC_DEBUG_PPP … … 791 828 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 792 829 char sys = OPT->systems()[iSys]; 793 t_irc irc = resetAmb(_obsPool->getRefSatMapElementLastEpoch(sys), allObs); 794 if (OPT->_obsModelType == OPT->DCMcodeBias) { 795 if (irc == success) { 796 addNoiseToIono(sys);} 830 t_prn refPrnOld = _obsPool->getRefSatMapElementLastEpoch(sys); 831 t_prn refPrnNew = (_obsPool->getRefSatMapElement(sys))->prn(); 832 if (refPrnNew != refPrnOld) { 833 t_irc irc = resetAmb(_obsPool->getRefSatMapElementLastEpoch(sys), allObs); 834 if (OPT->_obsModelType == OPT->DCMcodeBias) { 835 if (irc == success) { 836 addNoiseToIono(sys); 837 } 838 } 797 839 } 798 840 } … … 802 844 _datumTrafo->switchAA(); 803 845 846 // save parameter list 847 // ==================== 848 _datumTrafo->setLastEpoParlist(_parlist); 804 849 return success; 805 850 } … … 807 852 // Init datum transformation 808 853 //////////////////////////////////////////////////////////////////////////// 809 void t_pppFilter::initDatumTransformation(const std::vector<t_pppSatObs*>& allObs) { 854 void t_pppFilter::initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, 855 bool pseudoObsIono) { 810 856 unsigned trafoObs = 0; 811 857 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 812 char sys tem= OPT->systems()[iSys];858 char sys = OPT->systems()[iSys]; 813 859 int satNum = 0; 814 860 for (unsigned jj = 0; jj < allObs.size(); jj++) { 815 if (allObs[jj]->prn().system() == sys tem) {861 if (allObs[jj]->prn().system() == sys) { 816 862 satNum++; 817 863 } 818 864 } 865 if (!satNum) { 866 continue; 867 } 819 868 // all LCs 820 unsigned realUsedLCs = OPT->LCs(sys tem).size();869 unsigned realUsedLCs = OPT->LCs(sys).size(); 821 870 // exclude pseudo obs GIM 822 if (OPT->_pseudoObsIono ) {871 if (OPT->_pseudoObsIono && !pseudoObsIono) { 823 872 realUsedLCs -= 1; 824 873 } … … 828 877 trafoObs += satNum * realUsedLCs; 829 878 830 if (OPT->_pseudoObsTropo ) {879 if (OPT->_pseudoObsTropo && _datumTrafo->firstSystem(sys)) { 831 880 trafoObs += 1; 832 881 } 833 834 } 835 _datumTrafo->setObsNum(trafoObs); 836 _datumTrafo->setParNum(_parlist->nPar()); 882 if (OPT->_pseudoObsIono && pseudoObsIono) { 883 trafoObs -= 1; // pseudo obs iono with respect to refSat 884 } 885 } 886 _datumTrafo->setNumObs(trafoObs); 887 _datumTrafo->setNumPar(_parlist->nPar()); 837 888 _datumTrafo->initAA(); 838 889 } -
trunk/BNC/src/PPP/pppFilter.h
r9386 r9419 24 24 25 25 t_irc datumTransformation(); 26 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs); 26 void initDatumTransformation(const std::vector<t_pppSatObs*>& allObs, bool pseudoObsIono); 27 unsigned setTrafoObs(); 27 28 28 29 const ColumnVector& x() const {return _xFlt;} … … 79 80 class t_datumTrafo { 80 81 public: 81 t_datumTrafo () {initIndices();} 82 void initIndices() {_firstRow = 1; _lastRow = 0;} 83 void setFirstSystem(bool firstSys) {_firstSys = firstSys;} 84 bool firstSystem() {return _firstSys;} 85 void updateIndices(int maxObsSys) { 86 if (firstSystem()) { 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 97 bool firstSystem(char sys) { 98 if (_firstSys == sys) { 99 return true; 100 } 101 return false; 102 } 103 104 void updateIndices(char sys, int maxObsSys) { 105 if (firstSystem(sys)) { 87 106 initIndices(); 88 107 } … … 90 109 _firstRow = _lastRow + 1; 91 110 } 92 _lastRow += maxObsSys; 93 111 _lastRow += maxObsSys;//LOG << "updateIndices: lastRow: " << _lastRow << endl; 94 112 }; 95 void setObsNum(int maxObs) {_maxObs = maxObs;} 96 void setParNum(int numPar) {_numPar = numPar;} 97 int obsNum() {return _maxObs;} 98 int parNum() {return _numPar;} 113 114 void setNumObs(int maxObs) {_maxObs = maxObs;} 115 void setNumPar(int numPar) { _numPar = numPar;} 116 void setLastEpoParlist(t_pppParlist* parlist) {_parlist = parlist;} 117 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 99 126 const Matrix& AA1() {return _AA1;} 100 127 const Matrix& AA2() {return _AA2;} 101 102 void initAA() { 128 const Matrix& D21() {return _D21;} 129 130 void initAA() {//LOG << "initAA: _maxObs: " << _maxObs << " _numPar: " << _numPar << endl; 103 131 _AA1.ReSize(_maxObs, _numPar); _AA1 = 0.0; 104 132 _AA2.ReSize(_maxObs, _numPar); _AA2 = 0.0; 133 _D21.ReSize(_numPar, _numPar); _D21 = 0.0; 105 134 } 106 135 … … 112 141 Prep->SubMatrix(_firstRow, _lastRow, 1, _numPar) << AA; 113 142 } 143 114 144 void switchAA() { 115 145 _AA1 = _AA2; 116 146 } 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 } 147 148 t_irc computeTrafoMatrix() { 149 if (((_AA2.t() * _AA2)).Determinant() == 0.0) { 150 LOG << "(_AA2.t() * _AA2).inv() is singular" << endl; 151 return failure; 152 } 153 _D21 = ((_AA2.t() * _AA2).i()) * _AA2.t() * _AA1; 154 return success; 155 } 156 127 157 void printMatrix(const Matrix& X, int nRow, int nCol) { 128 158 for (int rr = 0; rr < nRow; rr++) { … … 134 164 LOG << endl; 135 165 } 136 166 private: 137 167 int _firstRow; 138 168 int _lastRow; 139 169 Matrix _AA1; 140 170 Matrix _AA2; 141 bool _firstSys; 171 Matrix _D21; 172 char _firstSys; 142 173 int _maxObs; 143 174 int _numPar; 144 175 QMap<char, t_prn> _refSatMapPseudoObs; 176 t_pppParlist* _parlist; 145 177 }; 146 178 -
trunk/BNC/src/PPP/pppParlist.cpp
r9399 r9419 121 121 _sigma0 = OPT->_aprSigCodeBias; 122 122 break; 123 case pBiasG1: case pBiasE1: case pBias C1:124 case pBiasG2: case pBiasE2: case pBias C2:123 case pBiasG1: case pBiasE1: case pBiasR1: case pBiasC1: 124 case pBiasG2: case pBiasE2: case pBiasR2: case pBiasC2: 125 125 _epoSpec = true; 126 126 _sigma0 = OPT->_aprSigPhaseBias; … … 261 261 if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 262 262 break; 263 case pBiasR1: 264 if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 265 break; 263 266 case pBiasE1: 264 267 if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} … … 269 272 case pBiasG2: 270 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;} 271 277 break; 272 278 case pBiasE2: … … 320 326 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " G "; 321 327 break; 322 case cBiasR1: 323 case cBiasR2: 328 case cBiasR1: case pBiasR1: 329 case cBiasR2: case pBiasR2: 324 330 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " R "; 325 331 break; … … 351 357 // 352 358 //////////////////////////////////////////////////////////////////////////// 353 t_irc t_pppParlist::set(const bncTime& epoTime, 354 const std::vector<t_pppSatObs*>& obsVector, 359 t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector, 355 360 const QMap<char, t_pppRefSat*>& refSatMap) { 356 361 … … 374 379 } 375 380 } 381 376 382 else if (par->type() == t_pppParam::amb) { 377 char system = par->prn().system(); 378 t_prn refPrn = t_prn(); 379 if (OPT->_refSatRequired) { 380 refPrn = (refSatMap[system])->prn(); 381 } 382 if ((par->lastObsTime().valid() && 383 (epoTime - par->lastObsTime() > 60.0)) || 384 (refPrn == par->prn())) { 385 remove = true; 383 if (OPT->_obsModelType == OPT->DCMcodeBias || OPT->_obsModelType == OPT->DCMphaseBias) { 384 t_prn refPrn = (refSatMap[par->prn().system()])->prn(); 385 if (par->lastObsTime().valid() && 386 ((epoTime - par->lastObsTime() > 1.0) || (par->prn() == refPrn))) { 387 remove = true; 388 } 389 } 390 else { 391 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) { 392 remove = true; 393 } 386 394 } 387 395 } … … 420 428 } 421 429 430 // Check if ambiguity parameters have observations 431 // ----------------------------------------------- 432 if (OPT->_obsModelType == OPT->DCMcodeBias || 433 OPT->_obsModelType == OPT->DCMphaseBias) { 434 vector<t_pppParam*>::iterator it = _params.begin(); 435 while (it != _params.end()) { 436 t_pppParam* par = *it; 437 bool remove = false; 438 if (par->type() == t_pppParam::amb && !par->lastObsTime().valid()) { 439 remove = true; 440 } 441 if (remove) { 442 delete par; 443 it = _params.erase(it); 444 } 445 else { 446 ++it; 447 } 448 } 449 } 450 451 // check which systems have observations 452 // ------------------------------------- 453 _usedSystems.clear(); 454 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 455 const t_pppSatObs* satObs = obsVector[jj]; 456 char sys = satObs->prn().system(); 457 if (!_usedSystems.contains(sys)) { 458 _usedSystems.append(sys); 459 } 460 } 461 462 if (_usedSystems.size() > 1 && 463 !_usedSystems.contains('G')) { // required to setup ISB w. r. t. GPS 464 return failure; 465 } 466 422 467 // Required Set of Parameters 423 468 // -------------------------- … … 433 478 // -------------------- 434 479 if (OPT->_obsModelType == OPT->DCMcodeBias) { 435 if ( OPT->useSystem('G')) {480 if (_usedSystems.contains('G')) { 436 481 required.push_back(new t_pppParam(t_pppParam::cBiasG1, t_prn(), t_lc::c1)); 437 482 required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2)); 438 483 } 439 if ( OPT->useSystem('R')) {484 if (_usedSystems.contains('R')) { 440 485 required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1)); 441 486 required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2)); 442 487 } 443 if ( OPT->useSystem('E')) {488 if (_usedSystems.contains('E')) { 444 489 required.push_back(new t_pppParam(t_pppParam::cBiasE1, t_prn(), t_lc::c1)); 445 490 required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2)); 446 491 } 447 if ( OPT->useSystem('C')) {492 if (_usedSystems.contains('C')) { 448 493 required.push_back(new t_pppParam(t_pppParam::cBiasC1, t_prn(), t_lc::c1)); 449 494 required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2)); … … 455 500 if ((OPT->_obsModelType == OPT->DCMphaseBias) || 456 501 (OPT->_obsModelType == OPT->PPPRTK) ) { 457 if ( OPT->useSystem('G')) {502 if (_usedSystems.contains('G')) { 458 503 required.push_back(new t_pppParam(t_pppParam::pBiasG1, t_prn(), t_lc::l1)); 459 504 required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2)); 460 505 } 461 if (OPT->useSystem('E')) { 506 if (_usedSystems.contains('R')) { 507 required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1)); 508 required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2)); 509 } 510 if (_usedSystems.contains('E')) { 462 511 required.push_back(new t_pppParam(t_pppParam::pBiasE1, t_prn(), t_lc::l1)); 463 512 required.push_back(new t_pppParam(t_pppParam::pBiasE2, t_prn(), t_lc::l2)); 464 513 } 465 if ( OPT->useSystem('C')) {514 if (_usedSystems.contains('C')) { 466 515 required.push_back(new t_pppParam(t_pppParam::pBiasC1, t_prn(), t_lc::l1)); 467 516 required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2)); 468 517 } 469 518 } 519 470 520 // Receiver Clock 471 521 // -------------- … … 474 524 // GPS-GLONASS Clock Offset 475 525 // ------------------------ 476 if ( OPT->useSystem('R') && OPT->useSystem('G')) {526 if (_usedSystems.contains('G') && _usedSystems.contains('R')) { 477 527 required.push_back(new t_pppParam(t_pppParam::offGR, t_prn(), t_lc::dummy)); 478 528 } 479 529 480 // 530 //GPS-Galileo Clock Offset 481 531 // ------------------------ 482 if ( OPT->useSystem('E') && OPT->useSystem('G')) {532 if (_usedSystems.contains('G') && _usedSystems.contains('E')) { 483 533 required.push_back(new t_pppParam(t_pppParam::offGE, t_prn(), t_lc::dummy)); 484 534 } … … 486 536 // GPS-BDS Clock Offset 487 537 // ------------------------ 488 if ( OPT->useSystem('C') && OPT->useSystem('G')) {538 if (_usedSystems.contains('G') && _usedSystems.contains('C')) { 489 539 required.push_back(new t_pppParam(t_pppParam::offGC, t_prn(), t_lc::dummy)); 490 540 } … … 509 559 // ----------- 510 560 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 511 const t_pppSatObs* 561 const t_pppSatObs* satObs = obsVector[jj]; 512 562 if ((OPT->_obsModelType == OPT->IF) || 513 563 (OPT->_obsModelType == OPT->PPPRTK) || -
trunk/BNC/src/PPP/pppParlist.h
r9399 r9419 16 16 public: 17 17 enum e_type {crdX, crdY, crdZ, clkR, trp, ion, amb, offGR, offGE, offGC, 18 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBias E1, pBiasC1,19 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBias E2, pBiasC2};18 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 19 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; 20 20 21 21 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0); … … 114 114 private: 115 115 std::vector<t_pppParam*> _params; 116 QList<char> _usedSystems; 116 117 }; 117 118 -
trunk/BNC/src/PPP/pppSatObs.h
r9386 r9419 44 44 bool outlier() const {return _outlier;} 45 45 void setOutlier() {_outlier = true;} 46 void resetOutlier() {_outlier = false;} 46 47 void setRes(t_lc::type tLC, double res); 47 48 double getRes(t_lc::type tLC) const;
Note:
See TracChangeset
for help on using the changeset viewer.