Ignore:
Timestamp:
Jul 5, 2021, 11:51:17 AM (3 years ago)
Author:
stuerze
Message:

some changes regarding signal usage for BDS PPP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/PPP_SSR_I/pppFilter.cpp

    r9281 r9471  
    5555using namespace std;
    5656
    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;
    6057const double   GLONASS_WEIGHT_FACTOR = 5.0;
    61 const double   BDS_WEIGHT_FACTOR     = 5.0;
     58const double   BDS_WEIGHT_FACTOR     = 2.0; // 5.0;
    6259
    6360#define LOG (_pppClient->log())
     
    352349
    353350  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
    356355  if      (satData->prn[0] == 'R') {
    357356    offset = Glonass_offset();
     
    367366    offset = Bds_offset();
    368367    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
    371375  double phaseCenter = 0.0;
     376
    372377  if (_antex) {
    373378    bool found;
     
    535540      // --------------
    536541      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;
    538546      }
    539547
     
    541549      // ----------
    542550      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;
    544555      }
    545556    }
     
    746757}
    747758
     759// Iono combi noise factor
     760////////////////////////////////////////////////////////////////////////////
     761double 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
    748769// Outlier Detection
    749770////////////////////////////////////////////////////////////////////////////
     
    755776  QString prnGPS;
    756777  QString prnGlo;
     778
     779  double  ionFacGPS;
     780  double  ionFacGLO;
     781
    757782  double  maxResGPS = 0.0; // GPS + Galileo
    758783  double  maxResGlo = 0.0; // GLONASS + BDS
     784
    759785  findMaxRes(vv, satData, prnGPS, prnGlo, maxResGPS, maxResGlo);
    760786
     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
    761792  if      (iPhase == 1) {
    762     if      (maxResGlo > 2.98 * OPT->_maxResL1) {
     793    if      (maxResGlo > ionFacGLO * OPT->_maxResL1) {
    763794      LOG << "Outlier Phase " << prnGlo.mid(0,3).toAscii().data() << ' ' << maxResGlo << endl;
    764795      return prnGlo;
    765796    }
    766     else if (maxResGPS > MAXRES_PHASE_GPS) {
     797    else if (maxResGPS > ionFacGPS * OPT->_maxResL1) {
    767798      LOG << "Outlier Phase " << prnGPS.mid(0,3).toAscii().data() << ' ' << maxResGPS << endl;
    768799      return prnGPS;
    769800    }
    770801  }
    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    }
    774811  }
    775812
     
    780817///////////////////////////////////////////////////////////////////////////
    781818double t_pppFilter::windUp(const QString& prn, const ColumnVector& rSat,
    782                         const ColumnVector& rRec) {
     819                           const ColumnVector& rRec) {
    783820
    784821  Tracer tracer("t_pppFilter::windUp");
     
    919956  satData->obsIndex = iObs;
    920957
     958  // Iono-free combination noise factor
     959  // ----------------------------------
     960  double ionFac = sqrt(pow(satData->lkA,2) + pow(satData->lkB,2));
     961
    921962  // Phase Observations
    922963  // ------------------
    923964
    924965  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;
    927967    if (satData->system() == 'R') {
    928968      sigL3 *= GLONASS_WEIGHT_FACTOR;
     
    931971      sigL3 *= BDS_WEIGHT_FACTOR;
    932972    }
    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);
    934976    for (int iPar = 1; iPar <= _params.size(); iPar++) {
    935977      if (_params[iPar-1]->type == t_pppParam::AMB_L3 &&
     
    944986  // -----------------
    945987  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;
    947996    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);
    949998    for (int iPar = 1; iPar <= _params.size(); iPar++) {
    950999      AA(iObs, iPar) = _params[iPar-1]->partial(satData, false);
     
    11661215}
    11671216
    1168 // Remeber Original State Vector and Variance-Covariance Matrix
     1217// Remember Original State Vector and Variance-Covariance Matrix
    11691218////////////////////////////////////////////////////////////////////////////
    11701219void t_pppFilter::rememberState(t_epoData* epoData) {
Note: See TracChangeset for help on using the changeset viewer.