Changeset 10003 in ntrip


Ignore:
Timestamp:
Mar 16, 2023, 10:06:39 AM (14 months ago)
Author:
stuerze
Message:

minor changes

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

Legend:

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

    r10002 r10003  
    7373  }
    7474
    75   _offGG = 0.0;
     75  _offGlo = 0.0;
     76  _offGal = 0.0;
     77  _offBds = 0.0;
    7678  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7779}
     
    357359// Compute A Priori GPS-Glonass Offset
    358360//////////////////////////////////////////////////////////////////////////////
    359 double t_pppClient::cmpOffGG(vector<t_pppSatObs*>& obsVector) {
     361double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) {
    360362
    361363  t_lc::type tLC   = t_lc::dummy;
    362   double     offGG = 0.0;
     364  double     offGlo = 0.0;
    363365
    364366  if (OPT->useSystem('R')) {
    365367
    366368    while (obsVector.size() > 0) {
    367       offGG = 0.0;
     369      offGlo = 0.0;
    368370      double   maxRes      = 0.0;
    369371      int      maxResIndex = -1;
     
    379381            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    380382            ++nObs;
    381             offGG += ll;
     383            offGlo += ll;
    382384            if (fabs(ll) > fabs(maxRes)) {
    383385              maxRes      = ll;
     
    390392
    391393      if (nObs > 0) {
    392         offGG = offGG / nObs;
     394        offGlo = offGlo / nObs;
    393395      }
    394396      else {
    395         offGG = 0.0;
     397        offGlo = 0.0;
    396398      }
    397399
    398400      if (fabs(maxRes) > 1000.0) {
    399         LOG << "t_pppClient::cmpOffGG outlier " << maxResPrn.toString() << " " << maxRes << endl;
     401        LOG << "t_pppClient::cmpOffGlo outlier " << maxResPrn.toString() << " " << maxRes << endl;
    400402        obsVector.erase(obsVector.begin() + maxResIndex);
    401403      }
     
    406408  }
    407409
    408   return offGG;
    409 }
    410 
     410  return offGlo;
     411}
     412
     413// Compute A Priori GPS-Galileo Offset
     414//////////////////////////////////////////////////////////////////////////////
     415double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) {
     416
     417  t_lc::type tLC   = t_lc::dummy;
     418  double     offGal = 0.0;
     419
     420  if (OPT->useSystem('E')) {
     421
     422    while (obsVector.size() > 0) {
     423      offGal = 0.0;
     424      double   maxRes      = 0.0;
     425      int      maxResIndex = -1;
     426      t_prn    maxResPrn;
     427      unsigned nObs        = 0;
     428      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     429        t_pppSatObs* satObs = obsVector.at(ii);
     430        if (satObs->prn().system() == 'E') {
     431          if (tLC == t_lc::dummy) {
     432            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     433          }
     434          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) {
     435            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     436            ++nObs;
     437            offGal += ll;
     438            if (fabs(ll) > fabs(maxRes)) {
     439              maxRes      = ll;
     440              maxResIndex = ii;
     441              maxResPrn   = satObs->prn();
     442            }
     443          }
     444        }
     445      }
     446
     447      if (nObs > 0) {
     448        offGal = offGal / nObs;
     449      }
     450      else {
     451        offGal = 0.0;
     452      }
     453
     454      if (fabs(maxRes) > 1000.0) {
     455        LOG << "t_pppClient::cmpOffGal outlier " << maxResPrn.toString() << " " << maxRes << endl;
     456        obsVector.erase(obsVector.begin() + maxResIndex);
     457      }
     458      else {
     459        break;
     460      }
     461    }
     462  }
     463
     464  return offGal;
     465}
     466
     467
     468// Compute A Priori GPS-BDS Offset
     469//////////////////////////////////////////////////////////////////////////////
     470double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) {
     471
     472  t_lc::type tLC   = t_lc::dummy;
     473  double     offBds = 0.0;
     474
     475  if (_opt->useSystem('C')) {
     476    while (obsVector.size() > 0) {
     477      offBds = 0.0;
     478      double   maxRes      = 0.0;
     479      int      maxResIndex = -1;
     480      t_prn    maxResPrn;
     481      unsigned nObs        = 0;
     482      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     483        const t_pppSatObs* satObs = obsVector.at(ii);
     484        if (satObs->prn().system() == 'C') {
     485          if (tLC == t_lc::dummy) {
     486            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     487          }
     488          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     489            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     490            ++nObs;
     491            offBds += ll;
     492            if (fabs(ll) > fabs(maxRes)) {
     493              maxRes      = ll;
     494              maxResIndex = ii;
     495              maxResPrn   = satObs->prn();
     496            }
     497          }
     498        }
     499      }
     500
     501      if (nObs > 0) {
     502        offBds = offBds / nObs;
     503      }
     504      else {
     505        offBds = 0.0;
     506      }
     507
     508      if (fabs(maxRes) >  1000.0) {
     509        LOG << "t_pppClient::cmpOffBds outlier " << maxResPrn.toString() << " " << maxRes << endl;
     510        delete obsVector.at(maxResIndex);
     511        obsVector.erase(obsVector.begin() + maxResIndex);
     512      }
     513      else {
     514        break;
     515      }
     516    }
     517  }
     518  return offBds;
     519}
    411520//
    412521//////////////////////////////////////////////////////////////////////////////
     
    586695      }
    587696
    588       _offGG = cmpOffGG(_obsRover);
     697      _offGlo = cmpOffGlo(_obsRover);
     698      _offGal = cmpOffGal(_obsRover);
     699      _offBds = cmpOffBds(_obsRover);
    589700
    590701      // Prepare Pseudo Observations of the Rover
  • trunk/BNC/src/PPP/pppClient.h

    r10002 r10003  
    3838  const bncAntex*     antex() const {return _antex;}
    3939  const t_pppStation* staRover() const {return _staRover;}
    40   double              offGG() const {return _offGG;}
     40  double              offGlo() const {return _offGlo;}
     41  double              offGal() const {return _offGal;}
     42  double              offBds() const {return _offBds;}
    4143
    4244  std::ostringstream& log() {return *_log;}
     
    6163  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
    6264                    ColumnVector& xyzc, bool print);
    63   double cmpOffGG(std::vector<t_pppSatObs*>& obsVector);
     65  double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector);
     66  double cmpOffGal(std::vector<t_pppSatObs*>& obsVector);
     67  double cmpOffBds(std::vector<t_pppSatObs*>& obsVector);
    6468  t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector);
    6569  void setRefSatellites(std::vector<t_pppSatObs*>& obsVector);
     
    7377  bncAntex*                 _antex;
    7478  t_pppFilter*              _filter;
    75   double                    _offGG;
     79  double                    _offGlo;
     80  double                    _offGal;
     81  double                    _offBds;
    7682  std::vector<t_pppSatObs*> _obsRover;
    7783  QMap<char, t_pppRefSat*>  _refSatMap;
  • trunk/BNC/src/PPP/pppFilter.cpp

    r10002 r10003  
    354354              << t_lc::toString(maxOutlierLC) << ' ' << obs->prn().toString()
    355355              << ' ' << setw(8) << setprecision(4) << maxOutlier << endl;
    356           //break;
     356          break;
    357357        } //else {obs->setOutlier(); }
    358358      } else {    // fin-processing
  • trunk/BNC/src/PPP/pppFilter.h

    r9642 r10003  
    128128      _D21.ReSize(_numPar, _numPar); _D21 = 0.0;
    129129    }
    130     t_irc prepareAA(const Matrix& AA, int ind) {//LOG << "prepare AA" << ind << "\n";
     130    t_irc prepareAA(const Matrix& AA, int ind) {LOG << "prepare AA" << ind << "\n";
    131131      Matrix* Prep = &_AA2;
    132132      if (ind == 1) {
    133133        Prep = &_AA1;
    134134      }
    135       //LOG << "_firstRow: " << _firstRow << " _lastRow: " << _lastRow << " _numPar " << _numPar << std::endl;
     135      LOG << "_firstRow: " << _firstRow << " _lastRow: " << _lastRow << " _numPar " << _numPar << std::endl;
     136      LOG << "t_pppFilter::prepareAA: AA.Ncols() > _numPar? " << AA.Ncols() << " / " << _numPar << std::endl;
    136137      if (AA.Ncols() > _numPar) {
    137138        LOG << "t_pppFilter::prepareAA: AA.Ncols() > _numPar: " << AA.Ncols() << " > " << _numPar << std::endl;
  • trunk/BNC/src/PPP/pppParlist.cpp

    r10002 r10003  
    7474         const t_pppSatObs* obs = obsVector->at(ii);
    7575         if (obs->prn() == _prn) {
    76            double offGG = 0;
     76           double offGlo = 0;
    7777           if (_prn.system() == 'R' && tLC != t_lc::MW) {
    78              offGG = PPP_CLIENT->offGG();
     78             offGlo = PPP_CLIENT->offGlo();
    7979           }
    80            _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     80           double offGal = 0;
     81           if (_prn.system() == 'E' && tLC != t_lc::MW) {
     82             offGal = PPP_CLIENT->offGal();
     83           }
     84           double offBds = 0;
     85           if (_prn.system() == 'C' && tLC != t_lc::MW) {
     86             offBds = PPP_CLIENT->offBds();
     87           }
     88           _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    8189           break;
    8290         }
     
    8492     }
    8593     break;
    86    case offGG:
     94   case offGlo:
    8795     _epoSpec = true;
    8896     _sigma0  = OPT->_aprSigClk;
    89      _x0      = PPP_CLIENT->offGG();
    90      break;     
     97     _x0      = PPP_CLIENT->offGlo();
     98     break;
     99   case offGal:
     100     _epoSpec = true;
     101     _sigma0  = OPT->_aprSigClk;
     102     _x0      = PPP_CLIENT->offGal();
     103     break;
     104   case offBds:
     105     _epoSpec = true;
     106     _sigma0  = OPT->_aprSigClk;
     107     _x0      = PPP_CLIENT->offBds();
     108     break;
    91109   case trp:
    92110     _epoSpec = false;
     
    176194    if (tLC == t_lc::GIM) {return 0.0;}
    177195    return 1.0;
    178   case offGG:
     196  case offGlo:
    179197    if (tLC == t_lc::GIM) {return 0.0;}
    180198    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
     199  case offGal:
     200    if (tLC == t_lc::GIM) {return 0.0;}
     201    return (obs->prn().system() == 'E') ? 1.0 : 0.0;
     202  case offBds:
     203    if (tLC == t_lc::GIM) {return 0.0;}
     204    return (obs->prn().system() == 'C') ? 1.0 : 0.0;
    181205  case amb:
    182206    if      (tLC == t_lc::GIM) {return 0.0;}
     
    304328    ss << "REC_CLK     ";
    305329    break;
    306   case offGG:
    307     ss << "OFF_GLO      ";
     330  case offGlo:
     331    ss << "OFF_GLO     ";
     332    break;
     333  case offGal:
     334    ss << "OFF GAL     ";
     335    break;
     336  case offBds:
     337    ss << "OFF_BDS     ";
    308338    break;
    309339  case trp:
     
    663693  required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy));
    664694
    665   // GPS-Glonass Clock Offset
    666   // ------------------------
    667   if (OPT->useSystem('R')) {
    668     required.push_back(new t_pppParam(t_pppParam::offGG, t_prn(), t_lc::dummy));
     695  // Glonass Clock Offset
     696  // --------------------
     697  if (_usedSystems.contains('R')  && (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
     698    required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
     699  }
     700
     701  // Galileo Clock Offset
     702  // --------------------
     703  if (_usedSystems.contains('E') && _usedSystems.contains('G')) {
     704    required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
     705  }
     706
     707  // BDS Clock Offset
     708  // ----------------
     709  if (_usedSystems.contains('C')  && (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
     710    required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
    669711  }
    670712
  • trunk/BNC/src/PPP/pppParlist.h

    r10002 r10003  
    1515class t_pppParam {
    1616 public:
    17   enum e_type {crdX, crdY, crdZ, clkR, offGG, trp, ion, amb,
     17  enum e_type {crdX, crdY, crdZ, clkR, offGlo, offGal, offBds, trp, ion, amb,
    1818               cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
    1919               cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
Note: See TracChangeset for help on using the changeset viewer.