Changeset 1218 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Nov 19, 2008, 2:56:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r1201 r1218 41 41 #include <stdlib.h> 42 42 #include <iomanip> 43 #include <sstream> 43 44 44 45 #include <QFile> … … 543 544 544 545 if (_inspSegm<1) { 545 _decoder->Decode(data, nBytes); 546 vector<string> errmsg; 547 _decoder->Decode(data, nBytes, errmsg); 548 #ifdef DEBUG_RTCM2_2021 549 for (unsigned ii = 0; ii < errmsg.size(); ii++) { 550 emit newMessage(_staID + ": " + errmsg[ii].c_str()); 551 } 552 #endif 546 553 } 547 554 else { … … 553 560 554 561 if (decode) { 555 if ( _decoder->Decode(data, nBytes) == success ) { 562 vector<string> errmsg; 563 if ( _decoder->Decode(data, nBytes, errmsg) == success ) { 556 564 numSucc += 1; 557 565 } … … 559 567 decode = false; 560 568 } 569 #ifdef DEBUG_RTCM2_2021 570 for (unsigned ii = 0; ii < errmsg.size(); ii++) { 571 emit newMessage(_staID + ": " + errmsg[ii].c_str()); 572 } 573 #endif 561 574 } 562 575 … … 737 750 bool dump = true; 738 751 739 /*// RTCMv2 XYZ740 // ----------741 RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder);742 if ( decoder2 && !_rnx_set_position ) {752 // RTCMv2 XYZ 753 // ---------- 754 RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder); 755 if ( decoder2 && !_rnx_set_position ) { 743 756 double stax, stay, staz; 744 757 double dL1[3], dL2[3]; … … 746 759 dL1[0], dL1[1], dL1[2], 747 760 dL2[0], dL2[1], dL2[2]) == success ) { 748 QByteArray msg; 749 QTextStream out(&msg);750 out.setRealNumberNotation(QTextStream::FixedNotation);751 out.setRealNumberPrecision(5);752 //// _rnx->setApproxPos(stax, stay, staz);753 out << "STA " << staID()754 << ' ' << qSetFieldWidth(15) << stax755 << ' ' << qSetFieldWidth(15) << stay756 << ' ' << qSetFieldWidth(15) << staz757 << " L1 " << qSetFieldWidth(10) << dL1[0]758 << ' ' << qSetFieldWidth(10) << dL1[1]759 << ' ' << qSetFieldWidth(10) << dL1[2]760 << " L2 " << qSetFieldWidth(10) << dL2[0]761 << ' ' << qSetFieldWidth(10) << dL2[1]762 << ' ' << qSetFieldWidth(10) << dL2[2] << endl;761 762 ostringstream msg2; msg2.setf(ios::fixed); 763 msg2 << "station coordinates " << staID().data() 764 << ' ' << setw(14) << setprecision(5) << stax 765 << ' ' << setw(14) << setprecision(5) << stay 766 << ' ' << setw(14) << setprecision(5) << staz 767 << " L1 " 768 << ' ' << setw(8) << setprecision(5) << dL1[0] 769 << ' ' << setw(8) << setprecision(5) << dL1[1] 770 << ' ' << setw(8) << setprecision(5) << dL1[2] 771 << " L2 " 772 << ' ' << setw(8) << setprecision(5) << dL2[0] 773 << ' ' << setw(8) << setprecision(5) << dL2[1] 774 << ' ' << setw(8) << setprecision(5) << dL2[2] 775 << ends; 763 776 _rnx_set_position = true; 764 emit newMessage( msg);777 emit newMessage(QByteArray(msg2.str().c_str())); 765 778 } 766 } */ 767 768 ////RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder); 769 ////if ( decoder2 && !_rnx_set_position ) { 770 //// double stax, stay, staz; 771 //// if ( decoder2->getStaCrd(stax, stay, staz) == success ) { 772 //// _rnx->setApproxPos(stax, stay, staz); 773 //// _rnx_set_position = true; 774 //// } 775 //// else { 776 //// dump = false; 777 //// } 778 ////} 779 779 } 780 780 781 if ( dump ) { 781 782 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); … … 942 943 QMutexLocker locker(&_mutex); 943 944 944 decoder->storeEph(gpseph); 945 } 946 } 947 945 string storedPRN; 946 vector<int> IODs; 947 948 if ( decoder->storeEph(gpseph, storedPRN, IODs) ) { 949 #ifdef DEBUG_RTCM2_2021 950 QString msg = _staID + QString(": stored eph %1 IODs").arg(storedPRN.c_str()); 951 952 for (unsigned ii = 0; ii < IODs.size(); ii++) { 953 msg += QString(" %1").arg(IODs[ii],4); 954 } 955 956 emit(newMessage(msg.toAscii())); 957 #endif 958 } 959 } 960 } 961
Note:
See TracChangeset
for help on using the changeset viewer.