Changeset 10256 in ntrip


Ignore:
Timestamp:
Nov 25, 2023, 10:44:51 PM (5 months ago)
Author:
stuerze
Message:

changes regarding PPP

Location:
trunk/BNC/src
Files:
9 edited

Legend:

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

    r10254 r10256  
    6666    }
    6767  }
    68 
     68  _offGlo = 0.0;
     69  _offGal = 0.0;
     70  _offBds = 0.0;
    6971  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7072}
     
    210212    }
    211213  }
    212   /*
     214/*
    213215  vector<t_pppSatObs*>::iterator it = obsVector.begin();
    214216  while (it != obsVector.end()) {
     
    250252                                  vector<t_pppSatObs*>& obsVector,
    251253                                  ColumnVector& xyzc, bool print) {
    252 
    253254  t_lc::type tLC = t_lc::dummy;
     255  char sysBancroft = 'G';
     256  int  numBancroft = obsVector.size();
     257
     258  _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;
     259  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
     260    const t_pppSatObs* satObs = obsVector[jj];
     261    char sys = satObs->prn().system();
     262    _usedSystems[sys]++;
     263  }
     264
     265  if      ((numBancroft = _usedSystems.value('G'))) {
     266    sysBancroft = 'G';
     267  }
     268  else if ((numBancroft = _usedSystems.value('E'))) {
     269    sysBancroft = 'E';
     270  }
     271  else if ((numBancroft = _usedSystems.value('C'))) {
     272    sysBancroft = 'C';
     273  }
     274  else if ((numBancroft = _usedSystems.value('R'))) {
     275    sysBancroft = 'R';
     276  }
     277  else {
     278    return failure;
     279  }
    254280
    255281  while (true) {
    256     Matrix BB(obsVector.size(), 4);
     282    Matrix BB(numBancroft, 4);
    257283    int iObs = -1;
    258284    for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    259285      const t_pppSatObs* satObs = obsVector.at(ii);
    260       if (tLC == t_lc::dummy) {
    261         if (satObs->isValid(t_lc::cIF)) {
    262           tLC = t_lc::cIF;
     286      if (satObs->prn().system() == sysBancroft) {
     287        if (tLC == t_lc::dummy) {
     288          if (satObs->isValid(t_lc::cIF)) {
     289            tLC = t_lc::cIF;
     290          }
     291          else if (satObs->isValid(t_lc::c1)) {
     292            tLC = t_lc::c1;
     293          }
     294          else if (satObs->isValid(t_lc::c2)) {
     295            tLC = t_lc::c2;
     296          }
    263297        }
    264         else if (satObs->isValid(t_lc::c1)) {
    265           tLC = t_lc::c1;
     298        if ( satObs->isValid(tLC) &&
     299            (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
     300          ++iObs;
     301          BB[iObs][0] = satObs->xc()[0];
     302          BB[iObs][1] = satObs->xc()[1];
     303          BB[iObs][2] = satObs->xc()[2];
     304          BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
    266305        }
    267         else if (satObs->isValid(t_lc::c2)) {
    268           tLC = t_lc::c2;
    269         }
    270       }
    271       if ( satObs->isValid(tLC) &&
    272           (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    273         ++iObs;
    274         BB[iObs][0] = satObs->xc()[0];
    275         BB[iObs][1] = satObs->xc()[1];
    276         BB[iObs][2] = satObs->xc()[2];
    277         BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
    278306      }
    279307    }
     
    291319    // Check Blunders
    292320    // --------------
    293     const double BLUNDER = 500.0;
     321    const double BLUNDER = 200.0;
    294322    double   maxRes      = 0.0;
    295323    unsigned maxResIndex = 0;
    296324    for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    297325      const t_pppSatObs* satObs = obsVector.at(ii);
    298       if (satObs->isValid() &&
     326      char sys = satObs->prn().system();
     327      if (satObs->isValid() && sys == sysBancroft &&
    299328          (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    300329        ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
     
    313342        if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
    314343        LOG << "\n---------------------------------------------------------------\n";
    315         LOG << string(epoTime) << " BANCROFT:"        << ' '
     344        LOG << string(epoTime) << " BANCROFT " <<   sysBancroft << ": "
    316345            << setw(14) << setprecision(3) << xyzc[0] << ' '
    317346            << setw(14) << setprecision(3) << xyzc[1] << ' '
     
    331360
    332361  return success;
     362}
     363
     364// Compute A Priori Glonass Clock Offset
     365//////////////////////////////////////////////////////////////////////////////
     366double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) {
     367
     368  t_lc::type tLC   = t_lc::dummy;
     369  double offGlo = 0.0;
     370
     371  if (_opt->useSystem('R')) {
     372    while (obsVector.size() > 0) {
     373      offGlo = 0.0;
     374      double   maxRes      = 0.0;
     375      int      maxResIndex = -1;
     376      t_prn    maxResPrn;
     377      unsigned nObs = 0;
     378      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     379        const t_pppSatObs* satObs = obsVector.at(ii);
     380        if (satObs->prn().system() == 'R') {
     381          if (tLC == t_lc::dummy) {
     382            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     383          }
     384          if (satObs->isValid(tLC) &&
     385              (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     386            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     387            ++nObs;
     388            offGlo += ll;
     389            if (fabs(ll) > fabs(maxRes)) {
     390              maxRes      = ll;
     391              maxResIndex = ii;
     392              maxResPrn   = satObs->prn();
     393            }
     394          }
     395        }
     396      }
     397
     398      if (nObs > 0) {
     399        offGlo = offGlo / nObs;
     400      }
     401      else {
     402        offGlo = 0.0;
     403      }
     404      if (fabs(maxRes) > OPT->_aprSigClkOff) {
     405        LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
     406        delete obsVector.at(maxResIndex);
     407        obsVector.erase(obsVector.begin() + maxResIndex);
     408      }
     409      else {
     410        break;
     411      }
     412    }
     413  }
     414  return offGlo;
     415}
     416
     417// Compute A Priori Galileo Clock Offset
     418//////////////////////////////////////////////////////////////////////////////
     419double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) {
     420
     421  t_lc::type tLC   = t_lc::dummy;
     422  double     offGal = 0.0;
     423
     424  if (_opt->useSystem('E')) {
     425    while (obsVector.size() > 0) {
     426      offGal = 0.0;
     427      double   maxRes      = 0.0;
     428      int      maxResIndex = -1;
     429      t_prn    maxResPrn;
     430      unsigned nObs        = 0;
     431      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     432        const t_pppSatObs* satObs = obsVector.at(ii);
     433        if (satObs->prn().system() == 'E') {
     434          if (tLC == t_lc::dummy) {
     435            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     436          }
     437          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     438            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     439            ++nObs;
     440            offGal += ll;
     441            if (fabs(ll) > fabs(maxRes)) {
     442              maxRes      = ll;
     443              maxResIndex = ii;
     444              maxResPrn   = satObs->prn();
     445            }
     446          }
     447        }
     448      }
     449
     450      if (nObs > 0) {
     451        offGal = offGal / nObs;
     452      }
     453      else {
     454        offGal = 0.0;
     455      }
     456
     457      if (fabs(maxRes) > OPT->_aprSigClkOff) {
     458        LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
     459        delete obsVector.at(maxResIndex);
     460        obsVector.erase(obsVector.begin() + maxResIndex);
     461      }
     462      else {
     463        break;
     464      }
     465    }
     466  }
     467  return offGal;
     468}
     469
     470// Compute A Priori BDS Clock Offset
     471//////////////////////////////////////////////////////////////////////////////
     472double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) {
     473
     474  t_lc::type tLC   = t_lc::dummy;
     475  double offBds = 0.0;
     476
     477  if (_opt->useSystem('C')) {
     478    while (obsVector.size() > 0) {
     479      offBds = 0.0;
     480      double   maxRes      = 0.0;
     481      int      maxResIndex = -1;
     482      t_prn    maxResPrn;
     483      unsigned nObs        = 0;
     484      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     485        const t_pppSatObs* satObs = obsVector.at(ii);
     486        if (satObs->prn().system() == 'C') {
     487          if (tLC == t_lc::dummy) {
     488            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
     489          }
     490          if (satObs->isValid(tLC) &&
     491              (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
     492            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
     493            ++nObs;
     494            offBds += ll;
     495            if (fabs(ll) > fabs(maxRes)) {
     496              maxRes      = ll;
     497              maxResIndex = ii;
     498              maxResPrn   = satObs->prn();
     499            }
     500          }
     501        }
     502      }
     503
     504      if (nObs > 0) {
     505        offBds = offBds / nObs;
     506      }
     507      else {
     508        offBds = 0.0;
     509      }
     510
     511      if (fabs(maxRes) > OPT->_aprSigClkOff) {
     512        LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
     513        delete obsVector.at(maxResIndex);
     514        obsVector.erase(obsVector.begin() + maxResIndex);
     515      }
     516      else {
     517        break;
     518      }
     519    }
     520  }
     521  return offBds;
    333522}
    334523
     
    472661      return finish(failure, 4);
    473662    }
     663
     664    _offGlo = cmpOffGlo(_obsRover);
     665    _offGal = cmpOffGal(_obsRover);
     666    _offBds = cmpOffBds(_obsRover);
    474667
    475668    // Prepare Pseudo Observations of the Rover
     
    596789//
    597790//////////////////////////////////////////////////////////////////////////////
    598 void t_pppClient::reset() {cout << "t_pppClient::reset()" << endl;
     791void t_pppClient::reset() {
    599792
    600793  // to delete old orbit and clock corrections
  • trunk/BNC/src/PPP/pppClient.h

    r10254 r10256  
    3636  const bncAntex*     antex() const {return _antex;}
    3737  const t_pppStation* staRover() const {return _staRover;}
     38  double              offGlo() const {return _offGlo;}
     39  double              offGal() const {return _offGal;}
     40  double              offBds() const {return _offBds;}
    3841
    3942  std::ostringstream& log() {return *_log;}
    4043  const t_pppOptions* opt() const {return _opt;}
    41 
    4244  static t_irc bancroft(const Matrix& BBpass, ColumnVector& pos);
    4345
     
    5860  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
    5961                    ColumnVector& xyzc, bool print);
     62  double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector);
     63  double cmpOffGal(std::vector<t_pppSatObs*>& obsVector);
     64  double cmpOffBds(std::vector<t_pppSatObs*>& obsVector);
     65
    6066
    6167  t_output*                 _output;
     
    6672  bncAntex*                 _antex;
    6773  t_pppFilter*              _filter;
     74  double                    _offGlo;
     75  double                    _offGal;
     76  double                    _offBds;
    6877  std::vector<t_pppSatObs*> _obsRover;
    6978  std::ostringstream*       _log;
     
    7180  t_tides*                  _tides;
    7281  bool                      _pseudoObsIono;
     82  QMap<char, int>           _usedSystems;
    7383};
    7484
  • trunk/BNC/src/PPP/pppFilter.cpp

    r10254 r10256  
    8686  // Status Vector, Variance-Covariance Matrix
    8787  // -----------------------------------------
    88   _xFltOld = _xFlt;
    89   _QFltOld = _QFlt;
    90   setStateVectorAndVarCovMatrix(setNeuNoiseToZero);
     88  ColumnVector    xFltOld = _xFlt;
     89  SymmetricMatrix QFltOld = _QFlt;
     90  setStateVectorAndVarCovMatrix(xFltOld, QFltOld, setNeuNoiseToZero);
    9191
    9292  // Process Satellite Systems separately
     
    167167    for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    168168      t_pppSatObs *obs = obsVector[ii];
     169      char sys = obs->prn().system();
    169170      if (iOutlier == 0) {
    170171        obs->resetOutlier();
     
    184185            AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
    185186          }
    186           ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
     187          double offGlo = 0;
     188          if (sys == 'R' && tLC != t_lc::MW) {
     189            offGlo = PPP_CLIENT->offGlo();
     190          }
     191          double offGal = 0;
     192          if (sys == 'E' && tLC != t_lc::MW) {
     193            offGal = PPP_CLIENT->offGal();
     194          }
     195          double offBds = 0;
     196          if (sys == 'C' && tLC != t_lc::MW) {
     197            offBds = PPP_CLIENT->offBds();
     198          }
     199          ll[iObs] = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
    187200          PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
    188201        }
     
    192205    // Check number of observations
    193206    // ----------------------------
    194     if (!nSat) {
     207    if (nSat < 2) {
    195208      return failure;
    196209    }
     
    201214      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    202215        t_pppSatObs *obs = obsVector[ii];
     216        char sys = obs->prn().system();
    203217        if (!obs->outlier()) {
    204218          for (unsigned jj = 0; jj < usedLCs; jj++) {
     
    215229              AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
    216230            }
    217             ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
     231            double offGlo = 0;
     232            if (sys == 'R' && tLC != t_lc::MW) {
     233              offGlo = PPP_CLIENT->offGlo();
     234            }
     235            double offGal = 0;
     236            if (sys == 'E' && tLC != t_lc::MW) {
     237              offGal = PPP_CLIENT->offGal();
     238            }
     239            double offBds = 0;
     240            if (sys == 'C' && tLC != t_lc::MW) {
     241              offBds = PPP_CLIENT->offBds();
     242            }
     243            ll[iObs] = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
    218244            PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
    219245          }
     
    269295//        if (par->ambResetCandidate()) {
    270296          resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav);
    271           adjustNoise(t_pppParam::ion, obs->prn(), 0.1, &QSav);
    272297//        }
    273298//        else {
     
    307332                                    const vector<t_pppSatObs*> &obsVector) {
    308333
    309   const double SLIP = 1000.0;
     334  const double SLIP = 20.0;
    310335  string epoTimeStr = string(_epoTime);
    311336  const vector<t_pppParam*> &params = _parlist->params();
     
    316341      for (unsigned iObs = 0; iObs < obsVector.size(); iObs++) {
    317342        const t_pppSatObs *obs = obsVector[iObs];
     343        char sys = obs->prn().system();
    318344
    319345        // Check set Slips and Jump Counters
     
    344370        if (slip) {
    345371          resetAmb(obs->prn(), obsVector, tLC);
    346           adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
    347         }
    348 
    349         // Check Pre-Fit Residuals
    350         // -----------------------
     372        }
     373
     374        // Check Pre-Fit Residuals => switched off, because after a millisecond receiver clock jump, a cycle slip is detected for all satellites
     375        /* -----------------------
     376
    351377        else {
    352378          ColumnVector AA(params.size());
     
    355381            AA[iPar] = par->partial(_epoTime, obs, tLC);
    356382          }
    357 
    358           double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA);
     383          double offGlo = 0;
     384          if (sys == 'R' && tLC != t_lc::MW) {
     385            offGlo = PPP_CLIENT->offGlo();
     386          }
     387          double offGal = 0;
     388          if (sys == 'E' && tLC != t_lc::MW) {
     389            offGal = PPP_CLIENT->offGal();
     390          }
     391          double offBds = 0;
     392          if (sys == 'C' && tLC != t_lc::MW) {
     393            offBds = PPP_CLIENT->offBds();
     394          }
     395          double ll = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA);
    359396          double vv = DotProduct(AA, _xFlt) - ll;
    360397
     
    363400                << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
    364401            resetAmb(obs->prn(), obsVector, tLC);
    365             adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
    366           }
    367         }
     402          }
     403        }*/
    368404      }
    369405    }
     
    413449      }
    414450      _x0[ind] = par->x0();
    415       return success;
    416     }
    417   }
    418 
    419   return irc;
    420 }
    421 
    422 // Adjust process noise of individual parameters
    423 ////////////////////////////////////////////////////////////////////////////
    424 t_irc t_pppFilter::adjustNoise(t_pppParam::e_type parType, t_prn prn, double noise,
    425                                SymmetricMatrix *QSav) {
    426 
    427   t_irc irc = failure;
    428   vector<t_pppParam*>& params = _parlist->params();
    429   for (unsigned iPar = 0; iPar < params.size(); iPar++) {
    430     t_pppParam *par = params[iPar];
    431     if (par->type() == parType && par->prn() == prn) {
    432       int iOld = par->indexOld();
    433       int iNew = par->indexNew();
    434       LOG << string(_epoTime) << " ADJUSTNOISE " << prn.toString() << endl;
    435       _QFlt[iNew][iNew] = _QFltOld[iOld][iOld] + noise * noise;
    436       if (QSav) {
    437         (*QSav)(iNew + 1, iNew + 1) = _QFlt(iNew + 1, iNew + 1);
    438       }
    439       return success;
    440     }
    441   }
     451      irc = success;
     452    }
     453  }
     454
    442455  return irc;
    443456}
     
    482495//
    483496////////////////////////////////////////////////////////////////////////////
    484 void t_pppFilter::predictCovCrdPart(bool setNeuNoiseToZero) {
     497void t_pppFilter::predictCovCrdPart(const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) {
    485498
    486499  const vector<t_pppParam*>& params = _parlist->params();
     
    513526    double dt = _epoTime - _firstEpoTime;
    514527    if (dt < OPT->_seedingTime || setNeuNoiseToZero) {
    515       _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3);
     528      _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3);
    516529    }
    517530    else {
    518       _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3) + Qxyz;
     531      _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3) + Qxyz;
    519532    }
    520533  }
     
    523536//
    524537////////////////////////////////////////////////////////////////////////////
    525 void t_pppFilter::setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero) {
     538void t_pppFilter::setStateVectorAndVarCovMatrix(const ColumnVector &xFltOld,
     539                                                const SymmetricMatrix &QFltOld,
     540                                                bool setNeuNoiseToZero) {
    526541
    527542  const vector<t_pppParam*>& params = _parlist->params();
     
    534549  for (unsigned ii = 0; ii < nPar; ii++) {
    535550    t_pppParam *par1 = params[ii];
    536     if (_QFltOld.size() == 0) {
     551    if (QFltOld.size() == 0) {
    537552      par1->resetIndex();
    538553    }
     
    542557      _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
    543558    } else {
    544       _QFlt[ii][ii] = _QFltOld[iOld][iOld] + par1->noise() * par1->noise();
    545       _xFlt[ii]     = _xFltOld[iOld];
     559      _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();
     560      _xFlt[ii]     = xFltOld[iOld];
    546561      for (unsigned jj = 0; jj < ii; jj++) {
    547562        t_pppParam *par2 = params[jj];
    548563        int jOld = par2->indexOld();
    549564        if (jOld >= 0) {
    550           _QFlt[ii][jj] = _QFltOld(iOld + 1, jOld + 1);
    551         }
    552       }
    553     }
    554   }
    555   predictCovCrdPart(setNeuNoiseToZero);
    556 }
    557 
     565          _QFlt[ii][jj] = QFltOld(iOld + 1, jOld + 1);
     566        }
     567      }
     568    }
     569  }
     570  predictCovCrdPart(QFltOld, setNeuNoiseToZero);
     571}
     572
  • trunk/BNC/src/PPP/pppFilter.h

    r10249 r10256  
    8383                 SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0);
    8484
    85   t_irc adjustNoise(t_pppParam::e_type parType, t_prn prn, double noise,
    86                          SymmetricMatrix* QSav = 0);
    87 
    8885  void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
    8986
    90   void setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero);
     87  void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld,
     88                                     bool setNeuNoiseToZero);
    9189
    92   void predictCovCrdPart(bool setNeuNoiseToZero);
     90  void predictCovCrdPart(const SymmetricMatrix& QFltOld, bool setNeuNoiseToZero);
     91
    9392
    9493  bncTime         _epoTime;
    9594  t_pppParlist*   _parlist;
    9695  SymmetricMatrix _QFlt;
    97   SymmetricMatrix _QFltOld;
    9896  ColumnVector    _xFlt;
    99   ColumnVector    _xFltOld;
    10097  ColumnVector    _x0;
    10198  t_slip          _slips[t_prn::MAXPRN+1];
  • trunk/BNC/src/PPP/pppParlist.cpp

    r10251 r10256  
    6262     _noise   = OPT->_noiseCrd[2];
    6363     break;
    64    case rClkG:
    65      _epoSpec = true;
    66      _sigma0  = OPT->_aprSigClk;
    67      break;
    68    case rClkR:
    69      _epoSpec = true;
    70      _sigma0  = OPT->_aprSigClk;
    71      break;
    72    case rClkE:
    73      _epoSpec = true;
    74      _sigma0  = OPT->_aprSigClk;
    75      break;
    76    case rClkC:
     64   case rClk:
    7765     _epoSpec = true;
    7866     _sigma0  = OPT->_aprSigClk;
     
    8674         const t_pppSatObs* obs = obsVector->at(ii);
    8775         if (obs->prn() == _prn) {
    88            _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     76           double offGlo = 0;
     77           if (_prn.system() == 'R' && tLC != t_lc::MW) {
     78             offGlo = PPP_CLIENT->offGlo();
     79           }
     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);
    8989           break;
    9090         }
    9191       }
    9292     }
     93     break;
     94   case offGlo:
     95     _epoSpec = true;
     96     _sigma0  = OPT->_aprSigClk;
     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();
    93108     break;
    94109   case trp:
     
    153168    if (tLC == t_lc::GIM) {return 0.0;}
    154169    return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
    155   case rClkG:
     170  case rClk:
    156171    if (tLC == t_lc::GIM) {return 0.0;}
    157     return (obs->prn().system() == 'G') ? 1.0 : 0.0;
    158   case rClkR:
     172    return 1.0;
     173  case offGlo:
    159174    if (tLC == t_lc::GIM) {return 0.0;}
    160175    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
    161   case rClkE:
     176  case offGal:
    162177    if (tLC == t_lc::GIM) {return 0.0;}
    163178    return (obs->prn().system() == 'E') ? 1.0 : 0.0;
    164   case rClkC:
     179  case offBds:
    165180    if (tLC == t_lc::GIM) {return 0.0;}
    166181    return (obs->prn().system() == 'C') ? 1.0 : 0.0;
     
    281296    ss << "CRD_Z";
    282297    break;
    283   case rClkG:
    284     ss << "REC_CLK  G  ";
    285     break;
    286   case rClkR:
    287     ss << "REC_CLK  R  ";
    288     break;
    289   case rClkE:
    290     ss << "REC_CLK  E  ";
    291     break;
    292   case rClkC:
    293     ss << "REC_CLK  C  ";
     298  case rClk:
     299    ss << "REC_CLK     ";
     300    break;
     301  case offGlo:
     302    ss << "OFF_GLO     ";
     303    break;
     304  case offGal:
     305    ss << "OFF_GAL     ";
     306    break;
     307  case offBds:
     308    ss << "OFF_BDS     ";
    294309    break;
    295310  case trp:
     
    478493  // Receiver Clocks
    479494  // ---------------
    480    if (_usedSystems.contains('G')) {
    481      required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy));
    482    }
    483 
    484    if (_usedSystems.contains('R')) {
    485      required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy));
    486    }
    487 
    488    if (_usedSystems.contains('E')) {
    489      required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy));
    490    }
    491 
    492    if (_usedSystems.contains('C')) {
    493      required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy));
    494    }
     495  required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy));
     496
     497  // GLONASS Clock Offset
     498  // --------------------
     499  if (OPT->useSystem('R')) {
     500    required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
     501  }
     502
     503  // Galileo Clock Offset
     504  // --------------------
     505  if (OPT->useSystem('E')) {
     506    required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
     507  }
     508
     509  // BDS Clock Offset
     510  // ----------------
     511  if (OPT->useSystem('C')) {
     512    required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
     513  }
    495514
    496515  // Troposphere
  • trunk/BNC/src/PPP/pppParlist.h

    r10232 r10256  
    1414class t_pppParam {
    1515 public:
    16   enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
     16  enum e_type {crdX, crdY, crdZ, rClk, offGlo, offGal, offBds, trp, ion, amb,
    1717               cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
    1818               cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
     
    3535  void resetIndex() {
    3636    _indexOld = -1;
    37     _indexNew = -1;
    3837  }
    3938  int indexOld() const {return _indexOld;}
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r10252 r10256  
    663663////////////////////////////////////////////////////////////////////////////
    664664void t_pppSatObs::printObsMinusComputed() const {
    665 // TODO: cout should be LOG
    666665  LOG.setf(ios::fixed);
    667666  LOG << "\nOBS-COMP for Satellite " << _prn.toString() << (isReference() ? " (Reference Satellite)" : "") << endl
    668667       << "========================== " << endl;
    669   for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
    670     t_lc::type tLC = OPT->LCs(_prn.system())[ii];
     668  char sys = _prn.system();
     669  for (unsigned ii = 0; ii < OPT->LCs(sys).size(); ii++) {
     670    t_lc::type tLC = OPT->LCs(sys)[ii];
     671    double offGlo = 0;
     672    if (sys == 'R' && tLC != t_lc::MW) {
     673      offGlo = PPP_CLIENT->offGlo();
     674    }
     675    double offGal = 0;
     676    if (sys == 'E' && tLC != t_lc::MW) {
     677      offGal = PPP_CLIENT->offGal();
     678    }
     679    double offBds = 0;
     680    if (sys == 'C' && tLC != t_lc::MW) {
     681      offBds = PPP_CLIENT->offBds();
     682    }
    671683    LOG << "OBS-CMP " << setw(4) << t_lc::toString(tLC) << ": " << _prn.toString() << " "
    672684        << setw(12) << setprecision(3) << obsValue(tLC) << " "
    673685        << setw(12) << setprecision(3) << cmpValue(tLC) << " "
    674         << setw(12) << setprecision(3) << obsValue(tLC) - cmpValue(tLC) << endl;
     686        << setw(12) << setprecision(3) << obsValue(tLC) - offGlo - offGal - offBds  - cmpValue(tLC) << endl;
    675687  }
    676688}
  • trunk/BNC/src/pppMain.cpp

    r10251 r10256  
    187187    opt->_sigmaC1      = settings.value("PPP/sigmaC1").toDouble(); if (opt->_sigmaC1 <= 0.0)  opt->_sigmaC1  = 1.00;
    188188    opt->_sigmaL1      = settings.value("PPP/sigmaL1").toDouble(); if (opt->_sigmaL1 <= 0.0)  opt->_sigmaL1  = 0.01;
    189     opt->_sigmaGIM     = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 1.00;
     189    opt->_sigmaGIM     = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 5.00;
    190190    opt->_corrWaitTime = settings.value("PPP/corrWaitTime").toDouble();
    191191    if (!_realTime || opt->_corrMount.empty()) {
     
    519519    opt->_maxResC1    = settings.value("PPP/maxResC1").toDouble();  if (opt->_maxResC1 <= 0.0)  opt->_maxResC1  = 2.0;
    520520    opt->_maxResL1    = settings.value("PPP/maxResL1").toDouble();  if (opt->_maxResL1 <= 0.0)  opt->_maxResL1  = 0.02;
    521     opt->_maxResGIM   = settings.value("PPP/maxResGIM").toDouble(); if (opt->_maxResGIM <= 0.0) opt->_maxResGIM = 2.0;
     521    opt->_maxResGIM   = settings.value("PPP/maxResGIM").toDouble(); if (opt->_maxResGIM <= 0.0) opt->_maxResGIM = 5.0;
    522522    opt->_eleWgtCode  = (settings.value("PPP/eleWgtCode").toInt() != 0);
    523523    opt->_eleWgtPhase = (settings.value("PPP/eleWgtPhase").toInt() != 0);
     
    526526    // Some default values
    527527    // -------------------
    528     opt->_aprSigAmb       = 1000.0;
    529     opt->_aprSigClk       = 1000.0;
    530     opt->_aprSigIon       = 1000.0;
    531     opt->_noiseIon        = 100.0;
     528    opt->_aprSigAmb       = 300000.0;
     529    opt->_aprSigClk       = 300000.0;
     530    opt->_aprSigClkOff    = 300000.0;
     531    opt->_aprSigIon       = 10000.0;
     532    opt->_noiseIon        = 10000.0;
    532533    opt->_aprSigCodeBias  = 100.0;
    533534    opt->_noiseCodeBias   = 100.0;
  • trunk/BNC/src/pppOptions.h

    r10251 r10256  
    5858  ColumnVector            _aprSigCrd;
    5959  double                  _aprSigClk;
     60  double                  _aprSigClkOff;
    6061  double                  _aprSigTrp;
    6162  double                  _aprSigIon;
Note: See TracChangeset for help on using the changeset viewer.