Changeset 9471 in ntrip for branches/BNC_2.12/src/PPP_SSR_I/pppFilter.cpp
 Timestamp:
 Jul 5, 2021, 11:51:17 AM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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) {
Note:
See TracChangeset
for help on using the changeset viewer.