Changeset 7267 in ntrip


Ignore:
Timestamp:
Sep 2, 2015, 5:08:07 PM (9 years ago)
Author:
stuerze
Message:

satellite number per system is added in PPP output

File:
1 edited

Legend:

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

    r7237 r7267  
    1111 * Created:    29-Jul-2014
    1212 *
    13  * Changes:   
     13 * Changes:
    1414 *
    1515 * -----------------------------------------------------------------------*/
     
    7070  }
    7171
     72  string epoTimeStr = string(_epoTime);
     73
    7274  // Set Parameters
    7375  // --------------
     
    8385  _xFlt.ReSize(_parlist->nPar()); _xFlt = 0.0;
    8486  _x0.ReSize(_parlist->nPar());   _x0   = 0.0;
    85  
     87
    8688  for (unsigned ii = 0; ii < params.size(); ii++) {
    8789    const t_pppParam* par1 = params[ii];
     
    112114  for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
    113115    char system = OPT->systems()[iSys];
     116    unsigned int num = 0;
    114117    vector<t_pppSatObs*> obsVector;
    115118    for (unsigned jj = 0; jj < allObs.size(); jj++) {
    116119      if (allObs[jj]->prn().system() == system) {
    117120        obsVector.push_back(allObs[jj]);
    118       }
    119     }
     121        num++;
     122      }
     123    }
     124    LOG << epoTimeStr << " SATNUM " << system << ' ' << right << setw(2) << num << endl;
    120125    if ( processSystem(OPT->LCs(system), obsVector) != success ) {
    121126      return failure;
    122127    }
    123128  }
    124    
     129
    125130  cmpDOP(allObs);
    126131
     
    132137// Process Selected LCs
    133138////////////////////////////////////////////////////////////////////////////
    134 t_irc t_pppFilter::processSystem(const vector<t_lc::type>& LCs, 
     139t_irc t_pppFilter::processSystem(const vector<t_lc::type>& LCs,
    135140                                 const vector<t_pppSatObs*>& obsVector) {
    136141
     
    148153  const vector<t_pppParam*>& params     = _parlist->params();
    149154  unsigned                maxObs     = obsVector.size() * LCs.size();
    150    
     155
    151156  // Outlier Detection Loop
    152157  // ----------------------
     
    163168    ColumnVector          ll(maxObs);
    164169    DiagonalMatrix        PP(maxObs); PP = 0.0;
    165    
     170
    166171    int iObs = -1;
    167172    vector<t_pppSatObs*> usedObs;
     
    221226      t_pppSatObs* obs = usedObs[maxOutlierIndex];
    222227      t_pppParam* par = 0;
    223       LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' ' 
    224           << obs->prn().toString()                        << ' ' 
     228      LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' '
     229          << obs->prn().toString()                        << ' '
    225230          << setw(8) << setprecision(4) << maxOutlier << endl;
    226231      for (unsigned iPar = 0; iPar < params.size(); iPar++) {
    227232        t_pppParam* hlp = params[iPar];
    228         if (hlp->type() == t_pppParam::amb && hlp->prn()  == obs->prn() && 
     233        if (hlp->type() == t_pppParam::amb && hlp->prn()  == obs->prn() &&
    229234            hlp->tLC()  == usedTypes[maxOutlierIndex]) {
    230235          par = hlp;
     
    254259          if (tLC == LCs[jj]) {
    255260            obs->setRes(tLC, vv[ii]);
    256             LOG << epoTimeStr << " RES " 
    257                 << left << setw(3) << t_lc::toString(tLC) << right << ' ' 
     261            LOG << epoTimeStr << " RES "
     262                << left << setw(3) << t_lc::toString(tLC) << right << ' '
    258263                << obs->prn().toString().substr(0,3) << ' '
    259264                << setw(8) << setprecision(4) << vv[ii] << endl;
     
    270275// Cycle-Slip Detection
    271276////////////////////////////////////////////////////////////////////////////
    272 t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type>& LCs, 
     277t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type>& LCs,
    273278                                    const vector<t_pppSatObs*>& obsVector) {
    274279
     
    283288        const t_pppSatObs* obs = obsVector[iObs];
    284289
    285         // Check set Slips and Jump Counters 
     290        // Check set Slips and Jump Counters
    286291        // ---------------------------------
    287292        bool slip = false;
     
    307312
    308313        // Slip Set
    309         // -------- 
     314        // --------
    310315        if (slip) {
    311316          resetAmb(obs->prn(), obsVector);
    312317        }
    313  
     318
    314319        // Check Pre-Fit Residuals
    315320        // -----------------------
     
    320325            AA[iPar] = par->partial(_epoTime, obs, tLC);
    321326          }
    322          
     327
    323328          double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA);
    324329          double vv = DotProduct(AA, _xFlt) - ll;
    325          
     330
    326331          if (fabs(vv) > SLIP) {
    327             LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 
     332            LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' '
    328333                << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
    329334            resetAmb(obs->prn(), obsVector);
     
    398403    }
    399404    AA = AA.Rows(1, _numSat);
    400     SymmetricMatrix NN; NN << AA.t() * AA; 
     405    SymmetricMatrix NN; NN << AA.t() * AA;
    401406    SymmetricMatrix QQ = NN.i();
    402    
     407
    403408    _dop.P = sqrt(QQ(1,1) + QQ(2,2) + QQ(3,3));
    404409    _dop.T = sqrt(QQ(4,4));
Note: See TracChangeset for help on using the changeset viewer.