Changeset 1299 in ntrip
- Timestamp:
- Dec 12, 2008, 5:58:00 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/RTCM2Decoder.cpp
r1269 r1299 309 309 t_listMap::const_iterator ieph = _ephList.find(PRN); 310 310 311 if ( ieph == _ephList.end() ) {312 errmsg.push_back("missing eph for " + PRN);313 continue;314 }315 316 311 double L1 = 0; 317 312 double L2 = 0; … … 361 356 } 362 357 363 eph = ieph->second->getEph(IODcorr); 358 // Select corresponding ephemerides 359 if ( ieph != _ephList.end() ) { 360 eph = ieph->second->getEph(IODcorr); 361 } 364 362 365 363 if ( eph ) { … … 443 441 _obsList.push_back( new_obs ); 444 442 445 /// ostringstream hasIODstr;446 /// copy(hasIOD.begin(), hasIOD.end(), ostream_iterator<string>(hasIODstr, " "));447 /// errmsg.push_back("decoded PRN " + PRN + " : " + hasIODstr.str());448 } 449 } 450 } 443 ////ostringstream hasIODstr; 444 ////copy(hasIOD.begin(), hasIOD.end(), ostream_iterator<string>(hasIODstr, " ")); 445 ////errmsg.push_back("decoded PRN " + PRN + " : " + hasIODstr.str()); 446 } 447 } 448 } -
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r1268 r1299 163 163 .arg(_numLat) 164 164 .arg(_numGaps); 165 emit(newMessage(QString(_staID + late ).toAscii() 165 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 166 166 } else { 167 167 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs") … … 171 171 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 172 172 .arg(_numLat); 173 emit(newMessage(QString(_staID + late ).toAscii() 173 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 174 174 } 175 175 } … … 269 269 270 270 if (rr == 2) { 271 emit(newMessage( (_staID + ": No valid RINEX! All values are modulo 299792.458!").toAscii() 271 emit(newMessage( (_staID + ": No valid RINEX! All values are modulo 299792.458!").toAscii(), true)); 272 272 } 273 273 … … 368 368 .arg(ep->TOC, 6) 369 369 .arg(ep->TOE, 6); 370 emit (newMessage(msg.toAscii()));370 emit newMessage(msg.toAscii(), false); 371 371 #endif 372 372 -
trunk/BNC/RTCM3/RTCM3Decoder.h
r1218 r1299 42 42 virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg); 43 43 signals: 44 void newMessage(QByteArray msg );44 void newMessage(QByteArray msg,bool showOnScreen); 45 45 void newGPSEph(gpsephemeris* gpseph); 46 46 void newGlonassEph(glonassephemeris* glonasseph); -
trunk/BNC/bnc.pro
r1295 r1299 5 5 ###CONFIG += debug 6 6 7 ##DEFINES += NO_RTCM3_MAIN DEBUG_RTCM2_20218 7 DEFINES += NO_RTCM3_MAIN 8 ###DEFINES += DEBUG_RTCM2_2021 9 9 10 10 RESOURCES += bnc.qrc -
trunk/BNC/bncapp.cpp
r1292 r1299 147 147 // Write a Program Message 148 148 //////////////////////////////////////////////////////////////////////////// 149 void bncApp::slotMessage(const QByteArray msg ) {149 void bncApp::slotMessage(const QByteArray msg, bool showOnScreen) { 150 150 151 151 QMutexLocker locker(&_mutexMessage); 152 152 153 153 messagePrivate(msg); 154 emit newMessage(msg );154 emit newMessage(msg, showOnScreen); 155 155 } 156 156 … … 573 573 _server = new QTcpServer; 574 574 if ( !_server->listen(QHostAddress::Any, _port) ) { 575 slotMessage("bncApp: cannot listen on ephemeris port" );575 slotMessage("bncApp: cannot listen on ephemeris port", true); 576 576 } 577 577 connect(_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); … … 589 589 _serverCorr = new QTcpServer; 590 590 if ( !_serverCorr->listen(QHostAddress::Any, _portCorr) ) { 591 slotMessage("bncApp: cannot listen on correction port" );591 slotMessage("bncApp: cannot listen on correction port", true); 592 592 } 593 593 connect(_serverCorr, SIGNAL(newConnection()), this, SLOT(slotNewConnectionCorr())); … … 646 646 _lastDumpCoSec - coTime + _waitCoTime); 647 647 messagePrivate(line.toAscii()); 648 emit( newMessage(line.toAscii() ) );648 emit( newMessage(line.toAscii(), true) ); 649 649 return; 650 650 } -
trunk/BNC/bncapp.h
r1291 r1299 45 45 void setWaitCoTime(int waitCoTime) {_waitCoTime = waitCoTime;} 46 46 public slots: 47 void slotMessage(const QByteArray msg );47 void slotMessage(const QByteArray msg, bool showOnScreen); 48 48 void slotNewGPSEph(gpsephemeris* gpseph); 49 49 void slotNewGlonassEph(glonassephemeris* glonasseph); … … 52 52 53 53 signals: 54 void newMessage(QByteArray msg );54 void newMessage(QByteArray msg, bool showOnScreen); 55 55 void newEphGPS(gpsephemeris gpseph); 56 56 void newEphGlonass(glonassephemeris glonasseph); -
trunk/BNC/bnccaster.cpp
r1246 r1299 54 54 QSettings settings; 55 55 56 connect(this, SIGNAL(newMessage(QByteArray )),57 (bncApp*) qApp, SLOT(slotMessage(const QByteArray )));56 connect(this, SIGNAL(newMessage(QByteArray,bool)), 57 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool))); 58 58 59 59 if ( !outFileName.isEmpty() ) { … … 80 80 _server = new QTcpServer; 81 81 if ( !_server->listen(QHostAddress::Any, _port) ) { 82 emit newMessage("bncCaster: cannot listen on sync port" );82 emit newMessage("bncCaster: cannot listen on sync port", true); 83 83 } 84 84 connect(_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); … … 94 94 _uServer = new QTcpServer; 95 95 if ( !_uServer->listen(QHostAddress::Any, uPort) ) { 96 emit newMessage("bncCaster: cannot listen on usync port" );96 emit newMessage("bncCaster: cannot listen on usync port", true); 97 97 } 98 98 connect(_uServer, SIGNAL(newConnection()), this, SLOT(slotNewUConnection())); … … 196 196 !settings.value("outPort").toString().isEmpty() ) { 197 197 emit( newMessage(QString("Station %1: old epoch %2 thrown away") 198 .arg(staID.data()).arg(iSec).toAscii() ) );198 .arg(staID.data()).arg(iSec).toAscii(), true) ); 199 199 } 200 200 } … … 220 220 _sockets->push_back( _server->nextPendingConnection() ); 221 221 emit( newMessage(QString("New Connection # %1") 222 .arg(_sockets->size()).toAscii() ) );222 .arg(_sockets->size()).toAscii(), true) ); 223 223 } 224 224 … … 226 226 _uSockets->push_back( _uServer->nextPendingConnection() ); 227 227 emit( newMessage(QString("New Connection (usync) # %1") 228 .arg(_uSockets->size()).toAscii() ) );228 .arg(_uSockets->size()).toAscii(), true) ); 229 229 } 230 230 … … 253 253 _staIDs.removeAll(staID); 254 254 emit( newMessage( 255 QString("Mountpoint size %1").arg(_staIDs.size()).toAscii() ) );255 QString("Mountpoint size %1").arg(_staIDs.size()).toAscii(), true) ); 256 256 if (_staIDs.size() == 0) { 257 emit(newMessage("bncCaster:: last get thread terminated" ));257 emit(newMessage("bncCaster:: last get thread terminated", true)); 258 258 emit getThreadErrors(); 259 259 } … … 442 442 emit mountPointsRead(_threads); 443 443 emit( newMessage(QString("Configuration read: %1 stream(s)") 444 .arg(_threads.count()).toAscii() ) );444 .arg(_threads.count()).toAscii(), true) ); 445 445 446 446 // (Re-) Start the configuration timer -
trunk/BNC/bnccaster.h
r1222 r1299 50 50 void mountPointsRead(QList<bncGetThread*>); 51 51 void getThreadErrors(); 52 void newMessage(QByteArray msg );52 void newMessage(QByteArray msg, bool showOnScreen); 53 53 54 54 private slots: -
trunk/BNC/bncgetthread.cpp
r1298 r1299 111 111 112 112 bncApp* app = (bncApp*) qApp; 113 app->connect(this, SIGNAL(newMessage(QByteArray )),114 app, SLOT(slotMessage(const QByteArray )));113 app->connect(this, SIGNAL(newMessage(QByteArray,bool)), 114 app, SLOT(slotMessage(const QByteArray,bool))); 115 115 116 116 _decoder = 0; … … 406 406 emit(newMessage((_staID + ": Caster Response: " + line + 407 407 " Adjust User-ID and Password Register, see" 408 "\n " + reg).toAscii() ));408 "\n " + reg).toAscii(), true)); 409 409 return fatal; 410 410 } 411 411 if (line.indexOf("ICY 200 OK") != 0) { 412 emit(newMessage((_staID + ": Wrong Caster Response:\n" + line).toAscii() ));412 emit(newMessage((_staID + ": Wrong Caster Response:\n" + line).toAscii(), true)); 413 413 return failure; 414 414 } 415 415 } 416 416 else { 417 emit(newMessage(_staID + ": Response Timeout" ));417 emit(newMessage(_staID + ": Response Timeout", true)); 418 418 return failure; 419 419 } … … 424 424 if (!_decoder) { 425 425 if (_format.indexOf("RTCM_2") != -1) { 426 emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format" ));426 emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format", true)); 427 427 _decoder = new RTCM2Decoder(_staID.data()); 428 428 } 429 429 else if (_format.indexOf("RTCM_3") != -1) { 430 emit(newMessage("Get Data: " + _staID + " in RTCM 3.x format" ));430 emit(newMessage("Get Data: " + _staID + " in RTCM 3.x format", true)); 431 431 _decoder = new RTCM3Decoder(_staID); 432 connect((RTCM3Decoder*) _decoder, SIGNAL(newMessage(QByteArray )),433 this, SIGNAL(newMessage(QByteArray )));432 connect((RTCM3Decoder*) _decoder, SIGNAL(newMessage(QByteArray,bool)), 433 this, SIGNAL(newMessage(QByteArray,bool))); 434 434 } 435 435 else if (_format.indexOf("RTIGS") != -1) { 436 emit(newMessage("Get Data: " + _staID + " in RTIGS format" ));436 emit(newMessage("Get Data: " + _staID + " in RTIGS format", true)); 437 437 _decoder = new RTIGSDecoder(); 438 438 } 439 439 else if (_format.indexOf("ZERO") != -1) { 440 emit(newMessage("Get Data: " + _staID + " in original format" ));440 emit(newMessage("Get Data: " + _staID + " in original format", true)); 441 441 _decoder = new bncZeroDecoder(_staID); 442 442 } 443 443 else { 444 emit(newMessage(_staID + ": Unknown data format " + _format ));444 emit(newMessage(_staID + ": Unknown data format " + _format, true)); 445 445 if (_rawInpFile) { 446 446 cerr << "Uknown data format" << endl; … … 491 491 } 492 492 else if (irc != success) { 493 emit(newMessage(_staID + ": initRun failed, reconnecting" ));493 emit(newMessage(_staID + ": initRun failed, reconnecting", true)); 494 494 tryReconnect(); 495 495 } … … 506 506 try { 507 507 if (_socket && _socket->state() != QAbstractSocket::ConnectedState) { 508 emit(newMessage(_staID + ": Socket not connected, reconnecting" ));508 emit(newMessage(_staID + ": Socket not connected, reconnecting", true)); 509 509 tryReconnect(); 510 510 } … … 553 553 #ifdef DEBUG_RTCM2_2021 554 554 for (unsigned ii = 0; ii < errmsg.size(); ii++) { 555 emit newMessage(_staID + ": " + errmsg[ii].c_str() );555 emit newMessage(_staID + ": " + errmsg[ii].c_str(), false); 556 556 } 557 557 #endif … … 574 574 #ifdef DEBUG_RTCM2_2021 575 575 for (unsigned ii = 0; ii < errmsg.size(); ii++) { 576 emit newMessage(_staID + ": " + errmsg[ii].c_str() );576 emit newMessage(_staID + ": " + errmsg[ii].c_str(), false); 577 577 } 578 578 #endif … … 619 619 _endDateCor = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().date().toString("yy-MM-dd"); 620 620 _endTimeCor = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().time().toString("hh:mm:ss"); 621 emit(newMessage((_staID + ": Recovery threshold exceeded, corruption ended " + _endDateCor + " " + _endTimeCor).toAscii())); 621 emit(newMessage((_staID + ": Recovery threshold exceeded, corruption ended " 622 + _endDateCor + " " + _endTimeCor).toAscii(), true)); 622 623 callScript(("End_Corrupted " + _endDateCor + " " + _endTimeCor + " Begin was " + _begDateCor + " " + _begTimeCor).toAscii()); 623 624 endCorrupt = true; … … 632 633 _begDateCor = _decodeSucc.toUTC().date().toString("yy-MM-dd"); 633 634 _begTimeCor = _decodeSucc.toUTC().time().toString("hh:mm:ss"); 634 emit(newMessage((_staID + ": Failure threshold exceeded, corrupted since " + _begDateCor + " " + _begTimeCor).toAscii())); 635 emit(newMessage((_staID + ": Failure threshold exceeded, corrupted since " 636 + _begDateCor + " " + _begTimeCor).toAscii(), true)); 635 637 callScript(("Begin_Corrupted " + _begDateCor + " " + _begTimeCor).toAscii()); 636 638 begCorrupt = true; … … 653 655 _endDateOut = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().date().toString("yy-MM-dd"); 654 656 _endTimeOut = QDateTime::currentDateTime().addSecs(- _adviseReco * 60).toUTC().time().toString("hh:mm:ss"); 655 emit(newMessage((_staID + ": Recovery threshold exceeded, outage ended " + _endDateOut + " " + _endTimeOut).toAscii())); 657 emit(newMessage((_staID + ": Recovery threshold exceeded, outage ended " 658 + _endDateOut + " " + _endTimeOut).toAscii(), true)); 656 659 callScript(("End_Outage " + _endDateOut + " " + _endTimeOut + " Begin was " + _begDateOut + " " + _begTimeOut).toAscii()); 657 660 } … … 671 674 for (int ii=0;ii<_decoder->_typeList.size();ii++) { 672 675 type = QString("%1 ").arg(_decoder->_typeList[ii]); 673 emit(newMessage(_staID + ": Received message type " + type.toAscii() 676 emit(newMessage(_staID + ": Received message type " + type.toAscii(), true)); 674 677 } 675 678 } … … 681 684 for (int ii=0;ii<_decoder->_antType.size();ii++) { 682 685 ant1 = QString("%1 ").arg(_decoder->_antType[ii]); 683 emit(newMessage(_staID + ": Antenna descriptor " + ant1.toAscii() 686 emit(newMessage(_staID + ": Antenna descriptor " + ant1.toAscii(), true)); 684 687 } 685 688 } … … 697 700 case GPSDecoder::t_antInfo::APC: antT = "APC"; break; 698 701 } 699 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m" ));700 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m" ));701 emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m" ));702 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true)); 703 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true)); 704 emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m", true)); 702 705 if (_decoder->_antList[ii].height_f) { 703 706 QByteArray ant4 = QString("%1 ").arg(_decoder->_antList[ii].height,0,'f',4).toAscii(); 704 emit(newMessage(_staID + ": Antenna height above marker " + ant4 + "m" ));707 emit(newMessage(_staID + ": Antenna height above marker " + ant4 + "m", true)); 705 708 } 706 709 emit(newAntCrd(_staID, … … 752 755 if (week != obs->_o.GPSWeek || dt > maxDt) { 753 756 if (!wrongEpoch) { 754 emit( newMessage(_staID + ": Wrong observation epoch(s)" ) );757 emit( newMessage(_staID + ": Wrong observation epoch(s)", true) ); 755 758 wrongEpoch = true; 756 759 } … … 777 780 .arg(numLat) 778 781 .arg(numGaps) 779 .toAscii() ) );782 .toAscii(), true) ); 780 783 } else { 781 784 emit( newMessage(QString("%1: Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs") … … 786 789 .arg(int((sqrt((sumLatQ - sumLat * sumLat / numLat)/numLat))*100)/100.) 787 790 .arg(numLat) 788 .toAscii() ) );791 .toAscii(), true) ); 789 792 } 790 793 } … … 882 885 // ------------------ 883 886 else { 884 emit(newMessage(_staID + ": Data Timeout, reconnecting" ));887 emit(newMessage(_staID + ": Data Timeout, reconnecting", true)); 885 888 tryReconnect(); 886 889 } 887 890 } 888 891 catch (const char* msg) { 889 emit(newMessage(_staID + msg ));892 emit(newMessage(_staID + msg, true)); 890 893 tryReconnect(); 891 894 } … … 931 934 _begDateOut = _decodeTime.toUTC().date().toString("yy-MM-dd"); 932 935 _begTimeOut = _decodeTime.toUTC().time().toString("hh:mm:ss"); 933 emit(newMessage((_staID + ": Failure threshold exceeded, outage since " + _begDateOut + " " + _begTimeOut).toAscii())); 936 emit(newMessage((_staID + ": Failure threshold exceeded, outage since " 937 + _begDateOut + " " + _begTimeOut).toAscii(), true)); 934 938 callScript(("Begin_Outage " + _begDateOut + " " + _begTimeOut).toAscii()); 935 939 } … … 978 982 } 979 983 980 emit(newMessage(msg.toAscii() ));984 emit(newMessage(msg.toAscii(), false)); 981 985 #endif 982 986 } -
trunk/BNC/bncgetthread.h
r1271 r1299 63 63 void newAntCrd(QByteArray staID, double xx, double yy, double zz, QByteArray antType); 64 64 void error(QByteArray staID); 65 void newMessage(QByteArray msg );65 void newMessage(QByteArray msg, bool showOnScreen); 66 66 67 67 public slots: -
trunk/BNC/bncmain.cpp
r1282 r1299 180 180 app.connect(caster, SIGNAL(getThreadErrors()), &app, SLOT(quit())); 181 181 182 ((bncApp*)qApp)->slotMessage("============ Start BNC ============" );182 ((bncApp*)qApp)->slotMessage("============ Start BNC ============", true); 183 183 184 184 // Normal case - data from Internet -
trunk/BNC/bncwindow.cpp
r1292 r1299 66 66 setWindowTitle(tr("BKG Ntrip Client (BNC) Version 1.7")); 67 67 68 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray )),69 this, SLOT(slotWindowMessage(QByteArray )));68 connect((bncApp*)qApp, SIGNAL(newMessage(QByteArray,bool)), 69 this, SLOT(slotWindowMessage(QByteArray,bool))); 70 70 71 71 // Create Actions … … 681 681 //////////////////////////////////////////////////////////////////////////// 682 682 void bncWindow::slotGetThreadErrors() { 683 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated" );683 ((bncApp*)qApp)->slotMessage("All Get Threads Terminated", true); 684 684 if (!_actStop->isEnabled()) { 685 685 _actGetData->setEnabled(true); … … 708 708 this, SLOT(slotMountPointsRead(QList<bncGetThread*>))); 709 709 710 ((bncApp*)qApp)->slotMessage("============ Start BNC ============" );710 ((bncApp*)qApp)->slotMessage("============ Start BNC ============", true); 711 711 712 712 _caster->slotReadMountPoints(); … … 758 758 // Display Program Messages 759 759 //////////////////////////////////////////////////////////////////////////// 760 void bncWindow::slotWindowMessage(const QByteArray msg ) {760 void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) { 761 761 762 762 #ifdef DEBUG_RTCM2_2021 … … 765 765 const int maxBufferSize = 10000; 766 766 #endif 767 768 if (! showOnScreen ) { 769 return; 770 } 767 771 768 772 QString txt = _log->toPlainText() + "\n" + -
trunk/BNC/bncwindow.h
r1222 r1299 61 61 62 62 private slots: 63 void slotWindowMessage(const QByteArray msg );63 void slotWindowMessage(const QByteArray msg, bool showOnScreen); 64 64 void slotHelp(); 65 65 void slotAbout();
Note:
See TracChangeset
for help on using the changeset viewer.