Changeset 3515 in ntrip for trunk


Ignore:
Timestamp:
Dec 13, 2011, 2:55:00 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r3509 r3515  
    126126  _isToBeDeleted = false;
    127127  _decoder       = 0;
     128  _decoderAux    = 0;
    128129  _query         = 0;
    129130  _nextSleep     = 0;
     
    345346  delete _PPPclient;
    346347  delete _decoder;
     348  delete _decoderAux;
    347349  delete _rnx;
    348350  delete _rawFile;
     
    382384      // -----------------------
    383385      _decoder->_obsList.clear();
     386      if (_decoderAux) {
     387        _decoderAux->_obsList.clear();
     388      }
     389
     390      GPSDecoder* decoderUsed = _decoder;
    384391
    385392      // Read Data
     
    391398      else if (_rawFile) {
    392399        data = _rawFile->readChunk();
     400        if (_rawFile->format() == "HASS2ASCII") {
     401          if (_decoderAux == 0) {
     402            emit(newMessage(_staID + ": Get data in HASS format", true));
     403            _decoderAux = new hassDecoder(_staID);
     404          }
     405          decoderUsed = _decoderAux;
     406        }
    393407
    394408        if (data.isEmpty()) {
     
    428442      // -----------
    429443      vector<string> errmsg;
    430       _decoder->_obsList.clear();
    431       t_irc irc = _decoder->Decode(data.data(), data.size(), errmsg);
     444      decoderUsed->_obsList.clear();
     445      t_irc irc = decoderUsed->Decode(data.data(), data.size(), errmsg);
    432446
    433447      // Perform various scans and checks
    434448      // --------------------------------
    435449      _latencyChecker->checkOutage(irc == success);
    436       _latencyChecker->checkObsLatency(_decoder->_obsList);
    437       _latencyChecker->checkCorrLatency(_decoder->corrGPSEpochTime());
     450      _latencyChecker->checkObsLatency(decoderUsed->_obsList);
     451      _latencyChecker->checkCorrLatency(decoderUsed->corrGPSEpochTime());
    438452
    439453      emit newLatency(_staID, _latencyChecker->currentLatency());
     
    443457      // Loop over all observations (observations output)
    444458      // ------------------------------------------------
    445       QListIterator<t_obs> it(_decoder->_obsList);
     459      QListIterator<t_obs> it(decoderUsed->_obsList);
    446460      bool firstObs = true;
    447461      while (it.hasNext()) {
     
    455469        // Check observation epoch
    456470        // -----------------------
    457         if (!_rawFile && !dynamic_cast<gpssDecoder*>(_decoder)) {
     471        if (!_rawFile && !dynamic_cast<gpssDecoder*>(decoderUsed)) {
    458472          int    week;
    459473          double sec;
     
    509523        firstObs = false;
    510524      }
    511       _decoder->_obsList.clear();
     525      decoderUsed->_obsList.clear();
    512526    }
    513527    catch (Exception& exc) {
  • trunk/BNC/bncgetthread.h

    r3510 r3515  
    106106
    107107   GPSDecoder*     _decoder;
     108   GPSDecoder*     _decoderAux;
    108109   bncNetQuery*    _query;
    109110   QUrl            _mountPoint;
Note: See TracChangeset for help on using the changeset viewer.