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


Ignore:
Timestamp:
Feb 26, 2007, 6:15:18 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r406 r408  
    5151#include "bncapp.h"
    5252#include "bncutils.h"
     53#include "bncrinex.h"
    5354
    5455#include "RTCM/RTCM2Decoder.h"
     
    100101    _staID = _staID.left(_staID.length()-1) + QString("%1").arg(num).toAscii();
    101102  }   
     103
     104  // RINEX writer
     105  // ------------
     106  _samplingRate = settings.value("rnxSampl").toInt();
     107  if ( settings.value("rnxPath").toString().isEmpty() ) {
     108    _rnx = 0;
     109  }
     110  else {
     111    _rnx = new bncRinex(_staID, mountPoint, format, latitude, longitude, nmea);
     112  }
     113
    102114  msleep(100); //sleep 0.1 sec
    103115}
     
    382394          emit newObs(_staID, *it);
    383395          bool firstObs = (it == _decoder->_obsList.begin());
    384           _global_caster->newObs(_staID, _mountPoint, firstObs, *it, _format, _latitude, _longitude, _nmea);
     396          _global_caster->newObs(_staID, firstObs, *it);
     397
     398          // RINEX Output
     399          // ------------
     400          if (_rnx) {
     401             long iSec    = long(floor((*it)->GPSWeeks+0.5));
     402             long newTime = (*it)->GPSWeek * 7*24*3600 + iSec;
     403            if (_samplingRate == 0 || iSec % _samplingRate == 0) {
     404              _rnx->deepCopy(*it);
     405            }
     406            _rnx->dumpEpoch(newTime);
     407          }
     408
    385409        }
    386410        _decoder->_obsList.clear();
     
    411435////////////////////////////////////////////////////////////////////////////
    412436void bncGetThread::tryReconnect() {
    413   _global_caster->reconnecting(_staID);
     437  if (_rnx) {
     438    _rnx->setReconnectFlag(true);
     439  }
    414440  while (1) {
    415441    delete _socket; _socket = 0;
Note: See TracChangeset for help on using the changeset viewer.