- Timestamp:
- Jun 17, 2011, 4:16:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r3301 r3302 443 443 QListIterator<t_obs> it(_decoder->_obsList); 444 444 bool firstObs = true; 445 Q List<QString> prnList;445 QMap<QString, long> prnLastEpo; 446 446 while (it.hasNext()) { 447 447 const t_obs& obs = it.next(); … … 468 468 // Check observations comming twice (e.g. KOUR0 Problem) 469 469 // ----------------------------------------------------- 470 QString prn = QString("%1%2").arg(obs.satSys) 471 .arg(obs.satNum, 2, 10, QChar('0')); 472 if (prnList.indexOf(prn) == -1) { 473 prnList << prn; 470 long iSec = long(floor(obs.GPSWeeks+0.5)); 471 long newTime = obs.GPSWeek * 7*24*3600 + iSec; 472 QString prn = QString("%1%2").arg(obs.satSys) 473 .arg(obs.satNum, 2, 10, QChar('0')); 474 475 QMap<QString, long>::const_iterator it = prnLastEpo.find(prn); 476 if (it == prnLastEpo.end()) { 477 prnLastEpo[prn] = newTime; 474 478 } 475 479 else { 476 emit( newMessage(_staID + 477 ": observation comming more than once " + prn.toAscii(), false) ); 478 continue; 480 long oldTime = it.value(); 481 if (newTime < oldTime) { 482 emit( newMessage(_staID + 483 ": old observation " + prn.toAscii(), false)); 484 continue; 485 } 486 else if (newTime == oldTime) { 487 emit( newMessage(_staID + 488 ": observation comming more than once " + prn.toAscii(), false)); 489 continue; 490 } 491 else { 492 prnLastEpo[prn] = newTime; 493 } 479 494 } 480 495 … … 482 497 // ------------ 483 498 if (_rnx) { 484 long iSec = long(floor(obs.GPSWeeks+0.5));485 long newTime = obs.GPSWeek * 7*24*3600 + iSec;486 499 if (_samplingRate == 0 || iSec % _samplingRate == 0) { 487 500 _rnx->deepCopy(obs);
Note:
See TracChangeset
for help on using the changeset viewer.