Changeset 1387 in ntrip
- Timestamp:
- Dec 29, 2008, 10:27:05 AM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/bncgetthread.cpp ¶
r1377 r1387 54 54 #include "bncrinex.h" 55 55 #include "bnczerodecoder.h" 56 #include "bncnetquery.h" 56 #include "bncnetqueryv1.h" 57 #include "bncnetqueryv2.h" 57 58 58 59 #include "RTCM/RTCM2Decoder.h" … … 188 189 else { 189 190 _rnx = new bncRinex(_staID, _mountPoint, _format, _latitude, 190 _longitude, _nmea , _ntripVersion);191 _longitude, _nmea); 191 192 } 192 193 _rnx_set_position = false; 193 194 194 195 connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)), 195 196 this, SLOT(slotNewEphGPS(gpsephemeris))); 196 197 197 198 if (settings.value("serialMountPoint").toString() == _staID) { … … 304 305 if (!_rawInpFile) { 305 306 delete _query; 306 _query = new bncNetQuery(); 307 _query->startRequest(_mountPoint); 307 if (_ntripVersion == "2") { 308 _query = new bncNetQueryV2(); 309 } 310 else { 311 _query = new bncNetQueryV1(); 312 } 313 if (_nmea == "yes") { 314 QByteArray gga = ggaString(_latitude, _longitude); 315 _query->startRequest(_mountPoint, gga); 316 } 317 else { 318 _query->startRequest(_mountPoint, ""); 319 } 308 320 } 309 321 … … 554 566 } 555 567 556 557 568 // RTCM scan output 569 // ---------------- 558 570 if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 559 571 QSettings settings; … … 589 601 ant3 = QString("%1 ").arg(_decoder->_antList[ii].zz,0,'f',4).toAscii(); 590 602 switch (_decoder->_antList[ii].type) { 591 592 593 603 case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break; 604 case GPSDecoder::t_antInfo::APC: antT = "APC"; break; 605 } 594 606 emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true)); 595 607 emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true)); 596 608 emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m", true)); 597 598 599 600 601 602 603 609 if (_decoder->_antList[ii].height_f) { 610 QByteArray ant4 = QString("%1 ").arg(_decoder->_antList[ii].height,0,'f',4).toAscii(); 611 emit(newMessage(_staID + ": Antenna height above marker " + ant4 + "m", true)); 612 } 613 emit(newAntCrd(_staID, 614 _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 615 antT)); 604 616 } 605 617 } 606 618 } 607 619 if ( _checkMountPoint == "ANTCRD_ONLY" && _decoder->_antList.size() ) { 608 609 610 611 612 613 614 615 616 617 620 for (int ii=0;ii<_decoder->_antList.size();++ii) { 621 QByteArray antT; 622 switch (_decoder->_antList[ii].type) { 623 case GPSDecoder::t_antInfo::ARP: antT = "ARP"; break; 624 case GPSDecoder::t_antInfo::APC: antT = "APC"; break; 625 } 626 emit(newAntCrd(_staID, 627 _decoder->_antList[ii].xx, _decoder->_antList[ii].yy, _decoder->_antList[ii].zz, 628 antT)); 629 } 618 630 } 619 631 } 620 632 621 633 _decoder->_typeList.clear(); 622 634 _decoder->_antType.clear(); 623 635 _decoder->_antList.clear(); 624 636 625 626 637 // Loop over all observations (observations output) 638 // ------------------------------------------------ 627 639 QListIterator<p_obs> it(_decoder->_obsList); 628 640 while (it.hasNext()) { … … 720 732 // ------------ 721 733 if (_rnx) { 722 734 bool dump = true; 723 735 724 736 //// // RTCMv2 XYZ … … 726 738 //// RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder); 727 739 //// if ( decoder2 && !_rnx_set_position ) { 728 729 730 740 //// double stax, stay, staz; 741 //// double dL1[3], dL2[3]; 742 //// if ( decoder2->getStaCrd(stax, stay, staz, 731 743 //// dL1[0], dL1[1], dL1[2], 732 744 //// dL2[0], dL2[1], dL2[2]) == success ) { 733 745 //// 734 746 //// if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) { 735 747 //// QString ant1; … … 753 765 //// emit(newMessage(_staID + ": L2 APC DZ " + ant1.toAscii() + "m" )); 754 766 //// } 755 767 //// _rnx_set_position = true; 756 768 //// } 757 769 //// } 758 770 759 760 761 762 763 764 765 771 if ( dump ) { 772 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); 773 long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec; 774 if (_samplingRate == 0 || iSec % _samplingRate == 0) { 775 _rnx->deepCopy(obs); 776 } 777 _rnx->dumpEpoch(newTime); 766 778 } 767 779 } 768 780 769 770 781 // Emit new observation signal 782 // --------------------------- 771 783 bool firstObs = (obs == _decoder->_obsList.first()); 772 784 obs->_status = t_obs::posted; … … 881 893 } 882 894 } 883 -
TabularUnified trunk/BNC/bncnetquery.h ¶
r1383 r1387 16 16 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool))); 17 17 } 18 virtual ~bncNetQuery(); 18 virtual ~bncNetQuery() {}; 19 19 20 20 virtual void waitForRequestResult(const QUrl& url, QByteArray& outData) = 0; -
TabularUnified trunk/BNC/bncrinex.cpp ¶
r1386 r1387 63 63 bncRinex::bncRinex(const QByteArray& statID, const QUrl& mountPoint, 64 64 const QByteArray& format, const QByteArray& latitude, 65 const QByteArray& longitude, const QByteArray& nmea ,66 const QByteArray& ntripVersion) { 65 const QByteArray& longitude, const QByteArray& nmea) { 66 67 67 _statID = statID; 68 68 _mountPoint = mountPoint; … … 71 71 _longitude = longitude; 72 72 _nmea = nmea; 73 _ntripVersion = ntripVersion;74 73 _headerWritten = false; 75 74 _reconnectFlag = false; -
TabularUnified trunk/BNC/bncrinex.h ¶
r1353 r1387 40 40 bncRinex(const QByteArray& statID, const QUrl& mountPoint, 41 41 const QByteArray& format, const QByteArray& latitude, 42 const QByteArray& longitude, const QByteArray& nmea, 43 const QByteArray& ntripVersion); 42 const QByteArray& longitude, const QByteArray& nmea); 44 43 ~bncRinex(); 45 44 void deepCopy(const p_obs obs); … … 82 81 QByteArray _longitude; 83 82 QByteArray _nmea; 84 QByteArray _ntripVersion;85 83 bool _reconnectFlag; 86 84 QDate _skeletonDate; -
TabularUnified trunk/BNC/bnctabledlg.cpp ¶
r1378 r1387 43 43 #include "bnctabledlg.h" 44 44 #include "bncgetthread.h" 45 #include "bncnetquery.h" 45 #include "bncnetqueryv2.h" 46 46 47 47 using namespace std; … … 171 171 url.setPath("/"); 172 172 173 bncNetQuery query; 173 bncNetQueryV2 query; 174 174 QByteArray outData; 175 175 query.waitForRequestResult(url, outData); -
TabularUnified trunk/BNC/bncutils.cpp ¶
r1384 r1387 129 129 // 130 130 //////////////////////////////////////////////////////////////////////////// 131 Q StringggaString(const QByteArray& latitude, const QByteArray& longitude) {131 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude) { 132 132 133 133 double lat = strtod(latitude,NULL); … … 166 166 gga += QString("*%1").arg(XOR, 2, 16, QLatin1Char('0')); 167 167 168 return gga; 168 return gga.toAscii(); 169 169 } -
TabularUnified trunk/BNC/bncutils.h ¶
r1381 r1387 37 37 QDateTime currentDateAndTimeGPS(); 38 38 39 Q StringggaString(const QByteArray& latitude, const QByteArray& longitude);39 QByteArray ggaString(const QByteArray& latitude, const QByteArray& longitude); 40 40 41 41 #endif
Note:
See TracChangeset
for help on using the changeset viewer.