Changeset 6029 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- Aug 21, 2014, 11:20:47 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppSatObs.cpp
r6028 r6029 244 244 retVal += it->second * _obs[tFreq]->_phase * t_CST::lambda(tFreq, _channel); 245 245 } 246 } 247 248 return retVal; 249 } 250 251 // 252 //////////////////////////////////////////////////////////////////////////// 253 double t_pppSatObs::lambda(t_lc::type tLC) const { 254 255 double f1 = t_CST::freq(_fType1, _channel); 256 double f2 = t_CST::freq(_fType2, _channel); 257 258 if (tLC == t_lc::l1) { 259 return t_CST::c / f1; 260 } 261 else if (tLC == t_lc::l2) { 262 return t_CST::c / f2; 263 } 264 else if (tLC == t_lc::lIF) { 265 return t_CST::c / (f1 + f2); 266 } 267 else if (tLC == t_lc::MW) { 268 return t_CST::c / (f1 - f2); 269 } 270 else if (tLC == t_lc::CL) { 271 return t_CST::c / f1 / 2.0; 272 } 273 274 return 0.0; 275 } 276 277 // 278 //////////////////////////////////////////////////////////////////////////// 279 double t_pppSatObs::sigma(t_lc::type tLC) const { 280 281 map<t_frequency::type, double> codeCoeff; 282 map<t_frequency::type, double> phaseCoeff; 283 lcCoeff(tLC, codeCoeff, phaseCoeff); 284 285 double retVal = 0.0; 286 287 map<t_frequency::type, double>::const_iterator it; 288 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 289 retVal += it->second * it->second * OPT->_sigmaC1 * OPT->_sigmaC1; 290 } 291 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) { 292 retVal += it->second * it->second * OPT->_sigmaL1 * OPT->_sigmaL1; 293 } 294 295 retVal = sqrt(retVal); 296 297 // Elevation-Dependent Weighting 298 // ----------------------------- 299 double cEle = 1.0; 300 if ( (OPT->_eleWgtCode && t_lc::includesCode(tLC)) || 301 (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) { 302 double eleD = eleSat()*180.0/M_PI; 303 double hlp = fabs(90.0 - eleD); 304 cEle = (1.0 + hlp*hlp*hlp*0.000004); 305 } 306 307 return cEle * retVal; 308 } 309 310 // 311 //////////////////////////////////////////////////////////////////////////// 312 double t_pppSatObs::maxRes(t_lc::type tLC) const { 313 314 map<t_frequency::type, double> codeCoeff; 315 map<t_frequency::type, double> phaseCoeff; 316 lcCoeff(tLC, codeCoeff, phaseCoeff); 317 318 double retVal = 0.0; 319 320 map<t_frequency::type, double>::const_iterator it; 321 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 322 retVal += it->second * OPT->_maxResC1; 323 } 324 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) { 325 retVal += it->second * OPT->_maxResL1; 246 326 } 247 327 … … 434 514 // 435 515 //////////////////////////////////////////////////////////////////////////// 436 double t_pppSatObs::lambda(t_lc::type tLC) const {437 438 if (tLC == t_lc::l1) {439 return t_CST::c / _f1;440 }441 else if (tLC == t_lc::l2) {442 return t_CST::c / _f2;443 }444 else if (tLC == t_lc::lIF) {445 return t_CST::c / (_f1 + _f2);446 }447 else if (tLC == t_lc::MW) {448 return t_CST::c / (_f1 - _f2);449 }450 else if (tLC == t_lc::CL) {451 return t_CST::c / _f1 / 2.0;452 }453 454 return 0.0;455 }456 457 //458 ////////////////////////////////////////////////////////////////////////////459 double t_pppSatObs::sigma(t_lc::type tLC) const {460 461 ColumnVector sig(4);462 sig(1) = OPT->_sigmaL1;463 sig(2) = OPT->_sigmaL1;464 sig(3) = OPT->_sigmaC1;465 sig(4) = OPT->_sigmaC1;466 467 ColumnVector coeff(4);468 lc(tLC, sig(1), sig(2), sig(3), sig(4), &coeff);469 470 ColumnVector sp = SP(sig, coeff); // Schur product471 472 // Elevation-Dependent Weighting473 // -----------------------------474 double cEle = 1.0;475 if ( (OPT->_eleWgtCode && t_lc::includesCode(tLC)) ||476 (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) {477 double eleD = eleSat()*180.0/M_PI;478 double hlp = fabs(90.0 - eleD);479 cEle = (1.0 + hlp*hlp*hlp*0.000004);480 }481 482 return cEle * sp.norm_Frobenius();483 }484 485 //486 ////////////////////////////////////////////////////////////////////////////487 double t_pppSatObs::maxRes(t_lc::type tLC) const {488 489 ColumnVector res(4);490 res(1) = OPT->_maxResL1;491 res(2) = OPT->_maxResL1;492 res(3) = OPT->_maxResC1;493 res(4) = OPT->_maxResC1;494 495 ColumnVector coeff(4);496 lc(tLC, res(1), res(2), res(3), res(4), &coeff);497 498 ColumnVector sp = SP(res, coeff); // Schur product499 500 return sp.norm_Frobenius();501 }502 503 //504 ////////////////////////////////////////////////////////////////////////////505 516 void t_pppSatObs::setRes(t_lc::type tLC, double res) { 506 517 _res[tLC] = res;
Note:
See TracChangeset
for help on using the changeset viewer.