Changeset 8011 in ntrip for trunk/BNC/src/latencychecker.cpp
- Timestamp:
- Aug 12, 2016, 5:25:52 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/latencychecker.cpp
r7422 r8011 35 35 * Created: 02-Feb-2009 36 36 * 37 * Changes: 37 * Changes: 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 60 60 _staID = staID; 61 61 62 connect(this, SIGNAL(newMessage(QByteArray,bool)), 62 connect(this, SIGNAL(newMessage(QByteArray,bool)), 63 63 BNC_CORE, SLOT(slotMessage(const QByteArray,bool))); 64 64 … … 69 69 QString adviseObsRate = settings.value("adviseObsRate").toString(); 70 70 _inspSegm = 0; 71 if ( adviseObsRate.isEmpty() ) { 72 _inspSegm = 0; 73 } 74 else if ( adviseObsRate.indexOf("5 Hz") != -1 ) { 75 _inspSegm = 20; 76 } 77 else if ( adviseObsRate.indexOf("1 Hz") != -1 ) { 78 _inspSegm = 10; 79 } 80 else if ( adviseObsRate.indexOf("0.5 Hz") != -1 ) { 81 _inspSegm = 20; 82 } 83 else if ( adviseObsRate.indexOf("0.2 Hz") != -1 ) { 84 _inspSegm = 40; 85 } 86 else if ( adviseObsRate.indexOf("0.1 Hz") != -1 ) { 87 _inspSegm = 50; 71 if ( adviseObsRate.isEmpty() ) { 72 _inspSegm = 0; 73 } 74 else if ( adviseObsRate.indexOf("5 Hz") != -1 ) { 75 _inspSegm = 20; 76 } 77 else if ( adviseObsRate.indexOf("1 Hz") != -1 ) { 78 _inspSegm = 10; 79 } 80 else if ( adviseObsRate.indexOf("0.5 Hz") != -1 ) { 81 _inspSegm = 20; 82 } 83 else if ( adviseObsRate.indexOf("0.2 Hz") != -1 ) { 84 _inspSegm = 40; 85 } 86 else if ( adviseObsRate.indexOf("0.1 Hz") != -1 ) { 87 _inspSegm = 50; 88 88 } 89 89 _adviseFail = settings.value("adviseFail").toInt(); … … 96 96 _miscIntr = 1; 97 97 QString miscIntr = settings.value("miscIntr").toString(); 98 if ( miscIntr.isEmpty() ) { 99 _miscIntr = 1; 100 } 101 else if ( miscIntr.indexOf("2 sec") != -1 ) { 102 _miscIntr = 2; 103 } 104 else if ( miscIntr.indexOf("10 sec") != -1 ) { 105 _miscIntr = 10; 106 } 107 else if ( miscIntr.indexOf("1 min") != -1 ) { 108 _miscIntr = 60; 109 } 110 else if ( miscIntr.left(5).indexOf("5 min") != -1 ) { 111 _miscIntr = 300; 112 } 113 else if ( miscIntr.indexOf("15 min") != -1 ) { 114 _miscIntr = 900; 115 } 116 else if ( miscIntr.indexOf("1 hour") != -1 ) { 117 _miscIntr = 3600; 118 } 119 else if ( miscIntr.indexOf("6 hours") != -1 ) { 120 _miscIntr = 21600; 121 } 122 else if ( miscIntr.indexOf("1 day") != -1 ) { 123 _miscIntr = 86400; 98 if ( miscIntr.isEmpty() ) { 99 _miscIntr = 1; 100 } 101 else if ( miscIntr.indexOf("2 sec") != -1 ) { 102 _miscIntr = 2; 103 } 104 else if ( miscIntr.indexOf("10 sec") != -1 ) { 105 _miscIntr = 10; 106 } 107 else if ( miscIntr.indexOf("1 min") != -1 ) { 108 _miscIntr = 60; 109 } 110 else if ( miscIntr.left(5).indexOf("5 min") != -1 ) { 111 _miscIntr = 300; 112 } 113 else if ( miscIntr.indexOf("15 min") != -1 ) { 114 _miscIntr = 900; 115 } 116 else if ( miscIntr.indexOf("1 hour") != -1 ) { 117 _miscIntr = 3600; 118 } 119 else if ( miscIntr.indexOf("6 hours") != -1 ) { 120 _miscIntr = 21600; 121 } 122 else if ( miscIntr.indexOf("1 day") != -1 ) { 123 _miscIntr = 86400; 124 124 } 125 125 … … 162 162 _begDateTimeCorr = QDateTime::currentDateTime(); 163 163 _endDateTimeCorr = QDateTime::currentDateTime(); 164 164 165 165 } 166 166 … … 180 180 if (!_fromReconnect) { 181 181 _endDateTimeOut = QDateTime::currentDateTime(); 182 } 182 } 183 183 _fromReconnect = true; 184 184 … … 277 277 _decodeStartCorr = QDateTime::currentDateTime(); 278 278 } 279 } 279 } 280 280 else { 281 281 … … 307 307 if (_fromReconnect) { 308 308 _begDateTimeOut = QDateTime::currentDateTime(); 309 } 309 } 310 310 _fromReconnect = false; 311 311 … … 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) { … … 454 454 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 455 455 } 456 } 456 } 457 457 else { 458 458 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs") … … 500 500 } 501 501 502 // Call advisory notice script 502 // Call advisory notice script 503 503 //////////////////////////////////////////////////////////////////////////// 504 504 void latencyChecker::callScript(const char* comment) {
Note:
See TracChangeset
for help on using the changeset viewer.