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


Ignore:
Timestamp:
Nov 11, 2026, 8:57:49 AM (5 days ago)
Author:
stuerze
Message:

some PPP updates

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

Legend:

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

    r11195 r11196  
    2727//
    2828//////////////////////////////////////////////////////////////////////////////////////////
    29 bool AmbRes::isResolvable(const t_pppParam* amb) {
    30   if ( amb->ambNumEpo() >= OPT->_ar._minNumEpo && amb->ambEleSat() >= OPT->_ar._minEle) {
    31     return true;
    32   }
    33   else {
     29bool AmbRes::isResolvable(const bncTime& epoTime, const t_pppParam* amb, std::ostream& msg) {
     30
     31  // Satellite not observed in the current epoch (parameter kept up to 60 s)
     32  // -----------------------------------------------------------------------
     33  if (amb->lastObsTime() != epoTime) {
     34    msg << "  " << amb->prn().toString() << ' ' << amb->LC().toString()
     35        << " not observed, not resolvable" << endl;
    3436    return false;
    3537  }
     38
     39  if ( amb->ambNumEpo() < OPT->_ar._minNumEpo || amb->ambEleSat() < OPT->_ar._minEle) {
     40    return false;
     41  }
     42  return true;
    3643}
    3744
    … …  
    113120    for (const auto& par : params) {
    114121      if (par->type() == t_pppParam::amb && par->prn().system() == system) {
    115         if (isResolvable(par)) {
     122        if (isResolvable(epoTime, par, msg)) {
    116123          addToGroup(par);
    117124        }
  • trunk/BNC/src/PPP/ambres.h

    r11195 r11196  
    5050    };
    5151
    52     static bool isResolvable(const t_pppParam* amb);
     52    static bool isResolvable(const bncTime& epoTime, const t_pppParam* amb, std::ostream& msg);
    5353    static bool isFixable(double xx, double sigma, bool* checked = 0);
    5454
  • trunk/BNC/src/PPP/pppClient.cpp

    r11123 r11196  
    406406  _output->_numSat = 0;
    407407  _output->_hDop   = 0.0;
     408  _output->_resRmsCode  = 0.0;
     409  _output->_resRmsPhase = 0.0;
    408410  _output->_error  = false;
    409411}
    … …  
    446448    _output->_numSat   = _filter->numSat();
    447449    _output->_hDop     = _filter->HDOP();
     450    _output->_resRmsCode  = _filter->resRmsCode();
     451    _output->_resRmsPhase = _filter->resRmsPhase();
    448452    _output->_error = false;
    449453  }
  • trunk/BNC/src/PPP/pppFilter.cpp

    r11195 r11196  
    3737////////////////////////////////////////////////////////////////////////////
    3838t_pppFilter::t_pppFilter() {
    39   _parlist = 0;
     39  _parlist     = 0;
     40  _numSat      = 0;
     41  _fixRatio    = 0.0;
     42  _resRmsCode  = 0.0;
     43  _resRmsPhase = 0.0;
    4044}
    4145
    … …  
    5054t_irc t_pppFilter::processEpoch(t_pppObsPool* obsPool) {
    5155
    52   _numSat = 0;
     56  _numSat      = 0;
     57  _resRmsCode  = 0.0;
     58  _resRmsPhase = 0.0;
    5359  const double maxSolGap = 60.0;
    5460  bool setNeuNoiseToZero = false;
    … …  
    112118  // ----------------------
    113119  cmpDOP(allObs);
     120
     121  // Post-fit Residuals: RMS per epoch
     122  // ---------------------------------
     123  cmpResiduals(allObs);
    114124
    115125  // Ambiguity Resolution
    … …  
    135145
    136146  return success;
     147}
     148
     149// RMS of the post-fit residuals of the epoch (set in processSystem)
     150////////////////////////////////////////////////////////////////////////////
     151void t_pppFilter::cmpResiduals(const vector<t_pppSatObs*>& allObs) {
     152
     153  // RMS of code and phase residuals
     154  // -------------------------------
     155  double   sumCode  = 0.0;
     156  double   sumPhase = 0.0;
     157  unsigned numCode  = 0;
     158  unsigned numPhase = 0;
     159  for (const t_pppSatObs* obs : allObs) {
     160    const vector<t_lc>& LCs = OPT->LCs(obs->prn().system());
     161    for (const t_lc& LC : LCs) {
     162      if (!obs->hasRes(LC)) {
     163        continue;
     164      }
     165      double res = obs->getRes(LC);
     166      if      (LC._type == t_lc::code  || LC._type == t_lc::codeIF) {
     167        sumCode  += res * res;
     168        numCode  += 1;
     169      }
     170      else if (LC._type == t_lc::phase || LC._type == t_lc::phaseIF) {
     171        sumPhase += res * res;
     172        numPhase += 1;
     173      }
     174    }
     175  }
     176  _resRmsCode  = (numCode  > 0) ? sqrt(sumCode  / numCode)  : 0.0;
     177  _resRmsPhase = (numPhase > 0) ? sqrt(sumPhase / numPhase) : 0.0;
     178
     179  LOG << string(_epoTime) << " RMS code "
     180      << setw(8) << setprecision(4) << _resRmsCode  << " (" << numCode  << ") phase "
     181      << setw(8) << setprecision(4) << _resRmsPhase << " (" << numPhase << ")" << endl;
    137182}
    138183
  • trunk/BNC/src/PPP/pppFilter.h

    r11051 r11196  
    3131  double GDOP() const {return _dop.G;}
    3232  double fixRatio() const {return _fixRatio;}
     33  double resRmsCode() const {return _resRmsCode;}
     34  double resRmsPhase() const {return _resRmsPhase;}
    3335  double trp() const {
    3436    const std::vector<t_pppParam*>& par = _parlist->params();
    … …  
    7476  };
    7577
     78  void  cmpResiduals(const std::vector<t_pppSatObs*>& allObs);
    7679  t_irc processSystem(const std::vector<t_lc>& LCs,
    7780                      const std::vector<t_pppSatObs*>& obsVector,
    … …  
    105108  bncTime         _lastEpoTimeOK;
    106109  double          _fixRatio;
     110  double          _resRmsCode;
     111  double          _resRmsPhase;
    107112};
    108113
  • trunk/BNC/src/PPP/pppSatObs.h

    r11041 r11196  
    4848    void                setRes(t_lc LC, double res);
    4949    double              getRes(t_lc LC) const;
     50    bool                hasRes(t_lc LC) const {return _res.find(LC) != _res.end();}
    5051    bool                setPseudoObsIono(t_frequency::type freq, double stecRefSat);
    5152    void                resetGIM() {_stecSat = 0.0;}
Note: See TracChangeset for help on using the changeset viewer.