Changeset 9288 in ntrip for trunk


Ignore:
Timestamp:
Nov 27, 2020, 10:38:03 AM (3 years ago)
Author:
stuerze
Message:

updates regarding inter system biases

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

Legend:

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

    r8993 r9288  
    7373    }
    7474  }
    75   _offGG = 0.0;
    76   _offGB = 0.0;
     75  _offGR = 0.0;
     76  _offGE = 0.0;
     77  _offGC = 0.0;
    7778  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7879}
     
    332333// Compute A Priori GPS-Glonass Offset
    333334//////////////////////////////////////////////////////////////////////////////
    334 double t_pppClient::cmpOffGG(vector<t_pppSatObs*>& obsVector) {
     335double t_pppClient::cmpOffGR(vector<t_pppSatObs*>& obsVector) {
    335336
    336337  t_lc::type tLC   = t_lc::dummy;
    337   double     offGG = 0.0;
     338  double     offGR = 0.0;
    338339
    339340  if (_opt->useSystem('R')) {
    340341    while (obsVector.size() > 0) {
    341       offGG = 0.0;
     342      offGR = 0.0;
    342343      double   maxRes      = 0.0;
    343344      int      maxResIndex = -1;
     
    353354            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    354355            ++nObs;
    355             offGG += ll;
     356            offGR += ll;
    356357            if (fabs(ll) > fabs(maxRes)) {
    357358              maxRes      = ll;
     
    364365
    365366      if (nObs > 0) {
    366         offGG = offGG / nObs;
     367        offGR = offGR / nObs;
    367368      }
    368369      else {
    369         offGG = 0.0;
     370        offGR = 0.0;
    370371      }
    371372
    372373      if (fabs(maxRes) > 1000.0) {
    373         LOG << "t_pppClient::cmpOffGG outlier " << maxResPrn.toString() << " " << maxRes << endl;
     374        LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
    374375        delete obsVector.at(maxResIndex);
    375376        obsVector.erase(obsVector.begin() + maxResIndex);
     
    380381    }
    381382  }
    382   return offGG;
     383  return offGR;
     384}
     385
     386// Compute A Priori GPS-Galileo Offset
     387//////////////////////////////////////////////////////////////////////////////
     388double t_pppClient::cmpOffGE(vector<t_pppSatObs*>& obsVector) {
     389
     390  t_lc::type tLC   = t_lc::dummy;
     391  double     offGE = 0.0;
     392
     393  if (_opt->useSystem('E')) {
     394    while (obsVector.size() > 0) {
     395      offGE = 0.0;
     396      double   maxRes      = 0.0;
     397      int      maxResIndex = -1;
     398      t_prn    maxResPrn;
     399      unsigned nObs        = 0;
     400      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     401        const t_pppSatObs* satObs = obsVector.at(ii);
     402        if (satObs->prn().system() == 'E') {
     403          if (tLC == t_lc::dummy) {
     404            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     405          }
     406          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     407            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     408            ++nObs;
     409            offGE += ll;
     410            if (fabs(ll) > fabs(maxRes)) {
     411              maxRes      = ll;
     412              maxResIndex = ii;
     413              maxResPrn   = satObs->prn();
     414            }
     415          }
     416        }
     417      }
     418
     419      if (nObs > 0) {
     420        offGE = offGE / nObs;
     421      }
     422      else {
     423        offGE = 0.0;
     424      }
     425
     426      if (fabs(maxRes) > 1000.0) {
     427        LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
     428        delete obsVector.at(maxResIndex);
     429        obsVector.erase(obsVector.begin() + maxResIndex);
     430      }
     431      else {
     432        break;
     433      }
     434    }
     435  }
     436  return offGE;
    383437}
    384438
    385439// Compute A Priori GPS-BDS Offset
    386440//////////////////////////////////////////////////////////////////////////////
    387 double t_pppClient::cmpOffGB(vector<t_pppSatObs*>& obsVector) {
     441double t_pppClient::cmpOffGC(vector<t_pppSatObs*>& obsVector) {
    388442
    389443  t_lc::type tLC   = t_lc::dummy;
    390   double     offGB = 0.0;
     444  double     offGC = 0.0;
    391445
    392446  if (_opt->useSystem('C')) {
    393447    while (obsVector.size() > 0) {
    394       offGB = 0.0;
     448      offGC = 0.0;
    395449      double   maxRes      = 0.0;
    396450      int      maxResIndex = -1;
     
    406460            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    407461            ++nObs;
    408             offGB += ll;
     462            offGC += ll;
    409463            if (fabs(ll) > fabs(maxRes)) {
    410464              maxRes      = ll;
     
    417471
    418472      if (nObs > 0) {
    419         offGB = offGB / nObs;
     473        offGC = offGC / nObs;
    420474      }
    421475      else {
    422         offGB = 0.0;
     476        offGC = 0.0;
    423477      }
    424478
    425479      if (fabs(maxRes) > 1000.0) {
    426         LOG << "t_pppClient::cmpOffGB outlier " << maxResPrn.toString() << " " << maxRes << endl;
     480        LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
    427481        delete obsVector.at(maxResIndex);
    428482        obsVector.erase(obsVector.begin() + maxResIndex);
     
    433487    }
    434488  }
    435   return offGB;
     489  return offGC;
    436490}
    437491
     
    570624      }
    571625
    572       _offGG = cmpOffGG(_obsRover);
    573       _offGB = cmpOffGB(_obsRover);
     626      _offGR = cmpOffGR(_obsRover);
     627      _offGE = cmpOffGE(_obsRover);
     628      _offGC = cmpOffGC(_obsRover);
    574629
    575630      if (_opt->_refSatRequired) {
  • trunk/BNC/src/PPP/pppClient.h

    r8993 r9288  
    3737  const bncAntex*     antex() const {return _antex;}
    3838  const t_pppStation* staRover() const {return _staRover;}
    39   double              offGG() const {return _offGG;}
    40   double              offGB() const {return _offGB;}
     39  double              offGR() const {return _offGR;}
     40  double              offGE() const {return _offGE;}
     41  double              offGC() const {return _offGC;}
    4142
    4243  std::ostringstream& log() {return *_log;}
     
    6061  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
    6162                    ColumnVector& xyzc, bool print);
    62   double cmpOffGG(std::vector<t_pppSatObs*>& obsVector);
    63   double cmpOffGB(std::vector<t_pppSatObs*>& obsVector);
     63  double cmpOffGR(std::vector<t_pppSatObs*>& obsVector);
     64  double cmpOffGE(std::vector<t_pppSatObs*>& obsVector);
     65  double cmpOffGC(std::vector<t_pppSatObs*>& obsVector);
    6466  void setRefSatellites(std::vector<t_pppSatObs*>& obsVector);
    6567
     
    7173  bncAntex*                 _antex;
    7274  t_pppFilter*              _filter;
    73   double                    _offGG;
    74   double                    _offGB;
     75  double                    _offGR;
     76  double                    _offGE;
     77  double                    _offGC;
    7578  std::vector<t_pppSatObs*> _obsRover;
    7679  std::ostringstream*       _log;
  • trunk/BNC/src/PPP/pppParlist.cpp

    r8993 r9288  
    7474         const t_pppSatObs* obs = obsVector->at(ii);
    7575         if (obs->prn() == _prn) {
    76            double offGG = 0;
     76           double offGR = 0;
    7777           if (_prn.system() == 'R' && tLC != t_lc::MW) {
    78              offGG = PPP_CLIENT->offGG();
     78             offGR = PPP_CLIENT->offGR();
    7979           }
    80            double offGB = 0;
     80           double offGE = 0;
     81           if (_prn.system() == 'E' && tLC != t_lc::MW) {
     82             offGE = PPP_CLIENT->offGE();
     83           }
     84           double offGC = 0;
    8185           if (_prn.system() == 'C' && tLC != t_lc::MW) {
    82              offGB = PPP_CLIENT->offGB();
     86             offGC = PPP_CLIENT->offGC();
    8387           }
    84            _x0 = floor((obs->obsValue(tLC) - offGG - offGB - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     88           _x0 = floor((obs->obsValue(tLC) - offGR -offGE - offGC - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    8589           break;
    8690         }
     
    8892     }
    8993     break;
    90    case offGG:
     94   case offGR:
    9195     _epoSpec = true;
    9296     _sigma0  = 1000.0;
    93      _x0      = PPP_CLIENT->offGG();
    94      break;
    95    case offGB:
     97     _x0      = PPP_CLIENT->offGR();
     98     break;
     99   case offGE:
    96100     _epoSpec = true;
    97101     _sigma0  = 1000.0;
    98      _x0      = PPP_CLIENT->offGB();
     102     _x0      = PPP_CLIENT->offGE();
     103     break;
     104   case offGC:
     105     _epoSpec = true;
     106     _sigma0  = 1000.0;
     107     _x0      = PPP_CLIENT->offGC();
    99108     break;
    100109   case trp:
     
    161170    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    162171    return 1.0;
    163   case offGG:
     172  case offGR:
    164173    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    165174    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
    166   case offGB:
     175  case offGE:
     176    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
     177    return (obs->prn().system() == 'E') ? 1.0 : 0.0;
     178  case offGC:
    167179    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    168180    return (obs->prn().system() == 'C') ? 1.0 : 0.0;
     
    276288    ss << "REC_CLK    ";
    277289    break;
    278   case offGG:
     290  case offGR:
    279291    ss << "OGG        ";
    280292    break;
    281   case offGB:
     293  case offGE:
     294    ss << "OGE        ";
     295    break;
     296  case offGC:
    282297    ss << "OGB        ";
    283298    break;
     
    401416  // ------------------------
    402417  if (OPT->useSystem('R')) {
    403     required.push_back(new t_pppParam(t_pppParam::offGG, t_prn(), t_lc::dummy));
     418    required.push_back(new t_pppParam(t_pppParam::offGR, t_prn(), t_lc::dummy));
     419  }
     420
     421  // GPS-Galileo Clock Offset
     422  // ------------------------
     423  if (OPT->useSystem('E')) {
     424    required.push_back(new t_pppParam(t_pppParam::offGE, t_prn(), t_lc::dummy));
    404425  }
    405426
     
    407428  // ------------------------
    408429  if (OPT->useSystem('C')) {
    409     required.push_back(new t_pppParam(t_pppParam::offGB, t_prn(), t_lc::dummy));
    410   }
    411 
     430    required.push_back(new t_pppParam(t_pppParam::offGC, t_prn(), t_lc::dummy));
     431  }
    412432
    413433  // Troposphere
  • trunk/BNC/src/PPP/pppParlist.h

    r8993 r9288  
    1515class t_pppParam {
    1616 public:
    17   enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, offGB, trp, ion, cBias1, cBias2, pBias1, pBias2};
     17  enum e_type {crdX, crdY, crdZ, clkR, amb, offGR, offGE, offGC, 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.