Changeset 6008 in ntrip


Ignore:
Timestamp:
Aug 18, 2014, 11:19:56 AM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP
Files:
2 edited

Legend:

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

    r6007 r6008  
    111111    int iOld = par1->indexOld();
    112112    if (iOld < 0) {
    113       if (ii < 3) {
    114         _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
    115       }
     113      _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
    116114    }
    117115    else {
    118       if (ii < 3) {
    119         _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();
    120       }
    121       _xFlt[ii] = xFltOld[iOld];
     116      _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();
     117      _xFlt[ii]     = xFltOld[iOld];
    122118      for (unsigned jj = 0; jj < ii; jj++) {
    123119        const t_pppParam* par2 = params[jj];
     
    130126  }
    131127
    132   predictCovCrdPart();
     128  predictCovCrdPart(QFltOld);
    133129
    134130  // Process Satellite Systems separately
     
    435431// Compute various DOP Values
    436432////////////////////////////////////////////////////////////////////////////
    437 void t_pppFilter::predictCovCrdPart() {
     433void t_pppFilter::predictCovCrdPart(const SymmetricMatrix& QFltOld) {
    438434
    439435  const vector<t_pppParam*>& params = _parlist->params();
    440 
    441   bool first = (_QFlt[0][0] == 0.0 && _QFlt[1][1] == 0.0 && _QFlt[2][2] == 0.0);
    442 
    443   for (unsigned ii = 0; ii < 3; ii++) {
    444     const t_pppParam* par1 = params[ii];
    445     if (first) {
    446       _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
    447     }
    448     else {
    449       _QFlt[ii][ii] += par1->noise() * par1->noise();
    450     }
    451   }
    452 }
     436  if (params.size() < 3) {
     437    return;
     438  }
     439
     440  bool first = (params[0]->indexOld() < 0);
     441
     442  if (first) {
     443    _QFlt.SymSubMatrix(1,3) = 0.0;
     444    for (unsigned ii = 0; ii < 3; ii++) {
     445      const t_pppParam* par1 = params[ii];
     446      _QFlt[ii][ii] = par1->sigma0() * par1->sigma0();
     447    }
     448  }
     449  else {
     450    _QFlt.SymSubMatrix(1,3) = QFltOld.SymSubMatrix(1,3);
     451    for (unsigned ii = 0; ii < 3; ii++) {
     452      const t_pppParam* par1 = params[ii];
     453      _QFlt[ii][ii] = QFltOld[ii][ii] + par1->noise() * par1->noise();
     454    }
     455  }
     456}
  • trunk/BNC/src/PPP/pppFilter.h

    r6005 r6008  
    6161  void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
    6262
    63   void predictCovCrdPart();
     63  void predictCovCrdPart(const SymmetricMatrix& QFltOld);
    6464
    6565  bncTime         _epoTime;
Note: See TracChangeset for help on using the changeset viewer.