Changeset 1387 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Dec 29, 2008, 10:27:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 ////_rnx_set_position = true;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
Note:
See TracChangeset
for help on using the changeset viewer.