Changeset 1024 in ntrip for trunk/BNC/bncgetthread.cpp
- Timestamp:
- Aug 7, 2008, 4:01:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r1022 r1024 140 140 _rnx = new bncRinex(_staID, mountPoint, format, latitude, longitude, nmea); 141 141 } 142 _rnx_set_position = false; 142 143 143 144 msleep(100); //sleep 0.1 sec … … 156 157 } 157 158 delete _decoder; 158 delete _rnx; 159 delete _rnx; 159 160 } 160 161 … … 365 366 if (_format.indexOf("RTCM_2") != -1) { 366 367 emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format")); 367 _decoder = new RTCM2Decoder( );368 _decoder = new RTCM2Decoder(_staID.data()); 368 369 } 369 370 else if (_format.indexOf("RTCM_3") != -1) { … … 557 558 558 559 delete [] data; 559 560 560 561 QListIterator<p_obs> it(_decoder->_obsList); 561 562 while (it.hasNext()) { … … 645 646 // ------------ 646 647 if (_rnx) { 647 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); 648 long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec; 649 if (_samplingRate == 0 || iSec % _samplingRate == 0) { 650 _rnx->deepCopy(obs); 651 } 652 _rnx->dumpEpoch(newTime); 653 } 654 648 bool dump = true; 649 650 RTCM2Decoder* decoder2 = dynamic_cast<RTCM2Decoder*>(_decoder); 651 if ( decoder2 && !_rnx_set_position ) { 652 double stax, stay, staz; 653 if ( decoder2->getStaCrd(stax, stay, staz) == success ) { 654 _rnx->setApproxPos(stax, stay, staz); 655 _rnx_set_position = true; 656 } 657 else { 658 dump = false; 659 } 660 } 661 662 if ( dump ) { 663 long iSec = long(floor(obs->_o.GPSWeeks+0.5)); 664 long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec; 665 if (_samplingRate == 0 || iSec % _samplingRate == 0) { 666 _rnx->deepCopy(obs); 667 } 668 _rnx->dumpEpoch(newTime); 669 } 670 } 671 672 // Emit new observation signal 673 // --------------------------- 655 674 bool firstObs = (obs == _decoder->_obsList.first()); 656 675 obs->_status = t_obs::posted; … … 736 755 } 737 756 } 757 758 // 759 ////////////////////////////////////////////////////////////////////////////// 760 void bncGetThread::slotNewEphGPS(gpsephemeris gpseph) { 761 RTCM2Decoder* decoder = dynamic_cast<RTCM2Decoder*>(_decoder); 762 763 if ( decoder ) { 764 QMutexLocker locker(&_mutex); 765 766 decoder->storeEph(gpseph); 767 } 768 } 769
Note:
See TracChangeset
for help on using the changeset viewer.