Changeset 10249 in ntrip for trunk/BNC


Ignore:
Timestamp:
Nov 9, 2023, 2:34:05 PM (13 months ago)
Author:
stuerze
Message:

minor changes

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

Legend:

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

    r10248 r10249  
    8686  // Status Vector, Variance-Covariance Matrix
    8787  // -----------------------------------------
    88   ColumnVector    xFltOld = _xFlt;
    89   SymmetricMatrix QFltOld = _QFlt;
    90   setStateVectorAndVarCovMatrix(xFltOld, QFltOld, setNeuNoiseToZero);
     88  _xFltOld = _xFlt;
     89  _QFltOld = _QFlt;
     90  setStateVectorAndVarCovMatrix(setNeuNoiseToZero);
    9191
    9292  // Process Satellite Systems separately
     
    267267      }
    268268      if (par) {
    269 //        if (par->ambResetCandidate()) {
     269        //if (par->ambResetCandidate()) {
    270270          resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav);
    271           adjustNoise(t_pppParam::ion, obs->prn(), 0.1, &QSav);
    272 //        }
    273 //        else {
    274 //          par->setAmbResetCandidate();
    275 //          obs->setOutlier();
    276 //        }
     271        //}
     272        //else {
     273        //  par->setAmbResetCandidate();
     274        //  obs->setOutlier();
     275        //}
    277276      }
    278277      else {
     
    344343        if (slip) {
    345344          resetAmb(obs->prn(), obsVector, tLC);
    346           adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
    347345        }
    348346
     
    363361                << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
    364362            resetAmb(obs->prn(), obsVector, tLC);
    365             adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
    366363          }
    367364        }
     
    383380    t_pppParam *par = params[iPar];
    384381    if (par->type() == t_pppParam::amb && par->prn() == prn) {
    385       int ind = par->indexNew();
    386       double eleSat = par->ambEleSat();
     382      int     ind    = par->indexNew();
     383      double  eleSat = par->ambEleSat();
    387384      bncTime firstObsTime;
    388385      bncTime lastObsTime = par->lastObsTime();
    389       if (par->firstObsTime().undef()) {
    390         firstObsTime = lastObsTime;
    391       }
    392       else {
    393         firstObsTime = par->firstObsTime();
    394       }
     386      (par->firstObsTime().undef()) ?
     387        firstObsTime = lastObsTime : firstObsTime = par->firstObsTime();
    395388      t_lc::type tLC = par->tLC();
    396389      if (tLC != lc) {continue;}
     
    405398        _QFlt(ii, ind + 1) = 0.0;
    406399        if (QSav) {
    407           (*QSav)(ii, ind + 1) = 0.0;
     400          (*QSav)(ii, ind + 1) = 0.0; 
    408401        }
    409402      }
     
    434427    t_pppParam *par = params[iPar];
    435428    if (par->type() == parType && par->prn() == prn) {
    436       int ind = par->indexNew();
    437       //LOG << string(_epoTime) << " ADJUSTNOISE " << par->toString() << endl;
    438       for (unsigned ii = 1; ii <= params.size(); ii++) {
    439         _QFlt(ii, ind + 1) = 0.0;
    440         if (QSav) {
    441           (*QSav)(ii, ind + 1) = 0.0;
    442         }
    443       }
    444       _QFlt(ind + 1, ind + 1) = noise * noise;
     429      int iOld = par->indexOld();
     430      int iNew = par->indexNew();
     431      LOG << string(_epoTime) << " ADJUSTNOISE " << prn.toString() << endl;
     432      _QFlt[iNew][iNew] = _QFltOld[iOld][iOld] + noise * noise;
    445433      if (QSav) {
    446         (*QSav)(ind + 1, ind + 1) = _QFlt(ind + 1, ind + 1);
    447       }
    448       irc = success;
    449     }
    450   }
    451 
     434        (*QSav)(iNew + 1, iNew + 1) = _QFlt(iNew + 1, iNew + 1);
     435      }
     436      return success;
     437    }
     438  }
    452439  return irc;
    453440}
     
    492479//
    493480////////////////////////////////////////////////////////////////////////////
    494 void t_pppFilter::predictCovCrdPart(const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) {
     481void t_pppFilter::predictCovCrdPart(bool setNeuNoiseToZero) {
    495482
    496483  const vector<t_pppParam*>& params = _parlist->params();
     
    523510    double dt = _epoTime - _firstEpoTime;
    524511    if (dt < OPT->_seedingTime || setNeuNoiseToZero) {
    525       _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3);
     512      _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3);
    526513    }
    527514    else {
    528       _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3) + Qxyz;
     515      _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3) + Qxyz;
    529516    }
    530517  }
     
    533520//
    534521////////////////////////////////////////////////////////////////////////////
    535 void t_pppFilter::setStateVectorAndVarCovMatrix(const ColumnVector &xFltOld,
    536     const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) {
     522void t_pppFilter::setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero) {
    537523
    538524  const vector<t_pppParam*>& params = _parlist->params();
     
    545531  for (unsigned ii = 0; ii < nPar; ii++) {
    546532    t_pppParam *par1 = params[ii];
    547     if (QFltOld.size() == 0) {
     533    if (_QFltOld.size() == 0) {
    548534      par1->resetIndex();
    549535    }
     
    553539      _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
    554540    } else {
    555       _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();
    556       _xFlt[ii] = xFltOld[iOld];
     541      _QFlt[ii][ii] = _QFltOld[iOld][iOld] + par1->noise() * par1->noise();
     542      _xFlt[ii]     = _xFltOld[iOld];
    557543      for (unsigned jj = 0; jj < ii; jj++) {
    558544        t_pppParam *par2 = params[jj];
    559545        int jOld = par2->indexOld();
    560546        if (jOld >= 0) {
    561           _QFlt[ii][jj] = QFltOld(iOld + 1, jOld + 1);
    562         }
    563       }
    564     }
    565   }
    566   predictCovCrdPart(QFltOld, setNeuNoiseToZero);
    567 }
    568 
     547          _QFlt[ii][jj] = _QFltOld(iOld + 1, jOld + 1);
     548        }
     549      }
     550    }
     551  }
     552  predictCovCrdPart(setNeuNoiseToZero);
     553}
     554
  • trunk/BNC/src/PPP/pppFilter.h

    r10248 r10249  
    8888  void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
    8989
    90   void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld,
    91                                      bool setNeuNoiseToZero);
     90  void setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero);
    9291
    93   void predictCovCrdPart(const SymmetricMatrix& QFltOld, bool setNeuNoiseToZero);
     92  void predictCovCrdPart(bool setNeuNoiseToZero);
    9493
    9594  bncTime         _epoTime;
    9695  t_pppParlist*   _parlist;
    9796  SymmetricMatrix _QFlt;
     97  SymmetricMatrix _QFltOld;
    9898  ColumnVector    _xFlt;
     99  ColumnVector    _xFltOld;
    99100  ColumnVector    _x0;
    100101  t_slip          _slips[t_prn::MAXPRN+1];
Note: See TracChangeset for help on using the changeset viewer.