Changeset 9471 in ntrip
 Timestamp:
 Jul 5, 2021, 11:51:17 AM (3 months ago)
 Location:
 branches/BNC_2.12/src/PPP_SSR_I
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/BNC_2.12/src/PPP_SSR_I/pppClient.cpp
r8541 r9471 99 99 satData>P2 = 0.0; 100 100 satData>P5 = 0.0; 101 satData>P6 = 0.0; 101 102 satData>P7 = 0.0; 102 103 satData>L1 = 0.0; 103 104 satData>L2 = 0.0; 104 105 satData>L5 = 0.0; 106 satData>L6 = 0.0; 105 107 satData>L7 = 0.0; 106 108 for (unsigned ifrq = 0; ifrq < obs>_obs.size(); ifrq++) { … … 115 117 cb = bias._value; 116 118 } 119 // FIXME: use C/Q bias for X observations 120 // qDebug() << satData>prn << frqObs>_rnxType2ch.c_str(); 117 121 } 118 122 } … … 130 134 if (frqObs>_codeValid) satData>P5 = frqObs>_code + cb; 131 135 if (frqObs>_phaseValid) satData>L5 = frqObs>_phase; 136 if (frqObs>_slip) satData>slipFlag = true; 137 } 138 else if (frqObs>_rnxType2ch[0] == '6') { 139 if (frqObs>_codeValid) satData>P6 = frqObs>_code + cb; 140 if (frqObs>_phaseValid) satData>L6 = frqObs>_phase; 132 141 if (frqObs>_slip) satData>slipFlag = true; 133 142 } … … 276 285 //  277 286 else if (satData>system() == 'C' && _opt>useSystem('C')) { 278 if (satData>P2 != 0.0 && satData>P 7!= 0.0 &&279 satData>L2 != 0.0 && satData>L 7!= 0.0 ) {287 if (satData>P2 != 0.0 && satData>P6 != 0.0 && 288 satData>L2 != 0.0 && satData>L6 != 0.0 ) { 280 289 double f2 = t_CST::freq(t_frequency::C2, 0); 281 double f 7 = t_CST::freq(t_frequency::C7, 0);282 double a2 = f2 * f2 / (f2 * f2  f 7 * f7);283 double a 7 =  f7 * f7 / (f2 * f2  f7 * f7);290 double f6 = t_CST::freq(t_frequency::C6, 0); 291 double a2 = f2 * f2 / (f2 * f2  f6 * f6); 292 double a6 =  f6 * f6 / (f2 * f2  f6 * f6); 284 293 satData>L2 = satData>L2 * t_CST::c / f2; 285 satData>L 7 = satData>L7 * t_CST::c / f7;286 satData>P3 = a2 * satData>P2 + a 7 * satData>P7;287 satData>L3 = a2 * satData>L2 + a 7 * satData>L7;288 satData>lambda3 = a2 * t_CST::c / f2 + a 7 * t_CST::c / f7;294 satData>L6 = satData>L6 * t_CST::c / f6; 295 satData>P3 = a2 * satData>P2 + a6 * satData>P6; 296 satData>L3 = a2 * satData>L2 + a6 * satData>L6; 297 satData>lambda3 = a2 * t_CST::c / f2 + a6 * t_CST::c / f6; 289 298 satData>lkA = a2; 290 satData>lkB = a 7;299 satData>lkB = a6; 291 300 _epoData>satData[satData>prn] = satData; 292 301 } 
branches/BNC_2.12/src/PPP_SSR_I/pppFilter.cpp
r9281 r9471 55 55 using namespace std; 56 56 57 const double MAXRES_CODE = 2.98 * 3.0;58 const double MAXRES_PHASE_GPS = 0.04;59 const double MAXRES_PHASE_GLONASS = 2.98 * 0.03;60 57 const double GLONASS_WEIGHT_FACTOR = 5.0; 61 const double BDS_WEIGHT_FACTOR = 5.0;58 const double BDS_WEIGHT_FACTOR = 2.0; // 5.0; 62 59 63 60 #define LOG (_pppClient>log()) … … 352 349 353 350 double offset = 0.0; 354 t_frequency::type frqA = t_frequency::G1; 355 t_frequency::type frqB = t_frequency::G2; 351 352 t_frequency::type frqA; 353 t_frequency::type frqB; 354 356 355 if (satData>prn[0] == 'R') { 357 356 offset = Glonass_offset(); … … 367 366 offset = Bds_offset(); 368 367 frqA = t_frequency::C2; 369 frqB = t_frequency::C7; 370 } 368 frqB = t_frequency::C6; 369 } 370 else { 371 frqA = t_frequency::G1; 372 frqB = t_frequency::G2; 373 } 374 371 375 double phaseCenter = 0.0; 376 372 377 if (_antex) { 373 378 bool found; … … 535 540 //  536 541 else if (pp>type == t_pppParam::GALILEO_OFFSET) { 537 _QQ(iPar,iPar) += 0.1 * 0.1; 542 if (_QQ(iPar,iPar)>pow(1000.0,2)) 543 _QQ(iPar,iPar) = 1000.0 * 1000.0; 544 else 545 _QQ(iPar,iPar) += 0.1 * 0.1; 538 546 } 539 547 … … 541 549 //  542 550 else if (pp>type == t_pppParam::BDS_OFFSET) { 543 _QQ(iPar,iPar) += 0.1 * 0.1; //TODO: TEST 551 if (_QQ(iPar,iPar)>pow(1000.0,2)) 552 _QQ(iPar,iPar) = 1000.0 * 1000.0; 553 else 554 _QQ(iPar,iPar) += 0.1 * 0.1; 544 555 } 545 556 } … … 746 757 } 747 758 759 // Iono combi noise factor 760 //////////////////////////////////////////////////////////////////////////// 761 double ionFac(const QString prn, QMap<QString, t_satData*>& satData) { 762 if (satData.contains(prn)) 763 return sqrt(pow(satData.value(prn)>lkA,2) + 764 pow(satData.value(prn)>lkB,2) ); 765 else 766 return 0.0; 767 }; 768 748 769 // Outlier Detection 749 770 //////////////////////////////////////////////////////////////////////////// … … 755 776 QString prnGPS; 756 777 QString prnGlo; 778 779 double ionFacGPS; 780 double ionFacGLO; 781 757 782 double maxResGPS = 0.0; // GPS + Galileo 758 783 double maxResGlo = 0.0; // GLONASS + BDS 784 759 785 findMaxRes(vv, satData, prnGPS, prnGlo, maxResGPS, maxResGlo); 760 786 787 ionFacGLO = ionFac(prnGlo,satData); 788 if (iPhase == 0) 789 ionFacGLO *= (prnGlo[0]=='R'? GLONASS_WEIGHT_FACTOR : BDS_WEIGHT_FACTOR); 790 ionFacGPS = ionFac(prnGPS,satData); 791 761 792 if (iPhase == 1) { 762 if (maxResGlo > 2.98* OPT>_maxResL1) {793 if (maxResGlo > ionFacGLO * OPT>_maxResL1) { 763 794 LOG << "Outlier Phase " << prnGlo.mid(0,3).toAscii().data() << ' ' << maxResGlo << endl; 764 795 return prnGlo; 765 796 } 766 else if (maxResGPS > MAXRES_PHASE_GPS) {797 else if (maxResGPS > ionFacGPS * OPT>_maxResL1) { 767 798 LOG << "Outlier Phase " << prnGPS.mid(0,3).toAscii().data() << ' ' << maxResGPS << endl; 768 799 return prnGPS; 769 800 } 770 801 } 771 else if (iPhase == 0 && maxResGPS > 2.98 * OPT>_maxResC1) { 772 LOG << "Outlier Code " << prnGPS.mid(0,3).toAscii().data() << ' ' << maxResGPS << endl; 773 return prnGPS; 802 else if (iPhase == 0) { 803 if (maxResGlo > ionFacGLO * OPT>_maxResC1) { 804 LOG << "Outlier Code " << prnGlo.mid(0,3).toLatin1().data() << ' ' << maxResGlo << endl; 805 return prnGlo; 806 } 807 else if (maxResGPS > ionFacGPS * OPT>_maxResC1) { 808 LOG << "Outlier Code " << prnGPS.mid(0,3).toLatin1().data() << ' ' << maxResGPS << endl; 809 return prnGPS; 810 } 774 811 } 775 812 … … 780 817 /////////////////////////////////////////////////////////////////////////// 781 818 double t_pppFilter::windUp(const QString& prn, const ColumnVector& rSat, 782 const ColumnVector& rRec) {819 const ColumnVector& rRec) { 783 820 784 821 Tracer tracer("t_pppFilter::windUp"); … … 919 956 satData>obsIndex = iObs; 920 957 958 // Ionofree combination noise factor 959 //  960 double ionFac = sqrt(pow(satData>lkA,2) + pow(satData>lkB,2)); 961 921 962 // Phase Observations 922 963 //  923 964 924 965 if (iPhase == 1) { 925 ll(iObs) = satData>L3  cmpValue(satData, true); 926 double sigL3 = 2.98 * OPT>_sigmaL1; 966 double sigL3 = ionFac * ellWgtCoef * OPT>_sigmaL1; 927 967 if (satData>system() == 'R') { 928 968 sigL3 *= GLONASS_WEIGHT_FACTOR; … … 931 971 sigL3 *= BDS_WEIGHT_FACTOR; 932 972 } 933 PP(iObs,iObs) = 1.0 / (sigL3 * sigL3) / (ellWgtCoef * ellWgtCoef); 973 satData>L3sig = sigL3; 974 ll(iObs) = satData>L3  cmpValue(satData, true); 975 PP(iObs,iObs) = 1.0 / (sigL3 * sigL3); 934 976 for (int iPar = 1; iPar <= _params.size(); iPar++) { 935 977 if (_params[iPar1]>type == t_pppParam::AMB_L3 && … … 944 986 //  945 987 else { 946 double sigP3 = 2.98 * OPT>_sigmaC1; 988 double sigP3 = ionFac * ellWgtCoef * OPT>_sigmaC1; 989 if (satData>system() == 'R') { 990 sigP3 *= GLONASS_WEIGHT_FACTOR; 991 } 992 if (satData>system() == 'C') { 993 sigP3 *= BDS_WEIGHT_FACTOR; 994 } 995 satData>P3sig = sigP3; 947 996 ll(iObs) = satData>P3  cmpValue(satData, false); 948 PP(iObs,iObs) = 1.0 / (sigP3 * sigP3) / (ellWgtCoef * ellWgtCoef);997 PP(iObs,iObs) = 1.0 / (sigP3 * sigP3); 949 998 for (int iPar = 1; iPar <= _params.size(); iPar++) { 950 999 AA(iObs, iPar) = _params[iPar1]>partial(satData, false); … … 1166 1215 } 1167 1216 1168 // Reme ber Original State Vector and VarianceCovariance Matrix1217 // Remember Original State Vector and VarianceCovariance Matrix 1169 1218 //////////////////////////////////////////////////////////////////////////// 1170 1219 void t_pppFilter::rememberState(t_epoData* epoData) { 
branches/BNC_2.12/src/PPP_SSR_I/pppFilter.h
r7933 r9471 50 50 P2 = 0.0; 51 51 P5 = 0.0; 52 P6 = 0.0; 52 53 P7 = 0.0; 53 54 P3 = 0.0; 55 P3sig = 0.0; 54 56 L1 = 0.0; 55 57 L2 = 0.0; 56 58 L5 = 0.0; 59 L6 = 0.0; 57 60 L7 = 0.0; 58 61 L3 = 0.0; 62 L3sig = 0.0; 59 63 lkA = 0.0; 60 64 lkB = 0.0; … … 72 76 double P2; 73 77 double P5; 78 double P6; 74 79 double P7; 75 80 double P3; 81 double P3sig; 76 82 double L1; 77 83 double L2; 78 84 double L5; 85 double L6; 79 86 double L7; 80 87 double L3; 88 double L3sig; 81 89 ColumnVector xx; 82 90 ColumnVector vv;
Note:
See TracChangeset
for help on using the changeset viewer.