Changeset 1029 in ntrip for trunk/BNC/bncgetthread.cpp


Ignore:
Timestamp:
Aug 8, 2008, 8:02:33 PM (16 years ago)
Author:
mervart
Message:

Back to status of date 20080807

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r1024 r1029  
    140140    _rnx = new bncRinex(_staID, mountPoint, format, latitude, longitude, nmea);
    141141  }
    142   _rnx_set_position = false;
    143142
    144143  msleep(100); //sleep 0.1 sec
     
    157156  }
    158157  delete _decoder;
    159   delete _rnx;
     158  delete _rnx;   
    160159}
    161160
     
    366365    if      (_format.indexOf("RTCM_2") != -1) {
    367366      emit(newMessage("Get Data: " + _staID + " in RTCM 2.x format"));
    368       _decoder = new RTCM2Decoder(_staID.data());
     367      _decoder = new RTCM2Decoder();
    369368    }
    370369    else if (_format.indexOf("RTCM_3") != -1) {
     
    558557
    559558        delete [] data;
    560 
     559       
    561560        QListIterator<p_obs> it(_decoder->_obsList);
    562561        while (it.hasNext()) {
     
    646645          // ------------
    647646          if (_rnx) {
    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           // ---------------------------
     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
    674655          bool firstObs = (obs == _decoder->_obsList.first());
    675656          obs->_status = t_obs::posted;
     
    755736  }
    756737}
    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.