- Timestamp:
- Aug 12, 2016, 5:37:37 PM (8 years ago)
- Location:
- branches/BNC_2.12/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BNC_2.12/src/bncgetthread.cpp
r7977 r8012 537 537 const t_satObs& obs = it.next(); 538 538 539 QString prn(obs._prn.toString().c_str());540 long iSec = long(floor(obs._time.gpssec()+0.5));541 long obsTime = obs._time.gpsw()*7*24*3600 + iSec;542 543 539 // Check observation epoch 544 540 // ----------------------- 545 541 if (!_rawFile) { 546 int week; 547 double sec; 548 currentGPSWeeks(week, sec); 549 long currTime = week * 7*24*3600 + long(sec); 550 const double maxDt = 600.0; 551 if (fabs(currTime - obsTime) > maxDt) { 552 emit( newMessage(_staID + ": Wrong observation epoch(s)", false) ); 542 bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time); 543 if (wrongObservationEpoch) { 544 emit( newMessage(_staID + ": Wrong observation epoch(s)", false) ); 553 545 continue; 554 546 } … … 558 550 // ---------------------------------------------------- 559 551 if (!_rawFile) { 552 QString prn(obs._prn.toString().c_str()); 553 long iSec = long(floor(obs._time.gpssec()+0.5)); 554 long obsTime = obs._time.gpsw()*7*24*3600 + iSec; 560 555 QMap<QString, long>::const_iterator it = _prnLastEpo.find(prn); 561 556 if (it != _prnLastEpo.end()) { -
branches/BNC_2.12/src/bncutils.cpp
r7979 r8012 249 249 // 250 250 //////////////////////////////////////////////////////////////////////////// 251 bool checkForWrongObsEpoch(bncTime obsEpoch) { 252 const double maxDt = 600.0; 253 long iSec = long(floor(obsEpoch.gpssec()+0.5)); 254 long obsTime = obsEpoch.gpsw()*7*24*3600 + iSec; 255 int week; 256 double sec; 257 currentGPSWeeks(week, sec); 258 long currTime = week * 7*24*3600 + long(sec); 259 260 if (fabs(currTime - obsTime) > maxDt) { 261 return true; 262 } 263 return false; 264 } 265 // 266 //////////////////////////////////////////////////////////////////////////// 251 267 QByteArray ggaString(const QByteArray& latitude, 252 268 const QByteArray& longitude, -
branches/BNC_2.12/src/bncutils.h
r7251 r8012 62 62 63 63 QDateTime currentDateAndTimeGPS(); 64 65 bool checkForWrongObsEpoch(bncTime obsEpoch); 64 66 65 67 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude, -
branches/BNC_2.12/src/latencychecker.cpp
r7422 r8012 336 336 while (it.hasNext()) { 337 337 const t_satObs& obs = it.next(); 338 338 bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time); 339 339 _newSecGPS = static_cast<int>(obs._time.gpssec()); 340 if (_newSecGPS != _oldSecGPS ) {340 if (_newSecGPS != _oldSecGPS && !wrongObservationEpoch) { 341 341 if (_newSecGPS % _miscIntr < _oldSecGPS % _miscIntr) { 342 342 if (_numLat > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.