Changeset 8905 in ntrip for trunk/BNC/src/PPP


Ignore:
Timestamp:
Mar 18, 2020, 11:13:50 AM (4 years ago)
Author:
stuerze
Message:

some developments regarding PPP, not completed!

Location:
trunk/BNC/src/PPP
Files:
2 added
11 edited

Legend:

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

    r8453 r8905  
    5555  _obsPool  = new t_pppObsPool();
    5656  _staRover = new t_pppStation();
    57   _filter   = new t_pppFilter();
     57  _filter   = new t_pppFilter(_obsPool);
    5858  _tides    = new t_tides();
    59 
     59  _antex    = 0;
    6060  if (!_opt->_antexFileName.empty()) {
    6161    _antex = new bncAntex(_opt->_antexFileName.c_str());
    6262  }
    63   else {
    64     _antex = 0;
    65   }
    66 
    6763  if (!_opt->_blqFileName.empty()) {
    68     _loading = new t_loading(_opt->_blqFileName.c_str());
    69   }
    70   else {
    71     _loading = 0;
    72   }
    73 
     64    if (_tides->readBlqFile(_opt->_blqFileName.c_str()) == success) {
     65      //_tides->printAllBlqSets();
     66    }
     67  }
     68
     69  if (OPT->_refSatRequired) {
     70    for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
     71      char system = OPT->systems()[iSys];
     72      _obsPool->initRefSatMapElement(system);
     73    }
     74  }
     75  _offGG = 0.0;
    7476  CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
    7577}
     
    8082  delete _log;
    8183  delete _opt;
     84  delete _filter;
    8285  delete _ephPool;
    8386  delete _obsPool;
     
    8689    delete _antex;
    8790  }
    88   delete _filter;
    8991  delete _tides;
    90   if (_loading) {
    91     delete _loading;
    92   }
    9392  clearObs();
    9493}
     
    157156t_irc t_pppClient::prepareObs(const vector<t_satObs*>& satObs,
    158157                              vector<t_pppSatObs*>& obsVector, bncTime& epoTime) {
     158
    159159  // Default
    160160  // -------
     
    176176  }
    177177
     178  // (re)set reference satellites per system if required
     179  // ---------------------------------------------------
     180  if (_opt->_refSatRequired) {
     181    // reference satellite definition per system
     182    for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
     183      char system = OPT->systems()[iSys];
     184      bool refSatDefined = false;
     185      t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
     186      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     187        const t_pppSatObs* satObs = obsVector.at(ii);
     188        // reference satellite is unchanged
     189        if      (!_obsPool->epoReProcessing() && refSat->prn() == satObs->prn()) {
     190          refSatDefined = true;
     191          obsVector[ii]->setAsReference();
     192          refSat->setStatus(t_pppRefSat::unchanged);
     193        }
     194        // reference satellite has changed
     195        else if (_obsPool->epoReProcessing() && refSat->prn() != satObs->prn()) {
     196          if (satObs->prn().system() == system) {
     197            refSatDefined = true;
     198            obsVector[ii]->setAsReference();
     199            refSat->setStatus(t_pppRefSat::changed);
     200            refSat->setPrn(satObs->prn());
     201          }
     202        }
     203        if (refSatDefined) {
     204          break;
     205        }
     206      }
     207      // reference satellite has to be initialized
     208      if (!refSatDefined) {
     209        for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     210          const t_pppSatObs* satObs = obsVector.at(ii);
     211          if (satObs->prn().system() == system) {
     212            obsVector[ii]->setAsReference();
     213            refSat->setStatus(t_pppRefSat::initialized);
     214            refSat->setPrn(satObs->prn());
     215          }
     216        }
     217      }
     218    }
     219    _obsPool->setEpoReProcessing(false); //TODO: später erst nach Trafo false setzen
     220  }
     221
    178222  // Check whether data are synchronized, compute epoTime
    179223  // ----------------------------------------------------
     
    202246}
    203247
     248//
     249//////////////////////////////////////////////////////////////////////////////
     250bool t_pppClient::preparePseudoObs(std::vector<t_pppSatObs*>& obsVector) {
     251
     252  bool pseudoObsIono = false;
     253
     254  if (OPT->_pseudoObsIono) {
     255    vector<t_pppSatObs*>::iterator it = obsVector.begin();
     256    while (it != obsVector.end()) {
     257      t_pppSatObs* satObs = *it;
     258      char system = satObs->prn().system();
     259      t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
     260      double stecRef = refSat->stecValue();
     261      if (stecRef && !satObs->isReference()) {
     262        pseudoObsIono = true;
     263        satObs->setPseudoObsIono(t_frequency::G1, stecRef);
     264      }
     265      satObs->printObsMinusComputed();
     266      it++;
     267    }
     268  }
     269
     270  return pseudoObsIono;
     271}
     272
    204273// Compute the Bancroft position, check for blunders
    205274//////////////////////////////////////////////////////////////////////////////
     
    250319    for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    251320      const t_pppSatObs* satObs = obsVector.at(ii);
    252       if ( satObs->isValid() && satObs->prn().system() == 'G' &&
    253            (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
     321      if (satObs->isValid() &&
     322          satObs->prn().system() == 'G' &&
     323          (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
    254324        ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
    255         double res = rr.norm_Frobenius() - satObs->obsValue(tLC)
     325        double res = rr.NormFrobenius() - satObs->obsValue(tLC)
    256326                   - (satObs->xc()[3] - xyzc[3]) * t_CST::c;
    257327        if (std::isnan(res) || fabs(res) > maxRes) {
     
    393463t_irc t_pppClient::cmpModel(t_pppStation* station, const ColumnVector& xyzc,
    394464                               vector<t_pppSatObs*>& obsVector) {
    395 
    396465  bncTime time;
    397466  time = _epoTimeRover;
    398467  station->setName(OPT->_roverName);
    399468  station->setAntName(OPT->_antNameRover);
     469  station->setEpochTime(time);
    400470  if (OPT->xyzAprRoverSet()) {
    401471    station->setXyzApr(OPT->_xyzAprRover);
     
    412482  // Tides
    413483  // -----
    414   station->setTideDspl( _tides->displacement(time, station->xyzApr()) );
    415 
    416   // Ionosphere
    417   // ----------
    418   station->setIonoEpochTime(time);
     484  station->setTideDsplEarth(_tides->earth(time, station->xyzApr()));
     485  station->setTideDsplOcean(_tides->ocean(time, station->xyzApr(), station->name()));
    419486
    420487  // Observation model
     
    430497        satObs->eleSat() >= OPT->_minEle &&
    431498        modelSetup == success) {
     499      if (satObs->isReference() && OPT->_pseudoObsIono) {
     500        char system = satObs->prn().system();
     501        t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
     502        refSat->setStecValue(satObs->getIonoCodeDelay(t_frequency::G1));
     503      }
    432504      ++it;
    433505    }
     
    447519  try {
    448520    initOutput(output);
    449 
    450     // Prepare Observations of the Rover
    451     // ---------------------------------
    452     if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) {
    453       return finish(failure);
    454     }
    455 
    456     LOG << "\nPPP of Epoch ";
    457     if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
    458     LOG << "\n---------------------------------------------------------------\n";
    459 
    460     for (int iter = 1; iter <= 2; iter++) {
    461       ColumnVector xyzc(4); xyzc = 0.0;
    462       bool print = (iter == 2);
    463       if (cmpBancroft(_epoTimeRover, _obsRover, xyzc, print) != success) {
     521    _num = 0;
     522    _obsPool->setEpoReProcessing(false); // initialize for epoch
     523
     524    do {
     525      _num++;
     526
     527      // Prepare Observations of the Rover
     528      // ---------------------------------
     529      if (prepareObs(satObs, _obsRover, _epoTimeRover) != success) {
    464530        return finish(failure);
    465531      }
    466       if (cmpModel(_staRover, xyzc, _obsRover) != success) {
     532
     533      LOG << "\nPPP of Epoch ";
     534      if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
     535      LOG << "\n---------------------------------------------------------------\n";
     536
     537      for (int iter = 1; iter <= 2; iter++) {
     538        ColumnVector xyzc(4); xyzc = 0.0;
     539        bool print = (iter == 2);
     540        if (cmpBancroft(_epoTimeRover, _obsRover, xyzc, print) != success) {
     541          return finish(failure);
     542        }
     543        if (cmpModel(_staRover, xyzc, _obsRover) != success) {
     544          return finish(failure);
     545        }
     546      }
     547
     548      _offGG = cmpOffGG(_obsRover);
     549
     550      // Prepare Pseudo Observations of the Rover
     551      // ----------------------------------------
     552      _pseudoObsIono = preparePseudoObs(_obsRover);//qDebug() << "_pseudoObsIonoAvailable: " << _pseudoObsIono;
     553
     554      if (int(_obsRover.size()) < OPT->_minObs) {
     555        LOG << "t_pppClient::processEpoch not enough observations" << endl;
    467556        return finish(failure);
    468557      }
    469     }
    470 
    471     _offGG = cmpOffGG(_obsRover);
    472 
    473     if (int(_obsRover.size()) < OPT->_minObs) {
    474       LOG << "t_pppClient::processEpoch not enough observations" << endl;
    475       return finish(failure);
    476     }
    477 
    478     // Store last epoch of data
    479     // ------------------------
    480     _obsPool->putEpoch(_epoTimeRover, _obsRover);
    481 
    482     // Process Epoch in Filter
    483     // -----------------------
    484     if (_filter->processEpoch(_obsPool) != success) {
    485       return finish(failure);
    486     }
     558
     559      if (OPT->_refSatRequired) {
     560        LOG.setf(ios::fixed);
     561        QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap());
     562        while (it.hasNext()) {
     563          it.next();
     564          char   sys = it.key();
     565          string prn = it.value()->prn().toString();
     566          LOG << string(_epoTimeRover) << " REFSAT  " << sys << ": " << prn << endl;
     567        }
     568      }
     569
     570      // Store last epoch of data
     571      // ------------------------
     572      //_obsRover.resize(2);
     573      _obsPool->putEpoch(_epoTimeRover, _obsRover, _pseudoObsIono);
     574
     575      // Process Epoch in Filter
     576      // -----------------------
     577      if (_filter->processEpoch(_num) != success) {
     578        return finish(failure);
     579      }
     580      // if num > 1 und !obsPool->epoReProcessing() => filter ->datumTransformation
     581    } while (_obsPool->epoReProcessing());
    487582  }
    488583  catch (Exception& exc) {
     
    588683void t_pppClient::reset() {
    589684
    590   // to delete all parameters
    591   delete _filter;
    592   _filter   = new t_pppFilter();
    593 
    594685  // to delete old orbit and clock corrections
    595686  delete _ephPool;
     
    599690  delete _obsPool;
    600691  _obsPool  = new t_pppObsPool();
    601 }
     692
     693  // to delete all parameters
     694  delete _filter;
     695  _filter   = new t_pppFilter(_obsPool);
     696
     697}
  • trunk/BNC/src/PPP/pppClient.h

    r7996 r8905  
    1010
    1111class bncAntex;
     12class t_pppRefSat;
    1213
    1314namespace BNC_PPP {
     
    3435  const t_pppEphPool* ephPool() const {return _ephPool;}
    3536  const t_pppObsPool* obsPool() const {return _obsPool;}
    36   const bncAntex*  antex() const {return _antex;}
     37  const bncAntex*     antex() const {return _antex;}
    3738  const t_pppStation* staRover() const {return _staRover;}
    38   double           offGG() const {return _offGG;}
     39  double              offGG() const {return _offGG;}
    3940
    4041  std::ostringstream& log() {return *_log;}
     
    5354  t_irc prepareObs(const std::vector<t_satObs*>& satObs,
    5455                   std::vector<t_pppSatObs*>& obsVector, bncTime& epoTime);
     56  bool  preparePseudoObs(std::vector<t_pppSatObs*>& obsVector);
    5557  t_irc cmpModel(t_pppStation* station, const ColumnVector& xyzc,
    5658                 std::vector<t_pppSatObs*>& obsVector);
     
    7173  t_pppOptions*             _opt;
    7274  t_tides*                  _tides;
    73   t_loading*                _loading;
     75  bool                      _pseudoObsIono;
     76  int                       _num;
    7477};
    7578
  • trunk/BNC/src/PPP/pppFilter.cpp

    r8329 r8905  
    3434// Constructor
    3535////////////////////////////////////////////////////////////////////////////
    36 t_pppFilter::t_pppFilter() {
     36t_pppFilter::t_pppFilter(t_pppObsPool* obsPool) {
    3737  _parlist = 0;
     38  _numSat = 0;
     39  _obsPool = obsPool;
    3840}
    3941
     
    4648// Process Single Epoch
    4749////////////////////////////////////////////////////////////////////////////
    48 t_irc t_pppFilter::processEpoch(t_pppObsPool* obsPool) {
    49 
     50t_irc t_pppFilter::processEpoch(int num) {
    5051  _numSat     = 0;
    5152  const double maxSolGap = 60.0;
     
    5758  // Vector of all Observations
    5859  // --------------------------
    59   t_pppObsPool::t_epoch* epoch = obsPool->lastEpoch();
     60  t_pppObsPool::t_epoch* epoch = _obsPool->lastEpoch();
    6061  if (!epoch) {
    6162    return failure;
     
    7576  string epoTimeStr = string(_epoTime);
    7677
     78  //--
    7779  // Set Parameters
    7880  // --------------
     
    9193  for (unsigned ii = 0; ii < params.size(); ii++) {
    9294    const t_pppParam* par1 = params[ii];
    93 
    9495    _x0[ii] = par1->x0();
    95 
    9696    int iOld = par1->indexOld();
    9797    if (iOld < 0) {
     
    113113  predictCovCrdPart(QFltOld);
    114114
     115
     116  // Pre-Process Satellite Systems separately
     117  // ----------------------------------------
     118  bool preProcessing = false;
     119  if (OPT->_obsModelType == OPT->DCMcodeBias ||
     120      OPT->_obsModelType == OPT->DCMphaseBias) {
     121    preProcessing = true;
     122    for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
     123      char system = OPT->systems()[iSys];
     124      t_prn refPrn = (_obsPool->getRefSatMapElement(system))->prn();
     125      vector<t_pppSatObs*> obsVector;
     126      for (unsigned jj = 0; jj < allObs.size(); jj++) {
     127        if (allObs[jj]->prn().system() == system) {
     128          obsVector.push_back(allObs[jj]);
     129        }
     130      }
     131      if (processSystem(OPT->LCs(system), obsVector, refPrn,
     132                        epoch->pseudoObsIono(), preProcessing) != success) {
     133        return failure;
     134      }
     135    }
     136  }
     137
    115138  // Process Satellite Systems separately
    116139  // ------------------------------------
    117140  for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
    118141    char system = OPT->systems()[iSys];
     142    t_prn refPrn = (_obsPool->getRefSatMapElement(system))->prn();
    119143    unsigned int num = 0;
    120144    vector<t_pppSatObs*> obsVector;
     
    126150    }
    127151    LOG << epoTimeStr << " SATNUM " << system << ' ' << right << setw(2) << num << endl;
    128     if ( processSystem(OPT->LCs(system), obsVector) != success ) {
     152    if (processSystem(OPT->LCs(system), obsVector, refPrn,
     153                      epoch->pseudoObsIono(), preProcessing) != success) {
    129154      return failure;
    130155    }
    131156  }
    132 
    133   cmpDOP(allObs);
    134 
    135   _parlist->printResult(_epoTime, _QFlt, _xFlt);
    136   _lastEpoTimeOK = _epoTime;  // remember time of last successful epoch processing
     157  if (_obsPool->epoReProcessing()) {
     158    // set A1 und A2 abhängig von num
     159    // if num == 1 => A1
     160    // if num >  1 => A2
     161  }
     162  else {
     163    cmpDOP(allObs);
     164    _parlist->printResult(_epoTime, _QFlt, _xFlt);
     165    _lastEpoTimeOK = _epoTime;  // remember time of last successful epoch processing
     166  }
     167
    137168  return success;
    138169}
     
    141172////////////////////////////////////////////////////////////////////////////
    142173t_irc t_pppFilter::processSystem(const vector<t_lc::type>& LCs,
    143                                  const vector<t_pppSatObs*>& obsVector) {
    144 
     174                                 const vector<t_pppSatObs*>& obsVector,
     175                                 const t_prn& refPrn,
     176                                 bool pseudoObsIonoAvailable,
     177                                 bool preProcessing) {
     178  qDebug() << "======t_pppFilter::processSystem=======";
    145179  LOG.setf(ios::fixed);
    146180
    147181  // Detect Cycle Slips
    148182  // ------------------
    149   if (detectCycleSlips(LCs, obsVector) != success) {
     183  if (detectCycleSlips(LCs, obsVector, refPrn, preProcessing) != success) {
    150184    return failure;
    151185  }
    152186
    153   ColumnVector            xSav       = _xFlt;
    154   SymmetricMatrix         QSav       = _QFlt;
    155   string                  epoTimeStr = string(_epoTime);
     187  unsigned usedLCs = LCs.size(); //qDebug() << "usedLCs: " << usedLCs;
     188  if (OPT->_pseudoObsIono && !pseudoObsIonoAvailable) {
     189    usedLCs -= 1;  // GIM not used
     190  }
     191  ColumnVector               xSav       = _xFlt;
     192  SymmetricMatrix            QSav       = _QFlt;
     193  string                     epoTimeStr = string(_epoTime);
    156194  const vector<t_pppParam*>& params     = _parlist->params();
    157   unsigned                maxObs     = obsVector.size() * LCs.size();
     195  unsigned                   maxObs     = obsVector.size() * usedLCs;
     196  //unsigned                   maxObs     = 2 * usedLCs;
     197
     198  if (OPT->_pseudoObsIono && pseudoObsIonoAvailable) { // stecDiff w.r.t refSat
     199    maxObs -= 1;
     200  }
     201  qDebug() << "par.size()      : " << _parlist->nPar() << " LCs.size(): " << usedLCs;
     202  qDebug() << "obsVector.size(): " << obsVector.size() << " maxObs    : " << maxObs;
    158203
    159204  // Outlier Detection Loop
    160205  // ----------------------
    161206  for (unsigned iOutlier = 0; iOutlier < maxObs; iOutlier++) {
     207    qDebug() << "iOutlier: " << iOutlier;
    162208
    163209    if (iOutlier > 0) {
     
    168214    // First-Design Matrix, Terms Observed-Computed, Weight Matrix
    169215    // -----------------------------------------------------------
     216    qDebug() << "A(" << maxObs << "," << _parlist->nPar() << ")";
    170217    Matrix                AA(maxObs, _parlist->nPar());
    171218    ColumnVector          ll(maxObs);
    172219    DiagonalMatrix        PP(maxObs); PP = 0.0;
     220    //TETSPLOT
     221    for (unsigned iPar = 0; iPar < params.size(); iPar++) {
     222      const t_pppParam* par = params[iPar];
     223      cout << "  " << par->toString() <<endl;
     224    }
     225    cout << endl;
    173226
    174227    int iObs = -1;
     
    176229    vector<t_lc::type>   usedTypes;
    177230    for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    178       t_pppSatObs* obs = obsVector[ii];
     231      t_pppSatObs* obs = obsVector[ii]; qDebug() << "SATELLITE: " << obs->prn().toString().c_str() << "isRef: " << obs->isReference();
    179232      if (!obs->outlier()) {
    180         for (unsigned jj = 0; jj < LCs.size(); jj++) {
     233        for (unsigned jj = 0; jj < usedLCs; jj++) {
    181234          const t_lc::type tLC = LCs[jj];
     235          if (tLC == t_lc::GIM &&  obs->isReference()) {continue;}
    182236          ++iObs;
    183237          usedObs.push_back(obs);
     
    186240            const t_pppParam* par = params[iPar];
    187241            AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
     242            cout << setw(10) << par->partial(_epoTime, obs, tLC);
    188243          }
     244          cout << endl;
    189245          ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs+1));
    190246          PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
     247          //qDebug() << "ll[iObs]: " << ll[iObs];
     248          //qDebug() << "PP[iObs]: " << PP[iObs];
    191249        }
    192250      }
     
    229287      t_pppSatObs* obs = usedObs[maxOutlierIndex];
    230288      t_pppParam* par = 0;
    231       LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' '
    232           << obs->prn().toString()                        << ' '
    233           << setw(8) << setprecision(4) << maxOutlier << endl;
     289      if (!preProcessing) {
     290        LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' '
     291            << obs->prn().toString()                        << ' '
     292            << setw(8) << setprecision(4) << maxOutlier << endl;
     293      }
    234294      for (unsigned iPar = 0; iPar < params.size(); iPar++) {
    235295        t_pppParam* hlp = params[iPar];
    236         if (hlp->type() == t_pppParam::amb && hlp->prn()  == obs->prn() &&
     296        if (hlp->type() == t_pppParam::amb &&
     297            hlp->prn()  == obs->prn() &&
    237298            hlp->tLC()  == usedTypes[maxOutlierIndex]) {
    238299          par = hlp;
    239300        }
    240301      }
    241       if (par) {
     302      if      (par && preProcessing) {
     303        if (par->prn() == refPrn) {
     304          _obsPool->setEpoReProcessing(true);
     305        }
     306      }
     307      else if (par && !preProcessing) {
    242308        if (par->ambResetCandidate()) {
    243309          resetAmb(par->prn(), obsVector, &QSav, &xSav);
     
    248314        }
    249315      }
    250       else {
     316      else if (!par && !preProcessing){
    251317        obs->setOutlier();
    252318      }
     
    256322    // ---------------
    257323    else {
    258       for (unsigned jj = 0; jj < LCs.size(); jj++) {
    259         for (unsigned ii = 0; ii < usedObs.size(); ii++) {
    260           const t_lc::type tLC = usedTypes[ii];
    261           t_pppSatObs*        obs = usedObs[ii];
    262           if (tLC == LCs[jj]) {
    263             obs->setRes(tLC, vv[ii]);
    264             LOG << epoTimeStr << " RES "
    265                 << left << setw(3) << t_lc::toString(tLC) << right << ' '
    266                 << obs->prn().toString().substr(0,3) << ' '
    267                 << setw(8) << setprecision(4) << vv[ii] << endl;
     324      if (!preProcessing) {
     325        for (unsigned jj = 0; jj < LCs.size(); jj++) {
     326          for (unsigned ii = 0; ii < usedObs.size(); ii++) {
     327            const t_lc::type tLC = usedTypes[ii];
     328            t_pppSatObs*        obs = usedObs[ii];
     329            if (tLC == LCs[jj]) {
     330              obs->setRes(tLC, vv[ii]);
     331              LOG << epoTimeStr << " RES "
     332                  << left << setw(3) << t_lc::toString(tLC) << right << ' '
     333                  << obs->prn().toString().substr(0,3) << ' '
     334                  << setw(8) << setprecision(4) << vv[ii] << endl;
     335            }
    268336          }
    269337        }
     
    279347////////////////////////////////////////////////////////////////////////////
    280348t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type>& LCs,
    281                                     const vector<t_pppSatObs*>& obsVector) {
     349                                    const vector<t_pppSatObs*>& obsVector,
     350                                    const t_prn& refPrn,
     351                                    bool preProcessing) {
    282352
    283353  const double            SLIP       = 20.0;  // slip threshold
    284354  string                  epoTimeStr = string(_epoTime);
    285   const vector<t_pppParam*>& params     = _parlist->params();
     355  const vector<t_pppParam*>& params  = _parlist->params();
    286356
    287357  for (unsigned ii = 0; ii < LCs.size(); ii++) {
     
    294364        // ---------------------------------
    295365        bool slip = false;
    296 
    297366        if (obs->slip()) {
    298367          LOG << epoTimeStr  << "cycle slip set (obs) " << obs->prn().toString()  << endl;
     
    312381          slip = true;
    313382        }
    314         _slips[obs->prn()]._biasJumpCounter = obs->biasJumpCounter();
    315383
    316384        // Slip Set
    317385        // --------
    318386        if (slip) {
    319           resetAmb(obs->prn(), obsVector);
    320         }
    321 
     387          if (preProcessing) {
     388            if (obs->prn() == refPrn) {
     389              _obsPool->setEpoReProcessing(true);
     390            }
     391          }
     392          else {
     393            resetAmb(obs->prn(), obsVector);
     394          }
     395        }
    322396        // Check Pre-Fit Residuals
    323397        // -----------------------
     
    328402            AA[iPar] = par->partial(_epoTime, obs, tLC);
    329403          }
    330 
    331404          double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA);
    332405          double vv = DotProduct(AA, _xFlt) - ll;
    333 
    334406          if (fabs(vv) > SLIP) {
    335             LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' '
    336                 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
    337             resetAmb(obs->prn(), obsVector);
     407            if (preProcessing) {
     408              if (obs->prn() == refPrn) {
     409                _obsPool->setEpoReProcessing(true);
     410              }
     411            }
     412            else {
     413              LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' '
     414                  << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
     415              resetAmb(obs->prn(), obsVector);
     416            }
    338417          }
    339418        }
  • trunk/BNC/src/PPP/pppFilter.h

    r7928 r8905  
    1717class t_pppFilter {
    1818 public:
    19   t_pppFilter();
     19  t_pppFilter(t_pppObsPool* obsPool);
    2020  ~t_pppFilter();
    2121
    22   t_irc processEpoch(t_pppObsPool* obsPool);
     22  t_irc processEpoch(int num);
    2323
    2424  const ColumnVector&    x() const {return _xFlt;}
     
    7474
    7575  t_irc processSystem(const std::vector<t_lc::type>& LCs,
    76                       const std::vector<t_pppSatObs*>& obsVector);
     76                      const std::vector<t_pppSatObs*>& obsVector,
     77                      const t_prn& refPrn,
     78                      bool pseudoObsIonoAvailable,
     79                      bool preProcessing);
    7780
    7881  t_irc detectCycleSlips(const std::vector<t_lc::type>& LCs,
    79                          const std::vector<t_pppSatObs*>& obsVector);
     82                         const std::vector<t_pppSatObs*>& obsVector,
     83                         const t_prn& refPrn,
     84                         bool preProcessing);
    8085
    8186  t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector,
     
    8893  bncTime         _epoTime;
    8994  t_pppParlist*   _parlist;
     95  t_pppObsPool*   _obsPool;
    9096  SymmetricMatrix _QFlt;
    9197  ColumnVector    _xFlt;
  • trunk/BNC/src/PPP/pppObsPool.cpp

    r7643 r8905  
    2222// Constructor
    2323/////////////////////////////////////////////////////////////////////////////
    24 t_pppObsPool::t_epoch::t_epoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector) {
    25   _epoTime   = epoTime;
     24t_pppObsPool::t_epoch::t_epoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
     25                               bool pseudoObsIono) {
     26  _epoTime        = epoTime;
     27  _pseudoObsIono  = pseudoObsIono;
    2628  for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    2729    _obsVector.push_back(obsVector[ii]);
     
    4850  }
    4951  _vTec = 0;
     52  _epoReProcessing = false;
    5053}
    5154
     
    6467    _epochs.pop_front();
    6568  }
     69  clearRefSatMap();
    6670}
    6771
     
    9296//
    9397/////////////////////////////////////////////////////////////////////////////
    94 void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector) {
     98void t_pppObsPool::putEpoch(const bncTime& epoTime, vector<t_pppSatObs*>& obsVector,
     99    bool pseudoObsIono) {
    95100  const unsigned MAXSIZE = 2;
    96   _epochs.push_back(new t_epoch(epoTime, obsVector));
     101
     102  if (epoReProcessing()) {
     103    delete _epochs.back();
     104    _epochs.pop_back();
     105  }
     106  _epochs.push_back(new t_epoch(epoTime, obsVector,pseudoObsIono));
    97107  if (_epochs.size() > MAXSIZE) {
    98108    delete _epochs.front();
  • trunk/BNC/src/PPP/pppObsPool.h

    r7288 r8905  
    44#include <vector>
    55#include <deque>
     6#include <QMap>
    67#include "pppSatObs.h"
    78#include "bnctime.h"
     9#include "pppRefSat.h"
    810
    911namespace BNC_PPP {
     
    1416  class t_epoch {
    1517   public:
    16     t_epoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector);
     18    t_epoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
     19            bool pseudoObsIono);
    1720    ~t_epoch();
    18     std::vector<t_pppSatObs*>& obsVector() {return _obsVector;}
     21          std::vector<t_pppSatObs*>& obsVector() {return _obsVector;}
    1922    const std::vector<t_pppSatObs*>& obsVector() const {return _obsVector;}
    2023    const bncTime& epoTime() const {return _epoTime;}
     24    bool pseudoObsIono() const {return _pseudoObsIono;}
    2125   private:
    22     bncTime                _epoTime;
     26    bncTime                   _epoTime;
    2327    std::vector<t_pppSatObs*> _obsVector;
     28    bool                      _pseudoObsIono;
    2429  };
    2530
     
    3035  void putTec(t_vTec* _vTec);
    3136
    32   void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector);
     37  void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
     38                bool pseudoObs);
    3339
    3440  const t_satCodeBias* satCodeBias(const t_prn& prn) const {
     
    4955  }
    5056
     57  void initRefSatMapElement(char system) {
     58    _refSatMap[system] = new t_pppRefSat();
     59  }
     60  void clearRefSatMap() {
     61    QMapIterator<char, t_pppRefSat*> it(_refSatMap);
     62    while (it.hasNext()) {
     63      it.next();
     64      delete it.value();
     65    }
     66    _refSatMap.clear();
     67  }
     68  t_pppRefSat* getRefSatMapElement(char system) {
     69    return _refSatMap[system];
     70  }
     71  QMap<char, t_pppRefSat*> getRefSatMap() {return _refSatMap;}
     72
     73  void setEpoReProcessing(bool epoReProcessing) {
     74    _epoReProcessing = epoReProcessing;
     75  }
     76  bool epoReProcessing() {return _epoReProcessing;}
     77
    5178 private:
    52   t_satCodeBias*       _satCodeBiases[t_prn::MAXPRN+1];
    53   t_satPhaseBias*      _satPhaseBiases[t_prn::MAXPRN+1];
    54   t_vTec*              _vTec;
    55   std::deque<t_epoch*> _epochs;
     79  t_satCodeBias*           _satCodeBiases[t_prn::MAXPRN+1];
     80  t_satPhaseBias*          _satPhaseBiases[t_prn::MAXPRN+1];
     81  t_vTec*                  _vTec;
     82  std::deque<t_epoch*>     _epochs;
     83  QMap<char, t_pppRefSat*> _refSatMap;
     84  bool                     _epoReProcessing;
    5685};
    5786
  • trunk/BNC/src/PPP/pppParlist.cpp

    r7988 r8905  
    9494     _noise   = OPT->_noiseTrp;
    9595     break;
     96    case ion:
     97     _epoSpec = false;
     98     _sigma0  = OPT->_aprSigIon;
     99     _noise   = OPT->_noiseIon;
     100     break;
     101   case cBias1:
     102   case cBias2:
     103     _epoSpec = false;
     104     _sigma0  = OPT->_aprSigCodeBias;
     105     _noise   = OPT->_noiseCodeBias;
     106     break;
     107   case pBias1:
     108   case pBias2:
     109     _epoSpec = false;
     110     _sigma0  = OPT->_aprSigPhaseBias;
     111     _noise   = OPT->_noisePhaseBias;
     112     break;
    96113  }
    97114}
     
    106123////////////////////////////////////////////////////////////////////////////
    107124double t_pppParam::partial(const bncTime& /* epoTime */, const t_pppSatObs* obs,
    108                         const t_lc::type& tLC) const {
     125                           const t_lc::type& tLC) const {//qDebug() << "t_pppParam::partial: " << tLC;
    109126
    110127  // Special Case - Melbourne-Wuebbena
     
    115132
    116133  const t_pppStation* sta  = PPP_CLIENT->staRover();
    117   ColumnVector     rhoV = sta->xyzApr() - obs->xc().Rows(1,3);
     134  ColumnVector        rhoV = sta->xyzApr() - obs->xc().Rows(1,3);
     135
     136  map<t_frequency::type, double> codeCoeff;
     137  map<t_frequency::type, double> phaseCoeff;
     138  map<t_frequency::type, double> ionoCoeff;
     139  obs->lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
    118140
    119141  switch (_type) {
    120142  case crdX:
    121     return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.norm_Frobenius();
     143    if (tLC == t_lc::GIM) {return 0.0;}
     144    return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.NormFrobenius();
    122145  case crdY:
    123     return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.norm_Frobenius();
     146    if (tLC == t_lc::GIM) {return 0.0;}
     147    return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.NormFrobenius();
    124148  case crdZ:
    125     return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.norm_Frobenius();
     149    if (tLC == t_lc::GIM) {return 0.0;}
     150    return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
    126151  case clkR:
     152    if (tLC == t_lc::GIM) {return 0.0;}
    127153    return 1.0;
    128154  case offGG:
     155    if (tLC == t_lc::GIM) {return 0.0;}
    129156    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
    130157  case amb:
     158    if      (tLC == t_lc::GIM) {return 0.0;}
     159    else if ((OPT->_obsModelType == OPT->IF)     ||
     160             (OPT->_obsModelType == OPT->PPPRTK) ||
     161             (OPT->_obsModelType == OPT->UncombPPP) ||
     162             (OPT->_obsModelType == OPT->DCMcodeBias  && !obs->isReference()) ||
     163             (OPT->_obsModelType == OPT->DCMphaseBias && !obs->isReference())   ) {
     164      if (obs->prn() == _prn) {
     165        if      (tLC == _tLC) {
     166          return (obs->lambda(tLC));
     167        }
     168        else if (tLC == t_lc::lIF && _tLC == t_lc::MW) {
     169          return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2);
     170        }
     171        else {
     172          if      (_tLC == t_lc::l1) {
     173            return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
     174          }
     175          else if (_tLC == t_lc::l2) {
     176            return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
     177          }
     178        }
     179      }
     180    }
     181    break;
     182  case trp:
     183    if (tLC == t_lc::GIM) {return 0.0;}
     184    return  1.0 / sin(obs->eleSat());
     185  case ion:
     186//    qDebug() << "refPrn: " << _refPrn.toString().c_str();
    131187    if (obs->prn() == _prn) {
    132       if      (tLC == _tLC) {
    133         return (obs->lambda(tLC));
    134       }
    135       else if (tLC == t_lc::lIF && _tLC == t_lc::MW) {
    136         return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2);
    137       }
    138       else {
    139         map<t_frequency::type, double> codeCoeff;
    140         map<t_frequency::type, double> phaseCoeff;
    141         obs->lcCoeff(tLC, codeCoeff, phaseCoeff);
    142         if      (_tLC == t_lc::l1) {
    143           return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
    144         }
    145         else if (_tLC == t_lc::l2) {
    146           return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
    147         }
    148       }
    149     }
    150     return 0.0;
    151   case trp:
    152     return 1.0 / sin(obs->eleSat());
    153   }
    154 
     188      if      (tLC == t_lc::c1) {
     189        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c1)];
     190      }
     191      else if (tLC == t_lc::c2) {
     192        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c2)];
     193      }
     194      else if (tLC == t_lc::l1) {
     195        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
     196      }
     197      else if (tLC == t_lc::l2) {
     198        return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
     199      }
     200      else if (tLC == t_lc::GIM) {
     201        return -1.0;
     202      }
     203    }
     204    if (tLC == t_lc::GIM && _prn == _refPrn) {
     205      return  1.0;
     206    }
     207    break;
     208  case cBias1:
     209    if  (tLC == t_lc::c1) {
     210      return  1.0;
     211    }
     212    else {
     213      return 0.0;
     214    }
     215    break;
     216  case cBias2:
     217     if (tLC == t_lc::c2) {
     218      return  1.0;
     219    }
     220    else {
     221      return 0.0;
     222    }
     223    break;
     224  case pBias1:
     225    if  (tLC == t_lc::l1) {
     226      return  1.0;
     227    }
     228    else {
     229      return 0.0;
     230    }
     231    break;
     232  case pBias2:
     233    if  (tLC == t_lc::l2) {
     234      return  1.0;
     235    }
     236    else {
     237      return 0.0;
     238    }
     239  }
    155240  return 0.0;
    156241}
     
    171256    break;
    172257  case clkR:
    173     ss << "CLK        ";
    174     break;
    175   case amb:
    176     ss << "AMB " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
     258    ss << "REC_CLK    ";
    177259    break;
    178260  case offGG:
     
    181263  case trp:
    182264    ss << "TRP        ";
     265    break;
     266  case amb:
     267    ss << "AMB  " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
     268    break;
     269  case ion:
     270    ss << "ION  " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
     271    break;
     272  case cBias1:
     273  case cBias2:
     274  case pBias1:
     275  case pBias2:
     276    ss << "BIAS " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << "REC";
    183277    break;
    184278  }
     
    201295//
    202296////////////////////////////////////////////////////////////////////////////
    203 t_irc t_pppParlist::set(const bncTime& epoTime, const std::vector<t_pppSatObs*>& obsVector) {
     297t_irc t_pppParlist::set(const bncTime& epoTime,
     298    const std::vector<t_pppSatObs*>& obsVector) {
    204299
    205300  // Remove some Parameters
     
    271366  required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy));
    272367
    273   // GPS-Glonass Clock Offset
     368  // GPS-GLONASS Clock Offset
    274369  // ------------------------
    275370  if (OPT->useSystem('R')) {
     
    283378  }
    284379
     380  // Ionosphere
     381  // ----------
     382  if (OPT->_obsModelType == OPT->UncombPPP    ||
     383      OPT->_obsModelType == OPT->DCMcodeBias  ||
     384      OPT->_obsModelType == OPT->DCMphaseBias   ) {
     385    for (unsigned jj = 0; jj < obsVector.size(); jj++) {
     386      const t_pppSatObs*        satObs = obsVector[jj];
     387      required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
     388    }
     389  }
     390
    285391  // Ambiguities
    286392  // -----------
    287393  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
    288394    const t_pppSatObs*        satObs = obsVector[jj];
    289     const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());
    290     for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
    291       required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
    292     }
     395    if ((OPT->_obsModelType == OPT->IF)        ||
     396        (OPT->_obsModelType == OPT->PPPRTK)    ||
     397        (OPT->_obsModelType == OPT->UncombPPP) ||
     398        (OPT->_obsModelType == OPT->DCMcodeBias  && !satObs->isReference()) ||
     399        (OPT->_obsModelType == OPT->DCMphaseBias && !satObs->isReference())   ) {
     400      const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());
     401      for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
     402        required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
     403      }
     404    }
     405  }
     406
     407  // Receiver Code Biases
     408  // --------------------
     409  if (OPT->_obsModelType == OPT->DCMcodeBias) {
     410    required.push_back(new t_pppParam(t_pppParam::cBias1, t_prn(), t_lc::c1));
     411    required.push_back(new t_pppParam(t_pppParam::cBias2, t_prn(), t_lc::c2));
     412  }
     413
     414  // Receiver Phase Biases
     415  // ---------------------
     416  if ((OPT->_obsModelType == OPT->DCMphaseBias) ||
     417      (OPT->_obsModelType == OPT->PPPRTK)     ) {
     418    required.push_back(new t_pppParam(t_pppParam::pBias1, t_prn(), t_lc::l1));
     419    required.push_back(new t_pppParam(t_pppParam::pBias2, t_prn(), t_lc::l2));
    293420  }
    294421
  • trunk/BNC/src/PPP/pppParlist.h

    r7237 r8905  
    1414class t_pppParam {
    1515 public:
    16   enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp};
     16  enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, ion, cBias1, cBias2, pBias1, pBias2};
    1717
    1818  t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
     
    2020
    2121  ~t_pppParam();
     22
    2223  e_type type() const {return _type;}
    2324  double x0()  const {return _x0;}
    24   double partial(const bncTime& epoTime, const t_pppSatObs* obs,
    25                  const t_lc::type& tLC) const;
     25  double partial(const bncTime& epoTime, const t_pppSatObs* obs, const t_lc::type& tLC) const;
    2626  bool   epoSpec() const {return _epoSpec;}
    2727  bool   isEqual(const t_pppParam* par2) const {
     
    5151  unsigned ambNumEpo() const           {return _ambInfo ? _ambInfo->_numEpo : 0;}
    5252  void     stepAmbNumEpo()             {if (_ambInfo) _ambInfo->_numEpo += 1;}
     53  void     setRefPrn(t_prn prn)        {_refPrn = prn;}
    5354
    5455  static bool sortFunction(const t_pppParam* p1, const t_pppParam* p2) {
     
    7879    unsigned _numEpo;
    7980  };
    80   e_type     _type;
    81   t_prn      _prn;
    82   t_lc::type _tLC;
    83   double     _x0;
    84   bool       _epoSpec;
    85   int        _indexOld;
    86   int        _indexNew;
    87   double     _sigma0;
    88   double     _noise;
    89   t_ambInfo* _ambInfo;
    90   bncTime    _lastObsTime;
    91   bncTime    _firstObsTime;
     81  e_type       _type;
     82  t_prn        _prn;
     83  t_prn        _refPrn;
     84  t_lc::type   _tLC;
     85  double       _x0;
     86  bool         _epoSpec;
     87  int          _indexOld;
     88  int          _indexNew;
     89  double       _sigma0;
     90  double       _noise;
     91  t_ambInfo*   _ambInfo;
     92  bncTime      _lastObsTime;
     93  bncTime      _firstObsTime;
    9294};
    9395
     
    100102  unsigned nPar() const {return _params.size();}
    101103  const std::vector<t_pppParam*>& params() const {return _params;}
    102   std::vector<t_pppParam*>& params() {return _params;}
    103   void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ, 
     104        std::vector<t_pppParam*>& params()      {return _params;}
     105  void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
    104106                   const ColumnVector& xx) const;
     107
    105108 private:
    106109  std::vector<t_pppParam*> _params;
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r8619 r8905  
    3535////////////////////////////////////////////////////////////////////////////
    3636t_pppSatObs::t_pppSatObs(const t_satObs& pppSatObs) {
    37   _prn     = pppSatObs._prn;
    38   _time    = pppSatObs._time;
    39   _outlier = false;
    40   _valid   = true;
     37  _prn        = pppSatObs._prn;
     38  _time       = pppSatObs._time;
     39  _outlier    = false;
     40  _valid      = true;
     41  _reference  = false;
     42  _stecRefSat = 0.0;
     43  _stecSat    = 0.0;
    4144  for (unsigned ii = 0; ii < t_frequency::max; ii++) {
    4245    _obs[ii] = 0;
     
    6164  // Select pseudoranges and phase observations
    6265  // ------------------------------------------
    63   const string preferredAttrib = "CWPXI_";
    64   //const string preferredAttrib = "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX";
     66  const string preferredAttrib = "G:12&PWCSLXYN G:5&IQX R:12&PC R:3&IQX E:16&BCX E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:IQX I:ABCX S:1&C S:5&IQX";
    6567
    6668  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     
    9092  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
    9193    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
     94    if (tLC == t_lc::GIM) {continue;}
    9295    if (!isValid(tLC)) {
    9396      _valid = false;
     
    121124    ColumnVector dx = _xcSat - satPosOld;
    122125    dx[3] *= t_CST::c;
    123     if (dx.norm_Frobenius() < 1.e-4) {
     126    if (dx.NormFrobenius() < 1.e-4) {
    124127      totOK = true;
    125128      break;
     
    140143void t_pppSatObs::lcCoeff(t_lc::type tLC,
    141144                          map<t_frequency::type, double>& codeCoeff,
    142                           map<t_frequency::type, double>& phaseCoeff) const {
     145                          map<t_frequency::type, double>& phaseCoeff,
     146                          map<t_frequency::type, double>& ionoCoeff) const {
    143147
    144148  codeCoeff.clear();
    145149  phaseCoeff.clear();
     150  ionoCoeff.clear();
    146151
    147152  double f1 = t_CST::freq(_fType1, _channel);
    148153  double f2 = t_CST::freq(_fType2, _channel);
     154  double f1GPS = t_CST::freq(t_frequency::G1, 0);
    149155
    150156  switch (tLC) {
    151157  case t_lc::l1:
    152     phaseCoeff[_fType1] = 1.0;
     158    phaseCoeff[_fType1] =  1.0;
     159    ionoCoeff [_fType1] = -1.0 * pow(f1GPS, 2) / pow(f1, 2);
    153160    return;
    154161  case t_lc::l2:
    155     phaseCoeff[_fType2] = 1.0;
     162    phaseCoeff[_fType2] =  1.0;
     163    ionoCoeff [_fType2] = -1.0 * pow(f1GPS, 2) / pow(f2, 2);
    156164    return;
    157165  case t_lc::lIF:
     
    167175  case t_lc::CL:
    168176    phaseCoeff[_fType1] =  0.5;
    169     codeCoeff[_fType1] =  0.5;
     177    codeCoeff [_fType1] =  0.5;
    170178    return;
    171179  case t_lc::c1:
    172180    codeCoeff[_fType1] = 1.0;
     181    ionoCoeff[_fType1] = pow(f1GPS, 2) / pow(f1, 2);
    173182    return;
    174183  case t_lc::c2:
    175184    codeCoeff[_fType2] = 1.0;
     185    ionoCoeff[_fType2] = pow(f1GPS, 2) / pow(f2, 2);
    176186    return;
    177187  case t_lc::cIF:
     
    179189    codeCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
    180190    return;
     191  case t_lc::GIM:
    181192  case t_lc::dummy:
    182193  case t_lc::maxLc:
     
    190201  bool valid = true;
    191202  obsValue(tLC, &valid);
     203  //qDebug() << "tLC: " << tLC << "  valid: " << valid;
    192204  return valid;
    193205}
     
    195207////////////////////////////////////////////////////////////////////////////
    196208double t_pppSatObs::obsValue(t_lc::type tLC, bool* valid) const {
     209
     210  double retVal = 0.0;
     211  if (valid) *valid = true;
     212
     213  // Pseudo observations
     214  if (tLC == t_lc::GIM) {
     215    if (_stecRefSat == 0.0 || _stecSat == 0.0) {
     216      if (valid) *valid = false;
     217      return 0.0;
     218    }
     219    else {
     220      return _stecRefSat - _stecSat;
     221    }
     222  }
    197223
    198224  map<t_frequency::type, double> codeCoeff;
    199225  map<t_frequency::type, double> phaseCoeff;
    200   lcCoeff(tLC, codeCoeff, phaseCoeff);
    201 
    202   double retVal = 0.0;
    203   if (valid) *valid = true;
     226  map<t_frequency::type, double> ionoCoeff;
     227  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
    204228
    205229  map<t_frequency::type, double>::const_iterator it;
     230
     231  // Code observations
    206232  for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
    207233    t_frequency::type tFreq = it->first;
     
    214240    }
    215241  }
     242  // Phase observations
    216243  for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
    217244    t_frequency::type tFreq = it->first;
     
    224251    }
    225252  }
    226 
    227253  return retVal;
    228254}
     
    258284double t_pppSatObs::sigma(t_lc::type tLC) const {
    259285
     286  double retVal = 0.0;
    260287  map<t_frequency::type, double> codeCoeff;
    261288  map<t_frequency::type, double> phaseCoeff;
    262   lcCoeff(tLC, codeCoeff, phaseCoeff);
    263 
    264   double retVal = 0.0;
     289  map<t_frequency::type, double> ionoCoeff;
     290  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
     291
     292  if (tLC == t_lc::GIM) {
     293    retVal = OPT->_sigmaGIMdiff * OPT->_sigmaGIMdiff;
     294  }
    265295
    266296  map<t_frequency::type, double>::const_iterator it;
    267   for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
     297  for (it = codeCoeff.begin(); it != codeCoeff.end(); it++)   {//qDebug() << "codeCoeff : " << t_frequency::toString(it->first).c_str() << ": " << it->second;
    268298    retVal += it->second * it->second * OPT->_sigmaC1 * OPT->_sigmaC1;
    269299  }
    270   for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
     300
     301  for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {//qDebug() << "phaseCoeff: " << t_frequency::toString(it->first).c_str()  << ": " << it->second;
    271302    retVal += it->second * it->second * OPT->_sigmaL1 * OPT->_sigmaL1;
    272303  }
     
    295326//
    296327////////////////////////////////////////////////////////////////////////////
    297 double t_pppSatObs::maxRes(t_lc::type tLC) const {
     328double t_pppSatObs::maxRes(t_lc::type tLC) const {//qDebug() << "t_pppSatObs::maxRes(t_lc::type tLC)";
     329  double retVal = 0.0;
    298330
    299331  map<t_frequency::type, double> codeCoeff;
    300332  map<t_frequency::type, double> phaseCoeff;
    301   lcCoeff(tLC, codeCoeff, phaseCoeff);
    302 
    303   double retVal = 0.0;
     333  map<t_frequency::type, double> ionoCoeff;
     334  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
    304335
    305336  map<t_frequency::type, double>::const_iterator it;
    306   for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
     337  for (it = codeCoeff.begin(); it != codeCoeff.end(); it++)   {//qDebug() << "codeCoeff: " << it->first << ": " << it->second;
    307338    retVal += it->second * it->second * OPT->_maxResC1 * OPT->_maxResC1;
    308339  }
    309   for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
     340  for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {//qDebug() << "phaseCoeff: " << it->first << ": " << it->second;
    310341    retVal += it->second * it->second * OPT->_maxResL1 * OPT->_maxResL1;
    311342  }
    312 
     343  if (tLC == t_lc::GIM) {
     344    retVal = 3 * (OPT->_sigmaGIMdiff * OPT->_sigmaGIMdiff);
     345  }
    313346  return sqrt(retVal);
    314347}
     
    326359  // ------------------------------
    327360  ColumnVector rSat = _xcSat.Rows(1,3);
    328   ColumnVector rhoV = rSat - station->xyzApr();
    329   _model._rho = rhoV.norm_Frobenius();
     361  ColumnVector rRec = station->xyzApr();
     362  ColumnVector rhoV = rSat - rRec;
     363  _model._rho = rhoV.NormFrobenius();
    330364
    331365  ColumnVector vSat = _vvSat;
     
    334368  xyz2neu(station->ellApr().data(), rhoV.data(), neu.data());
    335369
    336   _model._eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / _model._rho );
     370  _model._eleSat = acos(sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / _model._rho);
    337371  if (neu[2] < 0) {
    338372    _model._eleSat *= -1.0;
     
    354388  Omega[1] = 0.0;
    355389  Omega[2] = t_CST::omega / t_CST::c;
    356   _model._sagnac = DotProduct(Omega, crossproduct(rSat, station->xyzApr()));
     390  _model._sagnac = DotProduct(Omega, crossproduct(rSat, rRec));
    357391
    358392  // Antenna Eccentricity
     
    373407  // Tropospheric Delay
    374408  // ------------------
    375   _model._tropo = t_tropo::delay_saast(station->xyzApr(), _model._eleSat);
     409  _model._tropo = t_tropo::delay_saast(rRec, _model._eleSat);
    376410
    377411  // Code Biases
     
    392426  // Phase Biases
    393427  // -----------
    394   // TODO: consideration of fix indicators and jump counter
    395428  const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn);
    396429  double yaw = 0.0;
    397430  bool ssr = false;
    398431  if (satPhaseBias) {
    399     yaw = satPhaseBias->_yaw;
     432    double dt = station->epochTime() - satPhaseBias->_time;
     433    if (satPhaseBias->_updateInt) {
     434      dt -= (0.5 * ssrUpdateInt[satPhaseBias->_updateInt]);
     435    }
     436    yaw = satPhaseBias->_yaw + satPhaseBias->_yawRate * dt;
    400437    ssr = true;
    401438    for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) {
     
    414451  _model._windUp = station->windUp(_time, _prn, rSat, ssr, yaw, vSat) ;
    415452
     453  // Relativistic effect due to earth gravity
     454  // ----------------------------------------
     455  double a = rSat.NormFrobenius() + rRec.NormFrobenius();
     456  double b = (rSat - rRec).NormFrobenius();
     457  double gm = 3.986004418e14; // m3/s2
     458  _model._rel = 2 * gm / t_CST::c / t_CST::c * log((a + b) / (a - b));
    416459
    417460  // Tidal Correction
    418461  // ----------------
    419   _model._tide = -DotProduct(station->tideDspl(), rhoV) / _model._rho;
     462  _model._tideEarth = -DotProduct(station->tideDsplEarth(), rhoV) / _model._rho;
     463  _model._tideOcean = -DotProduct(station->tideDsplOcean(), rhoV) / _model._rho;
    420464
    421465  // Ionospheric Delay
     
    429473    }
    430474  }
     475
    431476  if (vTecUsage && vTec) {
    432     double stec = station->stec(vTec, _signalPropagationTime, rSat);
     477    double stec  = station->stec(vTec, _signalPropagationTime, rSat);
     478    double f1GPS = t_CST::freq(t_frequency::G1, 0);
    433479    for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
    434       t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
    435       _model._ionoCodeDelay[iFreq] = 40.3E16 / pow(t_CST::freq(frqType, _channel), 2) * stec;
    436     }
    437   }
    438 
    439   // Relativistic effect due to earth gravity
    440   // ----------------------------------------
    441   // TODO
    442 
    443   // Ocean Loading
    444   // -------------
    445   // TODO
     480      if (OPT->_pseudoObsIono) { // DCMcodeBias, DCMphaseBias
     481        // For scaling the slant ionospheric delays the trick is to be consistent with units!
     482        // The conversion of TECU into meters requires the frequency of the signal.
     483        // Hence, GPS L1 frequency is used for all systems. The same is true for mu_i in lcCoeff().
     484        _model._ionoCodeDelay[iFreq] = 40.3E16 / pow(f1GPS, 2) * stec;
     485      }
     486      else { // PPP-RTK
     487        t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
     488        _model._ionoCodeDelay[iFreq] = 40.3E16 / pow(t_CST::freq(frqType, _channel), 2) * stec;
     489      }
     490    }
     491  }
    446492
    447493  // Set Model Set Flag
     
    449495  _model._set = true;
    450496
    451   //printModel();
     497  printModel();
    452498
    453499  return success;
     
    457503////////////////////////////////////////////////////////////////////////////
    458504void t_pppSatObs::printModel() const {
    459 
    460   LOG.setf(ios::fixed);
    461   LOG << "MODEL for Satellite " << _prn.toString() << endl
    462       << "RHO:        " << setw(12) << setprecision(3) << _model._rho     << endl
    463       << "ELE:        " << setw(12) << setprecision(3) << _model._eleSat * 180.0 / M_PI << endl
    464       << "AZI:        " << setw(12) << setprecision(3) << _model._azSat  * 180.0 / M_PI << endl
    465       << "SATCLK:     " << setw(12) << setprecision(3) << _model._satClkM << endl
    466       << "RECCLK:     " << setw(12) << setprecision(3) << _model._recClkM << endl
    467       << "SAGNAC:     " << setw(12) << setprecision(3) << _model._sagnac  << endl
    468       << "ANTECC:     " << setw(12) << setprecision(3) << _model._antEcc  << endl
    469       << "TROPO:      " << setw(12) << setprecision(3) << _model._tropo   << endl
    470       << "WINDUP:     " << setw(12) << setprecision(3) << _model._windUp  << endl
    471       << "TIDES:      " << setw(12) << setprecision(3) << _model._tide    << endl;
     505// TODO: cout should be LOG
     506  cout.setf(ios::fixed);
     507  cout << "\nMODEL for Satellite " << _prn.toString() << (isReference() ? " (Reference Satellite)" : "") << endl
     508       << "======================= " << endl
     509       << "PPP STRATEGY  : " <<  OPT->_obsmodelTypeStr.at((int)OPT->_obsModelType).toLocal8Bit().constData()
     510       <<  ((OPT->_pseudoObsIono) ? " with pseudo-observations for STEC" : "")  <<  endl
     511      << "RHO           : " << setw(12) << setprecision(3) << _model._rho              << endl
     512      << "ELE           : " << setw(12) << setprecision(3) << _model._eleSat * RHO_DEG << endl
     513      << "AZI           : " << setw(12) << setprecision(3) << _model._azSat  * RHO_DEG << endl
     514      << "SATCLK        : " << setw(12) << setprecision(3) << _model._satClkM          << endl
     515      << "RECCLK        : " << setw(12) << setprecision(3) << _model._recClkM          << endl
     516      << "SAGNAC        : " << setw(12) << setprecision(3) << _model._sagnac           << endl
     517      << "ANTECC        : " << setw(12) << setprecision(3) << _model._antEcc           << endl
     518      << "TROPO         : " << setw(12) << setprecision(3) << _model._tropo            << endl
     519      << "WINDUP        : " << setw(12) << setprecision(3) << _model._windUp           << endl
     520      << "REL           : " << setw(12) << setprecision(3) << _model._rel              << endl
     521      << "EARTH TIDES   : " << setw(12) << setprecision(3) << _model._tideEarth        << endl
     522      << "OCEAN TIDES   : " << setw(12) << setprecision(3) << _model._tideOcean        << endl
     523      << endl
     524      << "FREQUENCY DEPENDENT CORRECTIONS:" << endl
     525      << "-------------------------------" << endl;
    472526  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
    473527    if (_obs[iFreq]) {
    474528      string frqStr = t_frequency::toString(t_frequency::type(iFreq));
    475529      if (_prn.system() == frqStr[0]) {
    476       LOG << "PCO           : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq]    << endl
    477           << "BIAS CODE     : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq]  << endl
    478           << "BIAS PHASE    : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq]  << endl
    479           << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq] << endl;
    480       }
    481     }
    482   }
     530      cout << "PCO           : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq]       << endl
     531           << "BIAS CODE     : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq]     << endl
     532           << "BIAS PHASE    : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq]    << endl
     533           << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq]<< endl;
     534      }
     535    }
     536  }
     537}
     538
     539//
     540////////////////////////////////////////////////////////////////////////////
     541void t_pppSatObs::printObsMinusComputed() const {
     542// TODO: cout should be LOG
     543  cout.setf(ios::fixed);
     544  cout << "\nOBS-COMP for Satellite " << _prn.toString() << (isReference() ? " (Reference Satellite)" : "") << endl
     545       << "========================== " << endl;
    483546  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
    484547    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
    485     LOG << "OBS-CMP " << t_lc::toString(tLC) << ": " << _prn.toString() << " "
     548    cout << "OBS-CMP " << setw(4) << t_lc::toString(tLC) << ": " << _prn.toString() << " "
    486549        << setw(12) << setprecision(3) << obsValue(tLC) << " "
    487550        << setw(12) << setprecision(3) << cmpValue(tLC) << " "
    488551        << setw(12) << setprecision(3) << obsValue(tLC) - cmpValue(tLC) << endl;
    489 
    490   }
    491   LOG << "OBS-CMP MW: " << _prn.toString() << " "
    492       << setw(12) << setprecision(3) << obsValue(t_lc::MW) << " "
    493       << setw(12) << setprecision(3) << cmpValue(t_lc::MW) << " "
    494       << setw(12) << setprecision(3) << obsValue(t_lc::MW) - cmpValue(t_lc::MW) << endl;
    495 }
     552  }
     553}
     554
    496555
    497556//
     
    504563////////////////////////////////////////////////////////////////////////////
    505564double t_pppSatObs::cmpValue(t_lc::type tLC) const {
    506 
    507   if (!isValid(tLC)) {
    508     return 0.0;
    509   }
    510 
    511   // Non-Dispersive Part
    512   // -------------------
    513   double nonDisp = _model._rho    + _model._recClkM - _model._satClkM
    514                  + _model._sagnac + _model._antEcc  + _model._tropo
    515                  + _model._tide;
    516 
    517   // Add Dispersive Part
    518   // -------------------
    519   map<t_frequency::type, double> codeCoeff;
    520   map<t_frequency::type, double> phaseCoeff;
    521   lcCoeff(tLC, codeCoeff, phaseCoeff);
    522 
    523   double dispPart = 0.0;
    524 
    525   map<t_frequency::type, double>::const_iterator it;
    526   for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
    527     t_frequency::type tFreq = it->first;
    528     dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq] +
    529                               _model._ionoCodeDelay[tFreq]);
    530   }
    531   for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
    532     t_frequency::type tFreq = it->first;
    533     dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] +
    534                               _model._windUp * t_CST::lambda(tFreq, _channel)  -
    535                               _model._ionoCodeDelay[tFreq]);
    536   }
    537 
    538     return nonDisp + dispPart;
     565  double cmpValue;
     566
     567  if      (!isValid(tLC)) {
     568    cmpValue =  0.0;
     569  }
     570  else if (tLC == t_lc::GIM) {
     571    cmpValue = 0.0;
     572  }
     573  else {
     574    // Non-Dispersive Part
     575    // -------------------
     576    double nonDisp = _model._rho
     577                   + _model._recClkM   - _model._satClkM
     578                   + _model._sagnac    + _model._antEcc    + _model._tropo
     579                   + _model._tideEarth + _model._tideOcean + _model._rel;
     580
     581    // Add Dispersive Part
     582    // -------------------
     583    double dispPart = 0.0;
     584    map<t_frequency::type, double> codeCoeff;
     585    map<t_frequency::type, double> phaseCoeff;
     586    map<t_frequency::type, double> ionoCoeff;
     587    lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
     588    map<t_frequency::type, double>::const_iterator it;
     589    for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
     590      t_frequency::type tFreq = it->first;
     591      dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]);
     592      if (OPT->PPPRTK) {
     593        dispPart += it->second * (_model._ionoCodeDelay[tFreq]);
     594      }
     595    }
     596    for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
     597      t_frequency::type tFreq = it->first;
     598      dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] +
     599                                _model._windUp * t_CST::lambda(tFreq, _channel));
     600      if (OPT->PPPRTK) {
     601        dispPart += it->second * (- _model._ionoCodeDelay[tFreq]);
     602      }
     603    }
     604    cmpValue = nonDisp + dispPart;
     605  }
     606
     607  return cmpValue;
    539608}
    540609
     
    556625  }
    557626}
     627
     628//
     629////////////////////////////////////////////////////////////////////////////
     630void  t_pppSatObs::setPseudoObsIono(t_frequency::type freq, double stecRefSat) {
     631  _stecSat    = _model._ionoCodeDelay[freq];
     632  _stecRefSat = stecRefSat;
     633}
  • trunk/BNC/src/PPP/pppSatObs.h

    r8619 r8905  
    1919  bool                isValid() const {return _valid;};
    2020  bool                isValid(t_lc::type tLC) const;
     21  bool                isReference() const {return _reference;};
     22  void                setAsReference() {_reference = true;};
    2123  const t_prn&        prn() const {return _prn;}
    2224  const ColumnVector& xc() const {return _xcSat;}
     
    3133  bool                modelSet() const {return _model._set;}
    3234  void                printModel() const;
     35  void                printObsMinusComputed() const;
    3336  void                lcCoeff(t_lc::type tLC,
    3437                              std::map<t_frequency::type, double>& codeCoeff,
    35                               std::map<t_frequency::type, double>& phaseCoeff) const;
     38                              std::map<t_frequency::type, double>& phaseCoeff,
     39                              std::map<t_frequency::type, double>& ionoCoeff) const;
    3640  double              lambda(t_lc::type tLC) const;
    3741  double              sigma(t_lc::type tLC) const;
     
    4145  void                setRes(t_lc::type tLC, double res);
    4246  double              getRes(t_lc::type tLC) const;
     47  void                setPseudoObsIono(t_frequency::type freq, double stecRefSat);
     48  double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
    4349
    4450  // RINEX
     
    7985    ~t_model() {}
    8086    void reset() {
    81       _set     = false;
    82       _rho     = 0.0;
    83       _eleSat  = 0.0;
    84       _azSat   = 0.0;
    85       _recClkM = 0.0;
    86       _satClkM = 0.0;
    87       _sagnac  = 0.0;
    88       _antEcc  = 0.0;
    89       _tropo   = 0.0;
    90       _tide    = 0.0;
    91       _windUp  = 0.0;
    92       _rel    = 0.0;
     87      _set       = false;
     88      _rho       = 0.0;
     89      _eleSat    = 0.0;
     90      _azSat     = 0.0;
     91      _recClkM   = 0.0;
     92      _satClkM   = 0.0;
     93      _sagnac    = 0.0;
     94      _antEcc    = 0.0;
     95      _tropo     = 0.0;
     96      _tideEarth = 0.0;
     97      _tideOcean = 0.0;
     98      _windUp    = 0.0;
     99      _rel       = 0.0;
    93100      for (unsigned ii = 0; ii < t_frequency::max; ii++) {
    94101        _antPCO[ii]        = 0.0;
     
    107114    double _antEcc;
    108115    double _tropo;
    109     double _tide;
     116    double _tideEarth;
     117    double _tideOcean;
    110118    double _windUp;
    111119    double _rel;
     
    119127
    120128  bool                         _valid;
     129  bool                         _reference;
    121130  t_frequency::type            _fType1;
    122131  t_frequency::type            _fType2;
     
    131140  std::map<t_lc::type, double> _res;
    132141  double                       _signalPropagationTime;
     142  double                       _stecRefSat;
     143  double                       _stecSat;
    133144};
    134145
  • trunk/BNC/src/PPP/pppStation.h

    r8619 r8905  
    2121  void setNeuEcc(const ColumnVector& neuEcc);
    2222  void setDClk(double dClk) {_dClk = dClk;}
    23   void setTideDspl(const ColumnVector& tideDspl) {_tideDspl = tideDspl;}
    24   void setIonoEpochTime(const bncTime& epochTime) {_epochTime = epochTime;}
     23  void setTideDsplEarth(const ColumnVector& tideDsplEarth) {_tideDsplEarth = tideDsplEarth;}
     24  void setTideDsplOcean(const ColumnVector& tideDsplOcean) {_tideDsplOcean = tideDsplOcean;}
     25  void setEpochTime(const bncTime& epochTime) {_epochTime = epochTime;}
    2526  const std::string&  name()      const {return _name;}
    2627  const std::string&  antName()   const {return _antName;}
     
    2930  const ColumnVector& neuEcc()    const {return _neuEcc;}
    3031  const ColumnVector& xyzEcc()    const {return _xyzEcc;}
    31   const ColumnVector& tideDspl()  const {return _tideDspl;}
     32  const ColumnVector& tideDsplEarth()  const {return _tideDsplEarth;}
     33  const ColumnVector& tideDsplOcean()  const {return _tideDsplOcean;}
     34  const bncTime       epochTime() const {return _epochTime;}
    3235  double dClk() const {return _dClk;}
    3336  double windUp(const bncTime& time, t_prn prn, const ColumnVector& rSat, bool ssr,
     
    4245  ColumnVector      _neuEcc;
    4346  ColumnVector      _xyzEcc;
    44   ColumnVector      _tideDspl;
     47  ColumnVector      _tideDsplEarth;
     48  ColumnVector      _tideDsplOcean;
    4549  double            _dClk;
    4650  mutable t_windUp* _windUp;
Note: See TracChangeset for help on using the changeset viewer.