Changeset 8993 in ntrip for trunk


Ignore:
Timestamp:
Jul 21, 2020, 10:02:56 AM (4 years ago)
Author:
stuerze
Message:

minor changes in PPP

Location:
trunk/BNC/src/PPP
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.cpp

    r8961 r8993  
    7474  }
    7575  _offGG = 0.0;
     76  _offGB = 0.0;
    7677  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7778}
     
    382383}
    383384
     385// Compute A Priori GPS-BDS Offset
     386//////////////////////////////////////////////////////////////////////////////
     387double t_pppClient::cmpOffGB(vector<t_pppSatObs*>& obsVector) {
     388
     389  t_lc::type tLC   = t_lc::dummy;
     390  double     offGB = 0.0;
     391
     392  if (_opt->useSystem('C')) {
     393    while (obsVector.size() > 0) {
     394      offGB = 0.0;
     395      double   maxRes      = 0.0;
     396      int      maxResIndex = -1;
     397      t_prn    maxResPrn;
     398      unsigned nObs        = 0;
     399      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     400        const t_pppSatObs* satObs = obsVector.at(ii);
     401        if (satObs->prn().system() == 'C') {
     402          if (tLC == t_lc::dummy) {
     403            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     404          }
     405          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     406            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     407            ++nObs;
     408            offGB += ll;
     409            if (fabs(ll) > fabs(maxRes)) {
     410              maxRes      = ll;
     411              maxResIndex = ii;
     412              maxResPrn   = satObs->prn();
     413            }
     414          }
     415        }
     416      }
     417
     418      if (nObs > 0) {
     419        offGB = offGB / nObs;
     420      }
     421      else {
     422        offGB = 0.0;
     423      }
     424
     425      if (fabs(maxRes) > 1000.0) {
     426        LOG << "t_pppClient::cmpOffGB outlier " << maxResPrn.toString() << " " << maxRes << endl;
     427        delete obsVector.at(maxResIndex);
     428        obsVector.erase(obsVector.begin() + maxResIndex);
     429      }
     430      else {
     431        break;
     432      }
     433    }
     434  }
     435  return offGB;
     436}
     437
    384438//
    385439//////////////////////////////////////////////////////////////////////////////
     
    517571
    518572      _offGG = cmpOffGG(_obsRover);
     573      _offGB = cmpOffGB(_obsRover);
    519574
    520575      if (_opt->_refSatRequired) {
  • trunk/BNC/src/PPP/pppClient.h

    r8956 r8993  
    3838  const t_pppStation* staRover() const {return _staRover;}
    3939  double              offGG() const {return _offGG;}
     40  double              offGB() const {return _offGB;}
    4041
    4142  std::ostringstream& log() {return *_log;}
     
    6061                    ColumnVector& xyzc, bool print);
    6162  double cmpOffGG(std::vector<t_pppSatObs*>& obsVector);
     63  double cmpOffGB(std::vector<t_pppSatObs*>& obsVector);
    6264  void setRefSatellites(std::vector<t_pppSatObs*>& obsVector);
    6365
     
    7072  t_pppFilter*              _filter;
    7173  double                    _offGG;
     74  double                    _offGB;
    7275  std::vector<t_pppSatObs*> _obsRover;
    7376  std::ostringstream*       _log;
  • trunk/BNC/src/PPP/pppFilter.cpp

    r8965 r8993  
    361361      }
    362362      if (preProcessing) {
    363         if (par && obs->prn() == refPrn) {
     363        if      (par && obs->prn() == refPrn) {
    364364          _obsPool->setRefSatChangeRequired(true);
    365365          break;
     366        }
     367        else if (par && obs->prn() != refPrn) {
     368          par->setAmbResetCandidate();
    366369        }
    367370      }
  • trunk/BNC/src/PPP/pppParlist.cpp

    r8961 r8993  
    7878             offGG = PPP_CLIENT->offGG();
    7979           }
    80            _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     80           double offGB = 0;
     81           if (_prn.system() == 'C' && tLC != t_lc::MW) {
     82             offGB = PPP_CLIENT->offGB();
     83           }
     84           _x0 = floor((obs->obsValue(tLC) - offGG - offGB - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    8185           break;
    8286         }
     
    8892     _sigma0  = 1000.0;
    8993     _x0      = PPP_CLIENT->offGG();
     94     break;
     95   case offGB:
     96     _epoSpec = true;
     97     _sigma0  = 1000.0;
     98     _x0      = PPP_CLIENT->offGB();
    9099     break;
    91100   case trp:
     
    155164    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    156165    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
     166  case offGB:
     167    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
     168    return (obs->prn().system() == 'C') ? 1.0 : 0.0;
    157169  case amb:
    158170    if      (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
     
    267279    ss << "OGG        ";
    268280    break;
     281  case offGB:
     282    ss << "OGB        ";
     283    break;
    269284  case trp:
    270285    ss << "TRP        ";
     
    388403    required.push_back(new t_pppParam(t_pppParam::offGG, t_prn(), t_lc::dummy));
    389404  }
     405
     406  // GPS-BDS Clock Offset
     407  // ------------------------
     408  if (OPT->useSystem('C')) {
     409    required.push_back(new t_pppParam(t_pppParam::offGB, t_prn(), t_lc::dummy));
     410  }
     411
    390412
    391413  // Troposphere
  • trunk/BNC/src/PPP/pppParlist.h

    r8956 r8993  
    1515class t_pppParam {
    1616 public:
    17   enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, ion, cBias1, cBias2, pBias1, pBias2};
     17  enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, offGB, trp, ion, cBias1, cBias2, pBias1, pBias2};
    1818
    1919  t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
Note: See TracChangeset for help on using the changeset viewer.