- Timestamp:
- Mar 9, 2017, 12:31:17 PM (8 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncgetthread.cpp
r8021 r8082 74 74 bncGetThread::bncGetThread(bncRawFile* rawFile) { 75 75 76 _rawFile 77 _format 78 _staID 79 _rawOutput 76 _rawFile = rawFile; 77 _format = rawFile->format(); 78 _staID = rawFile->staID(); 79 _rawOutput = false; 80 80 _ntripVersion = "N"; 81 81 … … 85 85 // Constructor 2 86 86 //////////////////////////////////////////////////////////////////////////// 87 bncGetThread::bncGetThread(const QUrl& mountPoint, 88 const QByteArray& format, 89 const QByteArray& latitude, 90 const QByteArray& longitude, 91 const QByteArray& nmea, 92 const QByteArray& ntripVersion) { 93 _rawFile = 0; 94 _mountPoint = mountPoint; 95 _staID = mountPoint.path().mid(1).toAscii(); 96 _format = format; 97 _latitude = latitude; 98 _longitude = longitude; 99 _nmea = nmea; 87 bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format, 88 const QByteArray& latitude, const QByteArray& longitude, 89 const QByteArray& nmea, const QByteArray& ntripVersion) { 90 _rawFile = 0; 91 _mountPoint = mountPoint; 92 _staID = mountPoint.path().mid(1).toAscii(); 93 _format = format; 94 _latitude = latitude; 95 _longitude = longitude; 96 _nmea = nmea; 100 97 _ntripVersion = ntripVersion; 101 98 … … 120 117 121 118 connect(this, SIGNAL(newMessage(QByteArray,bool)), 122 119 BNC_CORE, SLOT(slotMessage(const QByteArray,bool))); 123 120 124 121 _isToBeDeleted = false; 125 _query 126 _nextSleep 127 _miscMount 128 _decoder 122 _query = 0; 123 _nextSleep = 0; 124 _miscMount = settings.value("miscMount").toString(); 125 _decoder = 0; 129 126 130 127 // NMEA Port … … 134 131 while (iSta.hasNext()) { 135 132 QStringList hlp = iSta.next().split(","); 136 if (hlp.size() < 10) {continue;} 133 if (hlp.size() < 10) { 134 continue; 135 } 137 136 QByteArray mp = hlp[0].toAscii(); 138 137 if (_staID == mp) { … … 142 141 if (nmeaPort != 0) { 143 142 _nmeaServer = new QTcpServer; 144 if ( !_nmeaServer->listen(QHostAddress::Any, nmeaPort)) {143 if (!_nmeaServer->listen(QHostAddress::Any, nmeaPort)) { 145 144 emit newMessage("bncCaster: Cannot listen on port", true); 146 } 147 else {148 connect(_nmeaServer, SIGNAL(newConnection()), this,SLOT(slotNewNMEAConnection()));149 connect(BNC_CORE, SIGNAL(newNMEAstr(QByteArray, QByteArray)), 150 this,SLOT(slotNewNMEAstr(QByteArray, QByteArray)));145 } else { 146 connect(_nmeaServer, SIGNAL(newConnection()), this, 147 SLOT(slotNewNMEAConnection())); 148 connect(BNC_CORE, SIGNAL(newNMEAstr(QByteArray, QByteArray)), this, 149 SLOT(slotNewNMEAstr(QByteArray, QByteArray))); 151 150 _nmeaSockets = new QList<QTcpSocket*>; 152 151 _nmeaPortsMap[_staID] = nmeaPort; … … 159 158 // Serial Port 160 159 // ----------- 161 _serialNMEA 160 _serialNMEA = NO_NMEA; 162 161 _serialOutFile = 0; 163 _serialPort = 0; 164 165 if (!_staID.isEmpty() && 166 settings.value("serialMountPoint").toString() == _staID) { 167 _serialPort = new QextSerialPort(settings.value("serialPortName").toString() ); 168 _serialPort->setTimeout(0,100); 162 _serialPort = 0; 163 164 if (!_staID.isEmpty() 165 && settings.value("serialMountPoint").toString() == _staID) { 166 _serialPort = new QextSerialPort( 167 settings.value("serialPortName").toString()); 168 _serialPort->setTimeout(0, 100); 169 169 170 170 // Baud Rate 171 171 // --------- 172 172 QString hlp = settings.value("serialBaudRate").toString(); 173 if 173 if (hlp == "110") { 174 174 _serialPort->setBaudRate(BAUD110); 175 } 176 else if (hlp == "300") { 175 } else if (hlp == "300") { 177 176 _serialPort->setBaudRate(BAUD300); 178 } 179 else if (hlp == "600") { 177 } else if (hlp == "600") { 180 178 _serialPort->setBaudRate(BAUD600); 181 } 182 else if (hlp == "1200") { 179 } else if (hlp == "1200") { 183 180 _serialPort->setBaudRate(BAUD1200); 184 } 185 else if (hlp == "2400") { 181 } else if (hlp == "2400") { 186 182 _serialPort->setBaudRate(BAUD2400); 187 } 188 else if (hlp == "4800") { 183 } else if (hlp == "4800") { 189 184 _serialPort->setBaudRate(BAUD4800); 190 } 191 else if (hlp == "9600") { 185 } else if (hlp == "9600") { 192 186 _serialPort->setBaudRate(BAUD9600); 193 } 194 else if (hlp == "19200") { 187 } else if (hlp == "19200") { 195 188 _serialPort->setBaudRate(BAUD19200); 196 } 197 else if (hlp == "38400") { 189 } else if (hlp == "38400") { 198 190 _serialPort->setBaudRate(BAUD38400); 199 } 200 else if (hlp == "57600") { 191 } else if (hlp == "57600") { 201 192 _serialPort->setBaudRate(BAUD57600); 202 } 203 else if (hlp == "115200") { 193 } else if (hlp == "115200") { 204 194 _serialPort->setBaudRate(BAUD115200); 205 195 } … … 208 198 // ------ 209 199 hlp = settings.value("serialParity").toString(); 210 if 200 if (hlp == "NONE") { 211 201 _serialPort->setParity(PAR_NONE); 212 } 213 else if (hlp == "ODD") { 202 } else if (hlp == "ODD") { 214 203 _serialPort->setParity(PAR_ODD); 215 } 216 else if (hlp == "EVEN") { 204 } else if (hlp == "EVEN") { 217 205 _serialPort->setParity(PAR_EVEN); 218 } 219 else if (hlp == "SPACE") { 206 } else if (hlp == "SPACE") { 220 207 _serialPort->setParity(PAR_SPACE); 221 208 } … … 224 211 // --------- 225 212 hlp = settings.value("serialDataBits").toString(); 226 if 213 if (hlp == "5") { 227 214 _serialPort->setDataBits(DATA_5); 228 } 229 else if (hlp == "6") { 215 } else if (hlp == "6") { 230 216 _serialPort->setDataBits(DATA_6); 231 } 232 else if (hlp == "7") { 217 } else if (hlp == "7") { 233 218 _serialPort->setDataBits(DATA_7); 234 } 235 else if (hlp == "8") { 219 } else if (hlp == "8") { 236 220 _serialPort->setDataBits(DATA_8); 237 221 } 238 222 hlp = settings.value("serialStopBits").toString(); 239 if 223 if (hlp == "1") { 240 224 _serialPort->setStopBits(STOP_1); 241 } 242 else if (hlp == "2") { 225 } else if (hlp == "2") { 243 226 _serialPort->setStopBits(STOP_2); 244 227 } … … 249 232 if (hlp == "XONXOFF") { 250 233 _serialPort->setFlowControl(FLOW_XONXOFF); 251 } 252 else if (hlp == "HARDWARE") { 234 } else if (hlp == "HARDWARE") { 253 235 _serialPort->setFlowControl(FLOW_HARDWARE); 254 } 255 else { 236 } else { 256 237 _serialPort->setFlowControl(FLOW_OFF); 257 238 } … … 259 240 // Open Serial Port 260 241 // ---------------- 261 _serialPort->open(QIODevice::ReadWrite |QIODevice::Unbuffered);242 _serialPort->open(QIODevice::ReadWrite | QIODevice::Unbuffered); 262 243 if (!_serialPort->isOpen()) { 263 244 delete _serialPort; … … 265 246 emit(newMessage((_staID + ": Cannot open serial port\n"), true)); 266 247 } 267 connect(_serialPort, SIGNAL(readyRead()), 268 this,SLOT(slotSerialReadyRead()));248 connect(_serialPort, SIGNAL(readyRead()), this, 249 SLOT(slotSerialReadyRead())); 269 250 270 251 // Automatic NMEA … … 276 257 if (!fName.isEmpty()) { 277 258 _serialOutFile = new QFile(fName); 278 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) { 259 if (Qt::CheckState(settings.value("rnxAppend").toInt()) 260 == Qt::Checked) { 279 261 _serialOutFile->open(QIODevice::WriteOnly | QIODevice::Append); 280 } 281 else { 262 } else { 282 263 _serialOutFile->open(QIODevice::WriteOnly); 283 264 } … … 286 267 // Manual NMEA 287 268 // ----------- 288 if ((nmeaMode == "Manual GPGGA") || (nmeaMode == "Manual GNGGA")) {269 if ((nmeaMode == "Manual GPGGA") || (nmeaMode == "Manual GNGGA")) { 289 270 _serialNMEA = MANUAL_NMEA; 290 271 bncSettings settings; 291 272 _manualNMEASampl = settings.value("serialManualNMEASampling").toInt(); 292 QString hlp 273 QString hlp = settings.value("serialHeightNMEA").toString(); 293 274 if (hlp.isEmpty()) { 294 275 hlp = "0.0"; 295 276 } 296 277 QByteArray _serialHeightNMEA = hlp.toAscii(); 297 _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, nmeaMode); 278 _manualNMEAString = ggaString(_latitude, _longitude, _serialHeightNMEA, 279 nmeaMode); 298 280 } 299 281 } … … 301 283 if (!_staID.isEmpty()) { 302 284 _latencyChecker = new latencyChecker(_staID); 303 } 304 else { 285 obs = false; 286 ssrOrb = false; 287 ssrClk = false; 288 ssrOrbClk = false; 289 ssrCbi = false; 290 ssrPbi = false; 291 ssrVtec = false; 292 ssrUra = false; 293 ssrHr = false; 294 _oldSsrEpoch = 0; 295 _ssrEpoch = 0; 296 } else { 305 297 _latencyChecker = 0; 306 298 } … … 313 305 _decoder = 0; 314 306 315 if (_format.indexOf("RTCM_2") != -1 || _format.indexOf("RTCM2") != -1 ||316 _format.indexOf("RTCM 2") != -1) {307 if (_format.indexOf("RTCM_2") != -1 || _format.indexOf("RTCM2") != -1 308 || _format.indexOf("RTCM 2") != -1) { 317 309 emit(newMessage(_staID + ": Get data in RTCM 2.x format", true)); 318 310 _decoder = new RTCM2Decoder(_staID.data()); 319 } 320 else if (_format.indexOf("RTCM_3") != -1 || _format.indexOf("RTCM3") != -1 || 321 _format.indexOf("RTCM 3") != -1 ) { 311 } else if (_format.indexOf("RTCM_3") != -1 || _format.indexOf("RTCM3") != -1 312 || _format.indexOf("RTCM 3") != -1) { 322 313 emit(newMessage(_staID + ": Get data in RTCM 3.x format", true)); 323 314 RTCM3Decoder* newDecoder = new RTCM3Decoder(_staID, _rawFile); 324 315 _decoder = newDecoder; 325 316 connect((RTCM3Decoder*) newDecoder, SIGNAL(newMessage(QByteArray,bool)), 326 this, SIGNAL(newMessage(QByteArray,bool))); 327 } 328 else if (_format.indexOf("ZERO") != -1) { 317 this, SIGNAL(newMessage(QByteArray,bool))); 318 } else if (_format.indexOf("ZERO") != -1) { 329 319 emit(newMessage(_staID + ": Get data in original format", true)); 330 320 _decoder = new bncZeroDecoder(_staID); 331 } 332 else if (_format.indexOf("RTNET") != -1) { 321 } else if (_format.indexOf("RTNET") != -1) { 333 322 emit(newMessage(_staID + ": Get data in RTNet format", true)); 334 323 _decoder = new bncRtnetDecoder(); 335 } 336 else { 324 } else { 337 325 emit(newMessage(_staID + ": Unknown data format " + _format, true)); 338 326 _isToBeDeleted = true; … … 342 330 msleep(100); //sleep 0.1 sec 343 331 344 _decoder->initRinex(_staID, _mountPoint, _latitude, _longitude, 345 _nmea,_ntripVersion);332 _decoder->initRinex(_staID, _mountPoint, _latitude, _longitude, _nmea, 333 _ntripVersion); 346 334 347 335 if (_rawFile) { … … 357 345 if (!_rawFile) { 358 346 return _decoder; 359 } 360 else { 347 } else { 361 348 if (_decodersRaw.contains(_staID) || initDecoder() == success) { 362 349 return _decodersRaw[_staID]; … … 382 369 delete it.value(); 383 370 } 384 } 385 else { 371 } else { 386 372 delete _decoder; 387 373 } … … 398 384 _isToBeDeleted = true; 399 385 400 if (_nmeaPortsMap.contains(_staID)) {386 if (_nmeaPortsMap.contains(_staID)) { 401 387 _nmeaPortsMap.remove(_staID); 402 388 } … … 410 396 #ifdef BNC_DEBUG 411 397 if (BNC_CORE->mode() != t_bncCore::interactive) { 412 while (!isFinished()) {wait();} 398 while (!isFinished()) { 399 wait(); 400 } 413 401 delete this; 414 } 415 else { 416 if (!isRunning()) {delete this;} 402 } else { 403 if (!isRunning()) { 404 delete this; 405 } 417 406 } 418 407 #else 419 408 if (!isRunning()) {delete this;} 420 409 #endif 421 410 … … 450 439 decoder->_obsList.clear(); 451 440 } 452 } 453 else { 441 } else { 454 442 _decoder->_obsList.clear(); 455 443 } … … 458 446 // --------- 459 447 QByteArray data; 460 if 448 if (_query) { 461 449 _query->waitForReadyRead(data); 462 } 463 else if (_rawFile) { 450 } else if (_rawFile) { 464 451 data = _rawFile->readChunk(); 465 452 _format = _rawFile->format(); 466 _staID 453 _staID = _rawFile->staID(); 467 454 468 455 QCoreApplication::processEvents(); … … 486 473 msleep(10000); //sleep 10 sec, G. Weber 487 474 continue; 488 } 489 else { 475 } else { 490 476 emit newBytes(_staID, nBytes); 491 477 emit newRawData(_staID, data); … … 520 506 if (_latencyChecker) { 521 507 _latencyChecker->checkOutage(irc == success); 522 _latencyChecker->checkObsLatency(decoder()->_obsList); 523 _latencyChecker->checkCorrLatency(decoder()->corrGPSEpochTime()); 524 508 QListIterator<int> it(decoder()->_typeList); 509 _ssrEpoch = decoder()->corrGPSEpochTime(); 510 if (_oldSsrEpoch > 0 && _ssrEpoch && _ssrEpoch > _oldSsrEpoch) { 511 if (ssrOrb) { 512 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1057); 513 ssrOrb = false; 514 } 515 if (ssrClk) { 516 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1058); 517 ssrClk = false; 518 } 519 if (ssrOrbClk) { 520 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1060); 521 ssrOrbClk = false; 522 } 523 if (ssrCbi) { 524 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1059); 525 ssrCbi = false; 526 } 527 if (ssrPbi) { 528 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1265); 529 ssrPbi = false; 530 } 531 if (ssrVtec) { 532 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1264); 533 ssrVtec = false; 534 } 535 if (ssrUra) { 536 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1061); 537 ssrUra = false; 538 } 539 if (ssrHr) { 540 _latencyChecker->checkCorrLatency(_oldSsrEpoch, 1062); 541 ssrHr = false; 542 } 543 } 544 while (it.hasNext()) { 545 int rtcmType = it.next(); 546 if ((rtcmType >= 1001 && rtcmType <= 1004) || // legacy RTCM OBS 547 (rtcmType >= 1009 && rtcmType <= 1012) || // legacy RTCM OBS 548 (rtcmType >= 1071 && rtcmType <= 1127)) { // MSM RTCM OBS 549 obs = true; 550 } else if ((rtcmType >= 1057 && rtcmType <= 1068) || 551 (rtcmType >= 1240 && rtcmType <= 1270)) { 552 switch (rtcmType) { 553 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258: 554 ssrOrb = true; 555 break; 556 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259: 557 ssrClk = true; 558 break; 559 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261: 560 ssrOrbClk = true; 561 break; 562 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260: 563 ssrCbi = true; 564 break; 565 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270: 566 ssrPbi = true; 567 break; 568 case 1264: 569 ssrVtec = true; 570 break; 571 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262: 572 ssrUra = true; 573 break; 574 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263: 575 ssrHr = true; 576 break; 577 } 578 } 579 } 580 if (obs) { 581 _latencyChecker->checkObsLatency(decoder()->_obsList); 582 } 583 _oldSsrEpoch = _ssrEpoch; 525 584 emit newLatency(_staID, _latencyChecker->currentLatency()); 526 585 } 527 528 586 miscScanRTCM(); 529 587 … … 543 601 if (wrongObservationEpoch) { 544 602 QString prn(obs._prn.toString().c_str()); 545 emit( newMessage(_staID + " (" + prn.toAscii() + ")" + ": Wrong observation epoch(s)", false) ); 603 emit(newMessage( 604 _staID + " (" + prn.toAscii() + ")" 605 + ": Wrong observation epoch(s)", false)); 546 606 continue; 547 607 } … … 552 612 if (!_rawFile) { 553 613 QString prn(obs._prn.toString().c_str()); 554 long iSec = long(floor(obs._time.gpssec()+0.5));555 long obsTime = obs._time.gpsw() *7*24*3600 + iSec;614 long iSec = long(floor(obs._time.gpssec() + 0.5)); 615 long obsTime = obs._time.gpsw() * 7 * 24 * 3600 + iSec; 556 616 QMap<QString, long>::const_iterator it = _prnLastEpo.find(prn); 557 617 if (it != _prnLastEpo.end()) { 558 618 long oldTime = it.value(); 559 if (obsTime <oldTime) {560 emit( newMessage(_staID +561 ": old observation " + prn.toAscii(),false));619 if (obsTime < oldTime) { 620 emit(newMessage(_staID + ": old observation " + prn.toAscii(), 621 false)); 562 622 continue; 563 } 564 else if (obsTime == oldTime) {565 emit( newMessage(_staID +566 ": observation coming more than once "+ prn.toAscii(), false));623 } else if (obsTime == oldTime) { 624 emit(newMessage( 625 _staID + ": observation coming more than once " 626 + prn.toAscii(), false)); 567 627 continue; 568 628 } … … 584 644 } 585 645 586 } 587 catch (Exception& exc) { 646 } catch (Exception& exc) { 588 647 emit(newMessage(_staID + " " + exc.what(), true)); 589 648 _isToBeDeleted = true; 590 } 591 catch (...) { 649 } catch (...) { 592 650 emit(newMessage(_staID + " bncGetThread exception", true)); 593 651 _isToBeDeleted = true; … … 611 669 decoder->setRinexReconnectFlag(false); 612 670 } 613 } 614 else { 671 } else { 615 672 _decoder->setRinexReconnectFlag(false); 616 673 } … … 625 682 if (_nextSleep == 0) { 626 683 _nextSleep = 1; 627 } 628 else { 684 } else { 629 685 _nextSleep = 2 * _nextSleep; 630 686 if (_nextSleep > 256) { … … 640 696 delete _query; 641 697 } 642 if 698 if (_ntripVersion == "U") { 643 699 _query = new bncNetQueryUdp(); 644 } 645 else if (_ntripVersion == "R") { 700 } else if (_ntripVersion == "R") { 646 701 _query = new bncNetQueryRtp(); 647 } 648 else if (_ntripVersion == "S") { 702 } else if (_ntripVersion == "S") { 649 703 _query = new bncNetQueryS(); 650 } 651 else if (_ntripVersion == "N") { 704 } else if (_ntripVersion == "N") { 652 705 _query = new bncNetQueryV0(); 653 } 654 else if (_ntripVersion == "UN") { 706 } else if (_ntripVersion == "UN") { 655 707 _query = new bncNetQueryUdp0(); 656 } 657 else if (_ntripVersion == "2") { 708 } else if (_ntripVersion == "2") { 658 709 _query = new bncNetQueryV2(false); 659 } 660 else if (_ntripVersion == "2s") { 710 } else if (_ntripVersion == "2s") { 661 711 _query = new bncNetQueryV2(true); 662 } 663 else { 712 } else { 664 713 _query = new bncNetQueryV1(); 665 714 } … … 668 717 _query->startRequest(_mountPoint, _manualNMEAString); 669 718 _lastManualNMEA = QDateTime::currentDateTime(); 670 } 671 else if (_serialNMEA == AUTO_NMEA) { 719 } else if (_serialNMEA == AUTO_NMEA) { 672 720 if (_serialPort) { 673 721 int nb = _serialPort->bytesAvailable(); … … 688 736 } 689 737 } 690 } 691 else { 738 } else { 692 739 _query->startRequest(_mountPoint, ""); 693 740 } … … 705 752 decoder->setRinexReconnectFlag(false); 706 753 } 707 } 708 else { 709 _decoder->setRinexReconnectFlag(false); 754 } else { 755 _decoder->setRinexReconnectFlag(false); 710 756 } 711 757 … … 717 763 void bncGetThread::miscScanRTCM() { 718 764 719 if ( !decoder()) {765 if (!decoder()) { 720 766 return; 721 767 } 722 768 723 769 bncSettings settings; 724 if ( Qt::CheckState(settings.value("miscScanRTCM").toInt()) == Qt::Checked) {725 726 if ( _miscMount == _staID || _miscMount == "ALL") {770 if (Qt::CheckState(settings.value("miscScanRTCM").toInt()) == Qt::Checked) { 771 772 if (_miscMount == _staID || _miscMount == "ALL") { 727 773 // RTCM message types 728 774 // ------------------ 729 775 for (int ii = 0; ii < decoder()->_typeList.size(); ii++) { 730 QString type = QString("%1 ").arg(decoder()->_typeList[ii]); 731 emit(newMessage(_staID + ": Received message type " + type.toAscii(), true)); 776 QString type = QString("%1 ").arg(decoder()->_typeList[ii]); 777 emit(newMessage(_staID + ": Received message type " + type.toAscii(), 778 true)); 732 779 } 733 780 … … 742 789 QString rnxStr('C'); 743 790 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str()); 744 if (_format.indexOf("RTCM_2") != -1 ||745 _format.indexOf("RTCM2") != -1 ||746 _format.indexOf("RTCM 2") != -1) {791 if (_format.indexOf("RTCM_2") != -1 792 || _format.indexOf("RTCM2") != -1 793 || _format.indexOf("RTCM 2") != -1) { 747 794 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr); 748 795 } … … 755 802 QString rnxStr('L'); 756 803 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str()); 757 if (_format.indexOf("RTCM_2") != -1 ||758 _format.indexOf("RTCM2") != -1 ||759 _format.indexOf("RTCM 2") != -1) {804 if (_format.indexOf("RTCM_2") != -1 805 || _format.indexOf("RTCM2") != -1 806 || _format.indexOf("RTCM 2") != -1) { 760 807 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr); 761 808 } … … 765 812 } 766 813 } 767 if (obs._obs[iFrq]->_dopplerValid) {814 if (obs._obs[iFrq]->_dopplerValid) { 768 815 QString rnxStr('D'); 769 816 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str()); 770 if (_format.indexOf("RTCM_2") != -1 ||771 _format.indexOf("RTCM2") != -1 ||772 _format.indexOf("RTCM 2") != -1) {817 if (_format.indexOf("RTCM_2") != -1 818 || _format.indexOf("RTCM2") != -1 819 || _format.indexOf("RTCM 2") != -1) { 773 820 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr); 774 821 } … … 778 825 } 779 826 } 780 if (obs._obs[iFrq]->_snrValid) {827 if (obs._obs[iFrq]->_snrValid) { 781 828 QString rnxStr('S'); 782 829 rnxStr.append(obs._obs[iFrq]->_rnxType2ch.c_str()); 783 if (_format.indexOf("RTCM_2") != -1 ||784 _format.indexOf("RTCM2") != -1 ||785 _format.indexOf("RTCM 2") != -1) {830 if (_format.indexOf("RTCM_2") != -1 831 || _format.indexOf("RTCM2") != -1 832 || _format.indexOf("RTCM 2") != -1) { 786 833 rnxStr = t_rnxObsFile::type3to2(obs._prn.system(), rnxStr); 787 834 } … … 796 843 QTextStream str(&msg); 797 844 QString s; 798 str << obs._prn.system() << " " << s.sprintf("%2d", rnxTypes.size()) << " "; 845 str << obs._prn.system() << " " 846 << s.sprintf("%2d", rnxTypes.size()) << " "; 799 847 for (int iType = 0; iType < rnxTypes.size(); iType++) { 800 848 str << " " << rnxTypes[iType]; 801 849 } 802 emit(newMessage(_staID + ": Observation Types: " + msg.toAscii(), true)); 850 emit(newMessage(_staID + ": Observation Types: " + msg.toAscii(), 851 true)); 803 852 } 804 853 } … … 807 856 // ------------------------- 808 857 for (int ii = 0; ii < decoder()->_antType.size(); ii++) { 809 QString ant1 = 858 QString ant1 = QString("%1 ").arg(decoder()->_antType[ii]); 810 859 emit(newMessage(_staID + ": Antenna descriptor " + ant1.toAscii(), true)); 811 860 } … … 813 862 // RTCM Antenna Coordinates 814 863 // ------------------------ 815 for (int ii =0; ii < decoder()->_antList.size(); ii++) {864 for (int ii = 0; ii < decoder()->_antList.size(); ii++) { 816 865 QByteArray antT; 817 if 866 if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::ARP) { 818 867 antT = "ARP"; 819 } 820 else if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::APC) { 868 } else if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::APC) { 821 869 antT = "APC"; 822 870 } 823 871 QByteArray ant1, ant2, ant3; 824 ant1 = QString("%1 ").arg(decoder()->_antList[ii].xx,0,'f',4).toAscii(); 825 ant2 = QString("%1 ").arg(decoder()->_antList[ii].yy,0,'f',4).toAscii(); 826 ant3 = QString("%1 ").arg(decoder()->_antList[ii].zz,0,'f',4).toAscii(); 872 ant1 = 873 QString("%1 ").arg(decoder()->_antList[ii].xx, 0, 'f', 4).toAscii(); 874 ant2 = 875 QString("%1 ").arg(decoder()->_antList[ii].yy, 0, 'f', 4).toAscii(); 876 ant3 = 877 QString("%1 ").arg(decoder()->_antList[ii].zz, 0, 'f', 4).toAscii(); 827 878 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true)); 828 879 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true)); … … 831 882 if (decoder()->_antList[ii].height_f) { 832 883 hh = decoder()->_antList[ii].height; 833 QByteArray ant4 = QString("%1 ").arg(hh,0,'f',4).toAscii(); 834 emit(newMessage(_staID + ": Antenna height above marker " + ant4 + "m", true)); 884 QByteArray ant4 = QString("%1 ").arg(hh, 0, 'f', 4).toAscii(); 885 emit(newMessage( 886 _staID + ": Antenna height above marker " + ant4 + "m", true)); 835 887 } 836 888 emit(newAntCrd(_staID, decoder()->_antList[ii].xx, 837 decoder()->_antList[ii].yy, decoder()->_antList[ii].zz, 838 hh, antT)); 889 decoder()->_antList[ii].yy, decoder()->_antList[ii].zz, hh, antT)); 839 890 } 840 891 … … 844 895 bool allFound = true; 845 896 QString slot = decoder()->_gloFrq; 846 slot.replace(" ", " ").replace(" ",":");897 slot.replace(" ", " ").replace(" ", ":"); 847 898 if (_gloSlots.indexOf(slot) == -1) { 848 899 _gloSlots.append(slot); … … 851 902 if (!allFound) { 852 903 _gloSlots.sort(); 853 emit(newMessage(_staID + ": GLONASS Slot:Freq " + _gloSlots.join(" ").toAscii(), true)); 904 emit(newMessage( 905 _staID + ": GLONASS Slot:Freq " + _gloSlots.join(" ").toAscii(), 906 true)); 854 907 } 855 908 } … … 859 912 #ifdef MLS_SOFTWARE 860 913 for (int ii=0; ii <decoder()->_antList.size(); ii++) { 861 862 if(decoder()->_antList[ii].type == GPSDecoder::t_antInfo::ARP) {863 864 865 866 867 868 869 870 871 872 873 874 914 QByteArray antT; 915 if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::ARP) { 916 antT = "ARP"; 917 } 918 else if (decoder()->_antList[ii].type == GPSDecoder::t_antInfo::APC) { 919 antT = "APC"; 920 } 921 double hh = 0.0; 922 if (decoder()->_antList[ii].height_f) { 923 hh = decoder()->_antList[ii].height; 924 } 925 emit(newAntCrd(_staID, decoder()->_antList[ii].xx, 926 decoder()->_antList[ii].yy, decoder()->_antList[ii].zz, 927 hh, antT)); 875 928 } 876 929 … … 930 983 void bncGetThread::slotNewNMEAConnection() { 931 984 _nmeaSockets->push_back(_nmeaServer->nextPendingConnection()); 932 emit( newMessage(QString("New PPP client on port: # %1") 933 .arg(_nmeaSockets->size()).toAscii(), true) ); 985 emit(newMessage( 986 QString("New PPP client on port: # %1").arg(_nmeaSockets->size()).toAscii(), 987 true)); 934 988 } 935 989 … … 945 999 if (sock->state() == QAbstractSocket::ConnectedState) { 946 1000 sock->write(str); 947 } 948 else if (sock->state() != QAbstractSocket::ConnectingState) { 1001 } else if (sock->state() != QAbstractSocket::ConnectingState) { 949 1002 delete sock; 950 1003 is.remove(); -
trunk/BNC/src/bncgetthread.h
r7424 r8082 47 47 public: 48 48 bncGetThread(bncRawFile* rawFile); 49 bncGetThread(const QUrl& mountPoint, 49 bncGetThread(const QUrl& mountPoint, 50 50 const QByteArray& format, 51 51 const QByteArray& latitude, 52 52 const QByteArray& longitude, 53 const QByteArray& nmea, 53 const QByteArray& nmea, 54 54 const QByteArray& ntripVersion); 55 55 … … 80 80 void newLatency(QByteArray staID, double clate); 81 81 void newObs(QByteArray staID, QList<t_satObs> obsList); 82 void newAntCrd(QByteArray staID, double xx, double yy, double zz, 82 void newAntCrd(QByteArray staID, double xx, double yy, double zz, 83 83 double hh, QByteArray antType); 84 84 void newMessage(QByteArray msg, bool showOnScreen); … … 121 121 int _nextSleep; 122 122 int _iMount; 123 int _ssrEpoch; 124 int _oldSsrEpoch; 123 125 bncRawFile* _rawFile; 124 126 QextSerialPort* _serialPort; 125 127 bool _isToBeDeleted; 128 bool obs; 129 bool ssrOrb, ssrClk, ssrOrbClk; 130 bool ssrCbi, ssrPbi; 131 bool ssrVtec; 132 bool ssrUra; 133 bool ssrHr; 126 134 latencyChecker* _latencyChecker; 127 135 QString _miscMount; -
trunk/BNC/src/latencychecker.cpp
r8011 r8082 130 130 // Initialize private members 131 131 // -------------------------- 132 _maxDt = 1000.0;133 132 _wrongEpoch = false; 134 133 _checkSeg = false; … … 138 137 _initPause = 0; 139 138 _currPause = 0; 140 _followSec = false; 141 _oldSecGPS = 0; 142 _newSecGPS = 0; 143 _numGaps = 0; 144 _diffSecGPS = 0; 145 _numLat = 0; 146 _sumLat = 0.0; 147 _sumLatQ = 0.0; 148 _meanDiff = 0.0; 149 _minLat = _maxDt; 150 _maxLat = -_maxDt; 151 _curLat = 0.0; 139 _endCorrupt = false; 140 _begCorrupt = false; 141 _fromCorrupt = false; 152 142 153 143 _checkTime = QDateTime::currentDateTime(); … … 162 152 _begDateTimeCorr = QDateTime::currentDateTime(); 163 153 _endDateTimeCorr = QDateTime::currentDateTime(); 164 165 154 } 166 155 … … 332 321 333 322 if (_miscIntr > 0 ) { 334 323 t_latency& l = _lObs; l._type = "Observations"; 335 324 QListIterator<t_satObs> it(obsList); 336 325 while (it.hasNext()) { 337 326 const t_satObs& obs = it.next(); 338 327 bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time); 339 _newSecGPS= static_cast<int>(obs._time.gpssec());340 if ( _newSecGPS != _oldSecGPS&& !wrongObservationEpoch) {341 if ( _newSecGPS % _miscIntr < _oldSecGPS% _miscIntr) {342 if ( _numLat > 0) {343 if ( _meanDiff > 0.0) {328 l._newSec = static_cast<int>(obs._time.gpssec()); 329 if (l._newSec > l._oldSec && !wrongObservationEpoch) { 330 if (l._newSec % _miscIntr < l._oldSec % _miscIntr) { 331 if (l._numLat > 0) { 332 if (l._meanDiff > 0.0) { 344 333 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 345 emit( newMessage(QString("%1 : Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs, %7gaps")334 emit( newMessage(QString("%1 %2: Mean latency %3 sec, min %4, max %5, rms %6, %7 epochs, %8 gaps") 346 335 .arg(_staID.data()) 347 .arg(int(_sumLat/_numLat*100)/100.) 348 .arg(int(_minLat*100)/100.) 349 .arg(int(_maxLat*100)/100.) 350 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 351 .arg(_numLat) 352 .arg(_numGaps) 336 .arg(l._type.data()) 337 .arg(int(l._sumLat/l._numLat*100)/100.) 338 .arg(int(l._minLat*100)/100.) 339 .arg(int(l._maxLat*100)/100.) 340 .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.) 341 .arg(l._numLat) 342 .arg(l._numGaps) 353 343 .toAscii(), true) ); 354 344 } 355 345 } else { 356 346 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 357 emit( newMessage(QString("%1 : Mean latency %2 sec, min %3, max %4, rms %5, %6epochs")347 emit( newMessage(QString("%1 %2: Mean latency %3 sec, min %4, max %5, rms %6, %7 epochs") 358 348 .arg(_staID.data()) 359 .arg(int(_sumLat/_numLat*100)/100.) 360 .arg(int(_minLat*100)/100.) 361 .arg(int(_maxLat*100)/100.) 362 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 363 .arg(_numLat) 349 .arg(l._type.data()) 350 .arg(int(l._sumLat/l._numLat*100)/100.) 351 .arg(int(l._minLat*100)/100.) 352 .arg(int(l._maxLat*100)/100.) 353 .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.) 354 .arg(l._numLat) 364 355 .toAscii(), true) ); 365 356 } 366 357 } 367 358 } 368 _meanDiff = _diffSecGPS / _numLat; 369 _diffSecGPS = 0; 370 _numGaps = 0; 371 _sumLat = 0.0; 372 _sumLatQ = 0.0; 373 _numLat = 0; 374 _minLat = _maxDt; 375 _maxLat = -_maxDt; 376 } 377 if (_followSec) { 378 _diffSecGPS += _newSecGPS - _oldSecGPS; 379 if (_meanDiff>0.) { 380 if (_newSecGPS - _oldSecGPS > 1.5 * _meanDiff) { 381 _numGaps += 1; 359 l._meanDiff = l._diffSec / l._numLat; 360 l.init(); 361 } 362 if (l._followSec) { 363 l._diffSec += l._newSec - l._oldSec; 364 if (l._meanDiff>0.) { 365 if (l._newSec - l._oldSec > 1.5 * l._meanDiff) { 366 l._numGaps += 1; 382 367 } 383 368 } … … 398 383 sec += secPerWeek; 399 384 } 400 _curLat = sec - obs._time.gpssec(); 401 _sumLat += _curLat; 402 _sumLatQ += _curLat * _curLat; 403 if (_curLat < _minLat) { 404 _minLat = _curLat; 405 } 406 if (_curLat >= _maxLat) { 407 _maxLat = _curLat; 408 } 409 _numLat += 1; 410 _oldSecGPS = _newSecGPS; 411 _followSec = true; 412 } 413 } 385 l._curLat = sec - obs._time.gpssec(); 386 l._sumLat += l._curLat; 387 l._sumLatQ += l._curLat * l._curLat; 388 if (l._curLat < l._minLat) { 389 l._minLat = l._curLat; 390 } 391 if (l._curLat >= l._maxLat) { 392 l._maxLat = l._curLat; 393 } 394 l._numLat += 1; 395 l._oldSec = l._newSec; 396 l._followSec = true; 397 } 398 } 399 _lObs = l; 400 setCurrentLatency(l._curLat); 414 401 } 415 402 } … … 417 404 // Perform latency checks (corrections) 418 405 ////////////////////////////////////////////////////////////////////////////// 419 void latencyChecker::checkCorrLatency(int corrGPSEpochTime) { 420 406 void latencyChecker::checkCorrLatency(int corrGPSEpochTime, int type) { 421 407 if (corrGPSEpochTime < 0) { 422 return; 408 return ; 409 } 410 t_latency& l = _lOrb; // init 411 switch (type) { 412 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258: 413 l = _lOrb; l._type = "Orbit"; 414 break; 415 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259: 416 l = _lClk; l._type = "Clock"; 417 break; 418 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261: 419 l = _lClkOrb; l._type = "Clock&Orbit"; 420 break; 421 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260: 422 l = _lCb; l._type = "Code Biases"; 423 break; 424 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270: 425 l = _lPb; l._type = "Phase Biases"; 426 break; 427 case 1264: 428 l = _lVtec; l._type = "VTEC"; 429 break; 430 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262: 431 l = _lUra; l._type = "URA"; 432 break; 433 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263: 434 l = _lHr; l._type = "Hr Clock"; 435 break; 436 default: 437 return; 423 438 } 424 439 425 440 if (_miscIntr > 0) { 426 427 _newSecGPS = corrGPSEpochTime; 428 441 l._newSec = corrGPSEpochTime; 429 442 int week; 430 443 double sec; 431 444 currentGPSWeeks(week, sec); 432 double dt = fabs(sec - _newSecGPS);445 double dt = fabs(sec - l._newSec); 433 446 const double secPerWeek = 7.0 * 24.0 * 3600.0; 434 447 if (dt > 0.5 * secPerWeek) { 435 if (sec > _newSecGPS) {448 if (sec > l._newSec) { 436 449 sec -= secPerWeek; 437 450 } else { … … 439 452 } 440 453 } 441 if ( _newSecGPS != _oldSecGPS) {442 if (int( _newSecGPS) % _miscIntr < int(_oldSecGPS) % _miscIntr) {443 if ( _numLat>0) {454 if (l._newSec > l._oldSec) { 455 if (int(l._newSec) % _miscIntr < int(l._oldSec) % _miscIntr) { 456 if (l._numLat>0) { 444 457 QString late; 445 if (_meanDiff>0.) { 446 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs, %6 gaps") 447 .arg(int(_sumLat/_numLat*100)/100.) 448 .arg(int(_minLat*100)/100.) 449 .arg(int(_maxLat*100)/100.) 450 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 451 .arg(_numLat) 452 .arg(_numGaps); 458 if (l._meanDiff>0.) { 459 late = QString(" %1: Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs, %7 gaps") 460 .arg(l._type.data()) 461 .arg(int(l._sumLat/l._numLat*100)/100.) 462 .arg(int(l._minLat*100)/100.) 463 .arg(int(l._maxLat*100)/100.) 464 .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.) 465 .arg(l._numLat) 466 .arg(l._numGaps); 453 467 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 454 468 emit(newMessage(QString(_staID + late ).toAscii(), true) ); … … 456 470 } 457 471 else { 458 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs") 459 .arg(int(_sumLat/_numLat*100)/100.) 460 .arg(int(_minLat*100)/100.) 461 .arg(int(_maxLat*100)/100.) 462 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 463 .arg(_numLat); 472 late = QString(" %1: Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs") 473 .arg(l._type.data()) 474 .arg(int(l._sumLat/l._numLat*100)/100.) 475 .arg(int(l._minLat*100)/100.) 476 .arg(int(l._maxLat*100)/100.) 477 .arg(int((sqrt((l._sumLatQ - l._sumLat * l._sumLat / l._numLat)/l._numLat))*100)/100.) 478 .arg(l._numLat); 464 479 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 465 480 emit(newMessage(QString(_staID + late ).toAscii(), true) ); … … 467 482 } 468 483 } 469 _meanDiff = int(_diffSecGPS)/_numLat; 470 _diffSecGPS = 0; 471 _numGaps = 0; 472 _sumLat = 0.0; 473 _sumLatQ = 0.0; 474 _numLat = 0; 475 _minLat = 1000.; 476 _maxLat = -1000.; 477 } 478 if (_followSec) { 479 _diffSecGPS += _newSecGPS - _oldSecGPS; 480 if (_meanDiff>0.) { 481 if (_newSecGPS - _oldSecGPS > 1.5 * _meanDiff) { 482 _numGaps += 1; 483 } 484 } 485 } 486 _curLat = sec - _newSecGPS; 487 _sumLat += _curLat; 488 _sumLatQ += _curLat * _curLat; 489 if (_curLat < _minLat) { 490 _minLat = _curLat; 491 } 492 if (_curLat >= _maxLat) { 493 _maxLat = _curLat; 494 } 495 _numLat += 1; 496 _oldSecGPS = _newSecGPS; 497 _followSec = true; 498 } 484 l._meanDiff = int(l._diffSec)/l._numLat; 485 l.init(); 486 } 487 488 if (l._followSec) { 489 l._diffSec += l._newSec - l._oldSec; 490 if (l._meanDiff>0.) { 491 if (l._newSec - l._oldSec > 1.5 * l._meanDiff) { 492 l._numGaps += 1; 493 } 494 } 495 } 496 l._curLat = sec - l._newSec; 497 l._sumLat += l._curLat; 498 l._sumLatQ += l._curLat * l._curLat; 499 if (l._curLat < l._minLat) { 500 l._minLat = l._curLat; 501 } 502 if (l._curLat >= l._maxLat) { 503 l._maxLat = l._curLat; 504 } 505 l._numLat += 1; 506 l._oldSec = l._newSec; 507 l._followSec = true; 508 setCurrentLatency(l._curLat); 509 } 510 switch (type) { 511 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258: 512 _lOrb = l; 513 break; 514 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259: 515 _lClk = l; 516 break; 517 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261: 518 _lClkOrb = l; 519 break; 520 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260: 521 _lCb = l; 522 break; 523 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270: 524 _lPb = l; 525 break; 526 case 1264: 527 _lVtec = l; 528 break; 529 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262: 530 _lUra = l; 531 break; 532 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263: 533 _lHr = l; 534 break; 535 } 499 536 } 500 537 } -
trunk/BNC/src/latencychecker.h
r7421 r8082 38 38 void checkOutage(bool decoded); 39 39 void checkObsLatency(const QList<t_satObs>& obsList); 40 void checkCorrLatency(int corrGPSEpochTime); 41 double currentLatency() const {return _curLat;} 40 void checkCorrLatency(int corrGPSEpochTime, int type); 41 double currentLatency() { return _curLat;} 42 //QByteArray currentLatencyType() {return l._type;} 42 43 44 class t_latency { 45 public: 46 t_latency() { 47 _oldSec = 0; 48 _newSec = 0; 49 _numGaps = 0; 50 _diffSec = 0; 51 _numLat = 0; 52 _sumLat = 0.0; 53 _sumLatQ = 0.0; 54 _meanDiff = 0.0; 55 _minLat = 1000.0; 56 _maxLat = -1000.0; 57 _curLat = 0.0; 58 _type = ""; 59 _followSec = false; 60 } 61 void init() { 62 _diffSec = 0; 63 _numGaps = 0; 64 _sumLat = 0.0; 65 _sumLatQ = 0.0; 66 _numLat = 0; 67 _minLat = 1000.0; 68 _maxLat = -1000.0; 69 }; 70 void print() { 71 qDebug() << _type; 72 qDebug() << "_oldSec: " << _oldSec; 73 qDebug() << "_newSec: " << _newSec; 74 qDebug() << "_numGaps: " << _numGaps; 75 qDebug() << "_diffSec: " << _diffSec; 76 qDebug() << "_numLat: " << _numLat; 77 qDebug() << "_sumLat: " << _sumLat; 78 qDebug() << "_sumLatQ: " << _sumLatQ; 79 qDebug() << "_meanDiff: " << _meanDiff; 80 qDebug() << "_minLat: " << _minLat; 81 qDebug() << "_maxLat: " << _maxLat; 82 qDebug() << "_curLat: " << _curLat; 83 qDebug() << "_followSec" << _followSec; 84 }; 85 int _oldSec; 86 int _newSec; 87 int _numGaps; 88 int _diffSec; 89 int _numLat; 90 double _sumLat; 91 double _sumLatQ; 92 double _meanDiff; 93 double _minLat; 94 double _maxLat; 95 double _curLat; 96 QByteArray _type; 97 bool _followSec; 98 99 }; 100 101 t_latency _lObs; 102 t_latency _lOrb; 103 t_latency _lClk; 104 t_latency _lClkOrb; 105 t_latency _lPb; 106 t_latency _lCb; 107 t_latency _lVtec; 108 t_latency _lUra; 109 t_latency _lHr; 110 void setCurrentLatency(double lat) { 111 _curLat = lat; 112 } 113 /* 114 void setLatencyObjekt(t_latency& lat, QByteArray type) { 115 qDebug() << "set " << type; 116 l= lat; 117 l._type = type; 118 l.print(); 119 } 120 121 void getLatencyObjekt(t_latency& lat) { 122 lat =l; 123 } 124 125 */ 43 126 signals: 44 127 void newMessage(QByteArray msg, bool showOnScreen); … … 55 138 int _initPause; 56 139 int _currPause; 57 int _oldSecGPS;58 int _newSecGPS;59 int _numGaps;60 int _diffSecGPS;61 int _numLat;62 140 bool _wrongEpoch; 63 141 bool _checkSeg; 64 142 bool _begCorrupt; 65 143 bool _endCorrupt; 66 bool _followSec;67 144 bool _fromReconnect; 68 145 bool _fromCorrupt; 69 double _maxDt;70 double _sumLat;71 double _sumLatQ;72 double _meanDiff;73 double _minLat;74 double _maxLat;75 double _curLat;76 146 QByteArray _staID; 77 147 QString _adviseScript; … … 97 167 QDateTime _begDateTimeCorr; 98 168 QDateTime _endDateTimeCorr; 169 double _curLat; 99 170 }; 100 171
Note:
See TracChangeset
for help on using the changeset viewer.