Changeset 2311 in ntrip


Ignore:
Timestamp:
Feb 19, 2010, 3:55:19 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r2310 r2311  
    4949#include "RTCM/GPSDecoder.h"
    5050
    51 static const int MAXRATE = 20; // Hz
    52 
    5351// Constructor
    5452////////////////////////////////////////////////////////////////////////////
     
    161159  obs->_status = t_obs::received;
    162160
    163   long iSecXrate    = long(floor(obs->_o.GPSWeeks * MAXRATE + 0.5));
    164   long newTimeXrate = obs->_o.GPSWeek * 7*24*3600 * MAXRATE + iSecXrate;
     161  long iSecXrate    = long(floor(obs->_o.GPSWeeks * _maxRate + 0.5));
     162  long newTimeXrate = obs->_o.GPSWeek * 7*24*3600 * _maxRate + iSecXrate;
    165163
    166164  // Rename the Station
     
    213211           !settings.value("outPort").toString().isEmpty() ) {
    214212
    215         QTime enomtime = QTime(0,0,0).addMSecs(iSecXrate/MAXRATE/1000);
     213        QTime enomtime = QTime(0,0,0).addMSecs(iSecXrate/_maxRate/1000);
    216214
    217215        emit( newMessage(QString("%1: Old epoch %2 (%3) thrown away")
    218                          .arg(staID.data()).arg(iSecXrate/MAXRATE)
     216                         .arg(staID.data()).arg(iSecXrate/_maxRate)
    219217                         .arg(enomtime.toString("HH:mm:ss"))
    220218                         .toAscii(), true) );
     
    417415  // Reread several options
    418416  // ----------------------
     417  _maxRate = settings.value("maxRate").toInt();
     418  if (_maxRate < 1) {
     419    _maxRate = 1;
     420  }
    419421  _samplingRate  = settings.value("binSampl").toInt();
    420   _waitTimeXrate = settings.value("waitTime").toInt() * MAXRATE;
     422  _waitTimeXrate = settings.value("waitTime").toInt() * _maxRate;
    421423  if (_waitTimeXrate < 1) {
    422424    _waitTimeXrate = 1;
  • trunk/BNC/bnccaster.h

    r2310 r2311  
    8080   QMutex                  _mutex;
    8181   int                     _confInterval;
     82   int                     _maxRate;
    8283};
    8384
Note: See TracChangeset for help on using the changeset viewer.