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


Ignore:
Timestamp:
Jun 29, 2020, 10:09:16 AM (4 years ago)
Author:
stuerze
Message:

PPP update: pseudo obs tropo added

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

Legend:

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

    r8956 r8961  
    220220        satObs->setPseudoObsIono(t_frequency::G1, stecRef);
    221221      }
    222       satObs->printObsMinusComputed();
    223222      it++;
    224223    }
    225224  }
    226 
     225  if (_opt->_pseudoObsTropo) {
     226    vector<t_pppSatObs*>::iterator it = obsVector.begin();
     227    while (it != obsVector.end()) {
     228      t_pppSatObs* satObs = *it;
     229      if (satObs->isReference()) {
     230        satObs->setPseudoObsTropo();
     231      }
     232      it++;
     233    }
     234  }
     235/*
     236  vector<t_pppSatObs*>::iterator it = obsVector.begin();
     237      while (it != obsVector.end()) {
     238        t_pppSatObs* satObs = *it;
     239        satObs->printObsMinusComputed();
     240        it++;
     241      }
     242*/
    227243  return pseudoObsIono;
    228244}
  • trunk/BNC/src/PPP/pppFilter.cpp

    r8956 r8961  
    117117  // Init Datum Trafo
    118118  // ----------------------------------------
    119   if ((OPT->_obsModelType == OPT->DCMcodeBias ||
    120        OPT->_obsModelType == OPT->DCMphaseBias) &&
    121       (_numEpoProcessing == 1)) {
     119  if ((OPT->_obsModelType == OPT->DCMcodeBias   ||
     120       OPT->_obsModelType == OPT->DCMphaseBias) && (_numEpoProcessing == 1)) {
    122121    _numAllUsedLCs = 0;
    123122    for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
    124123      char system = OPT->systems()[iSys];
    125124      _numAllUsedLCs += OPT->LCs(system).size();
    126       if (OPT->_pseudoObsIono && !epoch->pseudoObsIono()) {
     125      if (OPT->_pseudoObsIono && epoch->pseudoObsIono() == false) {
    127126        _numAllUsedLCs -= 1;  // GIM not used
    128127      }
    129128    }
    130     int maxObs = allObs.size() * _numAllUsedLCs;
     129    int modify = 0;
     130    if (OPT->_pseudoObsTropo) {
     131      modify  = -1;
     132    }
     133    // max Obs
     134    int maxObs = allObs.size() * (_numAllUsedLCs + modify);
     135    if (OPT->_pseudoObsIono && epoch->pseudoObsIono() == true) { // stecDiff w.r.t refSat
     136      maxObs -= 1;
     137    }
     138    if (OPT->_pseudoObsTropo) {
     139      maxObs += 1;  // once per station
     140    }
    131141    _datumTrafo->initAA(maxObs, _parlist->nPar());
    132142  }
     
    144154        _refPrn = (_obsPool->getRefSatMapElement(system))->prn();
    145155        if (_obsPool->hasHistoricalRefSat(_refPrn)) {
     156          LOG << epoTimeStr << " Warning: prevent to process erroneous refSat again!";
    146157          return failure;
    147158        }
     
    219230  }
    220231
    221   unsigned usedLCs = LCs.size(); //qDebug() << "usedLCs: " << usedLCs;
     232  unsigned usedLCs = LCs.size();
    222233  if (OPT->_pseudoObsIono && !pseudoObsIonoAvailable) {
    223234    usedLCs -= 1;  // GIM not used
    224235  }
     236
    225237  ColumnVector               xSav       = _xFlt;
    226238  SymmetricMatrix            QSav       = _QFlt;
    227239  string                     epoTimeStr = string(_epoTime);
    228240  const vector<t_pppParam*>& params     = _parlist->params();
    229   unsigned                   maxObs     = obsVector.size() * usedLCs;
    230   //unsigned                   maxObs     = 2 * usedLCs;
    231 
     241  int modify = 0;
     242  if (OPT->_pseudoObsTropo) {
     243    modify  = -1;
     244  }
     245  // max Obs
     246  unsigned maxObs = obsVector.size() * (usedLCs + modify);
    232247  if (OPT->_pseudoObsIono && pseudoObsIonoAvailable) { // stecDiff w.r.t refSat
    233248    maxObs -= 1;
     249  }
     250  if (OPT->_pseudoObsTropo) {
     251    maxObs +=1;   // tropo pseudo obs once per station
    234252  }
    235253
     
    257275        for (unsigned jj = 0; jj < usedLCs; jj++) {
    258276          const t_lc::type tLC = LCs[jj];
    259           if (tLC == t_lc::GIM &&  obs->isReference()) {continue;}
     277          if (tLC == t_lc::GIM && obs->isReference()) {continue;}
     278          if (tLC == t_lc::Tz0 && ii+1 != obsVector.size()) {continue;}
    260279          ++iObs;
    261280          usedObs.push_back(obs);
     
    417436          _slips[obs->prn()]._obsSlipCounter = obs->slipCounter();
    418437        }
    419 
    420438        if (_slips[obs->prn()]._biasJumpCounter != -1 &&
    421439            _slips[obs->prn()]._biasJumpCounter != obs->biasJumpCounter()) {
     
    468486t_irc t_pppFilter::resetAmb(t_prn prn, const vector<t_pppSatObs*>& obsVector,
    469487                            SymmetricMatrix* QSav, ColumnVector* xSav) {
    470 
     488                           
    471489  t_irc irc = failure;
    472490  vector<t_pppParam*>& params = _parlist->params();
     
    587605////////////////////////////////////////////////////////////////////////////
    588606void t_pppFilter::datumTransformation(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld) {
    589 
    590607  Matrix D21 = _datumTrafo->computeTrafoMatrix();
    591608  _QFlt << D21 * QFltOld * D21.t();
  • trunk/BNC/src/PPP/pppParlist.cpp

    r8956 r8961  
    141141  switch (_type) {
    142142  case crdX:
    143     if (tLC == t_lc::GIM) {return 0.0;}
     143    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    144144    return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.NormFrobenius();
    145145  case crdY:
    146     if (tLC == t_lc::GIM) {return 0.0;}
     146    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    147147    return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.NormFrobenius();
    148148  case crdZ:
    149     if (tLC == t_lc::GIM) {return 0.0;}
     149    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    150150    return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
    151151  case clkR:
    152     if (tLC == t_lc::GIM) {return 0.0;}
     152    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    153153    return 1.0;
    154154  case offGG:
    155     if (tLC == t_lc::GIM) {return 0.0;}
     155    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    156156    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
    157157  case amb:
    158     if      (tLC == t_lc::GIM) {return 0.0;}
     158    if      (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;}
    159159    else if ((OPT->_obsModelType == OPT->IF)     ||
    160160             (OPT->_obsModelType == OPT->PPPRTK) ||
     
    181181    break;
    182182  case trp:
    183     if (tLC == t_lc::GIM) {return 0.0;}
    184     return  1.0 / sin(obs->eleSat());
     183    if      (tLC == t_lc::GIM) {
     184      return 0.0;
     185    }
     186    else if (tLC == t_lc::Tz0) {
     187      return 1.0;
     188    }
     189    else {
     190      return 1.0 / sin(obs->eleSat());
     191    }
    185192  case ion:
    186 
    187193    if (obs->prn() == _prn) {
    188194      if      (tLC == t_lc::c1) {
     
    203209    }
    204210    if (tLC == t_lc::GIM && _prn == refPrn) {
    205       return  1.0;
     211      return 1.0;
    206212    }
    207213    break;
    208214  case cBias1:
    209215    if  (tLC == t_lc::c1) {
    210       return  1.0;
     216      return 1.0;
    211217    }
    212218    else {
     
    216222  case cBias2:
    217223     if (tLC == t_lc::c2) {
    218       return  1.0;
     224      return 1.0;
    219225    }
    220226    else {
     
    224230  case pBias1:
    225231    if  (tLC == t_lc::l1) {
    226       return  1.0;
     232      return 1.0;
    227233    }
    228234    else {
     
    232238  case pBias2:
    233239    if  (tLC == t_lc::l2) {
    234       return  1.0;
     240      return 1.0;
    235241    }
    236242    else {
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r8956 r8961  
    9292  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
    9393    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
    94     if (tLC == t_lc::GIM) {continue;}
     94    if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {continue;}
    9595    if (!isValid(tLC)) {
    9696      _valid = false;
     
    190190    return;
    191191  case t_lc::GIM:
     192  case t_lc::Tz0:
    192193  case t_lc::dummy:
    193194  case t_lc::maxLc:
     
    218219    }
    219220    else {
    220       return _stecRefSat - _stecSat;
    221     }
     221      return _stecRefSat;
     222    }
     223  }
     224
     225  if (tLC == t_lc::Tz0) {
     226    return _model._tropo0;
    222227  }
    223228
     
    292297  if (tLC == t_lc::GIM) {
    293298    retVal = OPT->_sigmaGIMdiff * OPT->_sigmaGIMdiff;
     299  }
     300
     301  if (tLC == t_lc::Tz0) {
     302    retVal = OPT->_sigmaTz0 * OPT->_sigmaTz0;
    294303  }
    295304
     
    407416  // Tropospheric Delay
    408417  // ------------------
    409   _model._tropo = t_tropo::delay_saast(rRec, _model._eleSat);
     418  _model._tropo  = t_tropo::delay_saast(rRec, _model._eleSat);
     419  _model._tropo0 = t_tropo::delay_saast(rRec, M_PI/2.0);
    410420
    411421  // Code Biases
     
    570580  }
    571581  else if (tLC == t_lc::GIM) {
    572     cmpValue = 0.0;
     582    cmpValue =  _stecSat;
     583  }
     584  else if (tLC == t_lc::Tz0) {
     585    cmpValue = _model._tropo0;
    573586  }
    574587  else {
     
    633646  _stecRefSat = stecRefSat;
    634647}
     648
     649
     650//
     651////////////////////////////////////////////////////////////////////////////
     652void  t_pppSatObs::setPseudoObsTropo() {qDebug() << "setPseudoObsTropo";
     653  _tropo0 = _model._tropo0;
     654}
  • trunk/BNC/src/PPP/pppSatObs.h

    r8905 r8961  
    4646  double              getRes(t_lc::type tLC) const;
    4747  void                setPseudoObsIono(t_frequency::type freq, double stecRefSat);
     48  void                setPseudoObsTropo();
    4849  double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
    4950
     
    9495      _antEcc    = 0.0;
    9596      _tropo     = 0.0;
     97      _tropo0    = 0.0;
    9698      _tideEarth = 0.0;
    9799      _tideOcean = 0.0;
     
    114116    double _antEcc;
    115117    double _tropo;
     118    double _tropo0;
    116119    double _tideEarth;
    117120    double _tideOcean;
     
    142145  double                       _stecRefSat;
    143146  double                       _stecSat;
     147  double                       _tropo0;
    144148};
    145149
Note: See TracChangeset for help on using the changeset viewer.