- Timestamp:
- Sep 2, 2015, 5:08:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppFilter.cpp
r7237 r7267 11 11 * Created: 29-Jul-2014 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 70 70 } 71 71 72 string epoTimeStr = string(_epoTime); 73 72 74 // Set Parameters 73 75 // -------------- … … 83 85 _xFlt.ReSize(_parlist->nPar()); _xFlt = 0.0; 84 86 _x0.ReSize(_parlist->nPar()); _x0 = 0.0; 85 87 86 88 for (unsigned ii = 0; ii < params.size(); ii++) { 87 89 const t_pppParam* par1 = params[ii]; … … 112 114 for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) { 113 115 char system = OPT->systems()[iSys]; 116 unsigned int num = 0; 114 117 vector<t_pppSatObs*> obsVector; 115 118 for (unsigned jj = 0; jj < allObs.size(); jj++) { 116 119 if (allObs[jj]->prn().system() == system) { 117 120 obsVector.push_back(allObs[jj]); 118 } 119 } 121 num++; 122 } 123 } 124 LOG << epoTimeStr << " SATNUM " << system << ' ' << right << setw(2) << num << endl; 120 125 if ( processSystem(OPT->LCs(system), obsVector) != success ) { 121 126 return failure; 122 127 } 123 128 } 124 129 125 130 cmpDOP(allObs); 126 131 … … 132 137 // Process Selected LCs 133 138 //////////////////////////////////////////////////////////////////////////// 134 t_irc t_pppFilter::processSystem(const vector<t_lc::type>& LCs, 139 t_irc t_pppFilter::processSystem(const vector<t_lc::type>& LCs, 135 140 const vector<t_pppSatObs*>& obsVector) { 136 141 … … 148 153 const vector<t_pppParam*>& params = _parlist->params(); 149 154 unsigned maxObs = obsVector.size() * LCs.size(); 150 155 151 156 // Outlier Detection Loop 152 157 // ---------------------- … … 163 168 ColumnVector ll(maxObs); 164 169 DiagonalMatrix PP(maxObs); PP = 0.0; 165 170 166 171 int iObs = -1; 167 172 vector<t_pppSatObs*> usedObs; … … 221 226 t_pppSatObs* obs = usedObs[maxOutlierIndex]; 222 227 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() << ' ' 225 230 << setw(8) << setprecision(4) << maxOutlier << endl; 226 231 for (unsigned iPar = 0; iPar < params.size(); iPar++) { 227 232 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() && 229 234 hlp->tLC() == usedTypes[maxOutlierIndex]) { 230 235 par = hlp; … … 254 259 if (tLC == LCs[jj]) { 255 260 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 << ' ' 258 263 << obs->prn().toString().substr(0,3) << ' ' 259 264 << setw(8) << setprecision(4) << vv[ii] << endl; … … 270 275 // Cycle-Slip Detection 271 276 //////////////////////////////////////////////////////////////////////////// 272 t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type>& LCs, 277 t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type>& LCs, 273 278 const vector<t_pppSatObs*>& obsVector) { 274 279 … … 283 288 const t_pppSatObs* obs = obsVector[iObs]; 284 289 285 // Check set Slips and Jump Counters 290 // Check set Slips and Jump Counters 286 291 // --------------------------------- 287 292 bool slip = false; … … 307 312 308 313 // Slip Set 309 // -------- 314 // -------- 310 315 if (slip) { 311 316 resetAmb(obs->prn(), obsVector); 312 317 } 313 318 314 319 // Check Pre-Fit Residuals 315 320 // ----------------------- … … 320 325 AA[iPar] = par->partial(_epoTime, obs, tLC); 321 326 } 322 327 323 328 double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA); 324 329 double vv = DotProduct(AA, _xFlt) - ll; 325 330 326 331 if (fabs(vv) > SLIP) { 327 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 332 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 328 333 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 329 334 resetAmb(obs->prn(), obsVector); … … 398 403 } 399 404 AA = AA.Rows(1, _numSat); 400 SymmetricMatrix NN; NN << AA.t() * AA; 405 SymmetricMatrix NN; NN << AA.t() * AA; 401 406 SymmetricMatrix QQ = NN.i(); 402 407 403 408 _dop.P = sqrt(QQ(1,1) + QQ(2,2) + QQ(3,3)); 404 409 _dop.T = sqrt(QQ(4,4));
Note:
See TracChangeset
for help on using the changeset viewer.