Changeset 6137 in ntrip for trunk/BNC/src/rinex/reqcanalyze.cpp
- Timestamp:
- Sep 13, 2014, 12:19:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r6122 r6137 237 237 for (unsigned iObs = 0; iObs < _currEpo->rnxSat.size(); iObs++) { 238 238 const t_rnxObsFile::t_rnxSat& rnxSat = _currEpo->rnxSat[iObs]; 239 t_ obs obs;239 t_satObs obs; 240 240 t_rnxObsFile::setObsFromRnx(obsFile, _currEpo, rnxSat, obs); 241 241 242 QString prn = QString("%1%2").arg(obs.satSys) 243 .arg(obs.satNum, 2, 10, QChar('0')); 242 QString prn(obs._prn.toString().c_str()); 244 243 245 t_ephGlo* ephGlo = 0; 246 if (obs.satSys == 'R') { 244 t_ephGlo* ephGlo = 0; 245 int slotNum = 0; 246 if (obs._prn.system() == 'R') { 247 247 for (int ie = 0; ie < _ephs.size(); ie++) { 248 248 if (QString(_ephs[ie]->prn().toString().c_str()) == prn) { … … 252 252 } 253 253 if (ephGlo) { 254 obs.slotNum = ephGlo->slotNum();254 slotNum = ephGlo->slotNum(); 255 255 } 256 256 } 257 257 258 t_irc irc = _allObsMap[prn].addObs(obs );258 t_irc irc = _allObsMap[prn].addObs(obs, slotNum); 259 259 260 260 if (irc == success) { … … 339 339 // 340 340 //////////////////////////////////////////////////////////////////////////// 341 t_irc t_reqcAnalyze::t_allObs::addObs(const t_ obs& obs) {342 343 t_oneObs* newObs = new t_oneObs(obs. GPSWeek, obs.GPSWeeks);341 t_irc t_reqcAnalyze::t_allObs::addObs(const t_satObs& obs, int slotNum) { 342 343 t_oneObs* newObs = new t_oneObs(obs._time.gpsw(), obs._time.gpssec()); 344 344 bool okFlag = false; 345 345 346 346 // Availability and Slip Flags 347 347 // --------------------------- 348 double L1 = obs.measdata("L1", 3.0); 349 if (L1 != 0) { 350 newObs->_hasL1 = true; 351 } 352 double L2 = obs.satSys == 'E' ? obs.measdata("L5", 3.0) : obs.measdata("L2", 3.0);; 353 if (L2 != 0) { 354 newObs->_hasL2 = true; 355 } 356 if (obs.slipL1) { 357 newObs->_slipL1 = true; 358 } 359 if (obs.slipL2) { 360 newObs->_slipL2 = true; 348 double L1 = 0.0; 349 double L2 = 0.0; 350 double P1 = 0.0; 351 double P2 = 0.0; 352 353 for (unsigned iFrq = 0; iFrq < obs._obs.size(); iFrq++) { 354 const t_frqObs* frqObs = obs._obs[iFrq]; 355 if (frqObs->_rnxType2ch[0] == '1') { 356 if (frqObs->_phaseValid) { 357 L1 = frqObs->_phase; 358 newObs->_hasL1 = true; 359 newObs->_slipL1 = frqObs->_slip; 360 } 361 if (frqObs->_codeValid) { 362 P1 = frqObs->_code; 363 } 364 if (frqObs->_snrValid) { 365 newObs->_SNR1 = frqObs->_snr; 366 } 367 } 368 else if ( (obs._prn.system() != 'E' && frqObs->_rnxType2ch[0] == '2') || 369 (obs._prn.system() == 'E' && frqObs->_rnxType2ch[0] == '5') ) { 370 if (frqObs->_phaseValid) { 371 L2 = frqObs->_phase; 372 newObs->_hasL2 = true; 373 newObs->_slipL2 = frqObs->_slip; 374 } 375 if (frqObs->_codeValid) { 376 P2 = frqObs->_code; 377 } 378 if (frqObs->_snrValid) { 379 newObs->_SNR2 = frqObs->_snr; 380 } 381 } 361 382 } 362 383 … … 366 387 double f1 = 0.0; 367 388 double f2 = 0.0; 368 if (obs. satSys== 'G') {389 if (obs._prn.system() == 'G') { 369 390 f1 = t_CST::freq(t_frequency::G1, 0); 370 391 f2 = t_CST::freq(t_frequency::G2, 0); 371 392 } 372 else if (obs. satSys== 'R') {373 f1 = t_CST::freq(t_frequency::R1, obs.slotNum);374 f2 = t_CST::freq(t_frequency::R2, obs.slotNum);375 } 376 else if (obs. satSys== 'E') {393 else if (obs._prn.system() == 'R') { 394 f1 = t_CST::freq(t_frequency::R1, slotNum); 395 f2 = t_CST::freq(t_frequency::R2, slotNum); 396 } 397 else if (obs._prn.system() == 'E') { 377 398 f1 = t_CST::freq(t_frequency::E1, 0); 378 399 f2 = t_CST::freq(t_frequency::E5, 0); … … 382 403 L2 = L2 * t_CST::c / f2; 383 404 384 double P1 = obs.measdata("C1", 3.0);385 405 if (P1 != 0.0) { 386 406 newObs->_MP1 = P1 - L1 - 2.0*f2*f2/(f1*f1-f2*f2) * (L1 - L2); 387 407 okFlag = true; 388 408 } 389 double P2 = obs.satSys == 'E' ? obs.measdata("C5", 3.0) : obs.measdata("C2", 3.0);390 409 if (P2 != 0.0) { 391 410 newObs->_MP2 = P2 - L2 - 2.0*f1*f1/(f1*f1-f2*f2) * (L1 - L2); 392 okFlag = true;393 }394 }395 396 // Signal-to-Noise397 // ---------------398 double S1 = obs.measdata("S1", 3.0);399 if (S1 != 0.0) {400 newObs->_SNR1 = floor(S1/6);401 if (newObs->_SNR1 > 9.0) {402 newObs->_SNR1 = 9.0;403 }404 if (newObs->_SNR1 < 1.0) {405 newObs->_SNR1 = 1.0;406 }407 okFlag = true;408 }409 else {410 if (obs.snrL1 > 0) {411 newObs->_SNR1 = obs.snrL1;412 okFlag = true;413 }414 }415 double S2 = obs.satSys == 'E' ? obs.measdata("S5", 3.0) : obs.measdata("S2", 3.0);416 if (S2 != 0.0) {417 newObs->_SNR2 = floor(S2/6);418 if (newObs->_SNR2 > 9.0) {419 newObs->_SNR2 = 9.0;420 }421 if (newObs->_SNR2 < 1.0) {422 newObs->_SNR2 = 1.0;423 }424 okFlag = true;425 }426 else {427 if (obs.snrL2 > 0) {428 newObs->_SNR2 = obs.snrL2;429 411 okFlag = true; 430 412 }
Note:
See TracChangeset
for help on using the changeset viewer.