- Timestamp:
- Feb 19, 2010, 3:55:19 PM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnccaster.cpp
r2310 r2311 49 49 #include "RTCM/GPSDecoder.h" 50 50 51 static const int MAXRATE = 20; // Hz52 53 51 // Constructor 54 52 //////////////////////////////////////////////////////////////////////////// … … 161 159 obs->_status = t_obs::received; 162 160 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; 165 163 166 164 // Rename the Station … … 213 211 !settings.value("outPort").toString().isEmpty() ) { 214 212 215 QTime enomtime = QTime(0,0,0).addMSecs(iSecXrate/ MAXRATE/1000);213 QTime enomtime = QTime(0,0,0).addMSecs(iSecXrate/_maxRate/1000); 216 214 217 215 emit( newMessage(QString("%1: Old epoch %2 (%3) thrown away") 218 .arg(staID.data()).arg(iSecXrate/ MAXRATE)216 .arg(staID.data()).arg(iSecXrate/_maxRate) 219 217 .arg(enomtime.toString("HH:mm:ss")) 220 218 .toAscii(), true) ); … … 417 415 // Reread several options 418 416 // ---------------------- 417 _maxRate = settings.value("maxRate").toInt(); 418 if (_maxRate < 1) { 419 _maxRate = 1; 420 } 419 421 _samplingRate = settings.value("binSampl").toInt(); 420 _waitTimeXrate = settings.value("waitTime").toInt() * MAXRATE;422 _waitTimeXrate = settings.value("waitTime").toInt() * _maxRate; 421 423 if (_waitTimeXrate < 1) { 422 424 _waitTimeXrate = 1; -
trunk/BNC/bnccaster.h
r2310 r2311 80 80 QMutex _mutex; 81 81 int _confInterval; 82 int _maxRate; 82 83 }; 83 84
Note:
See TracChangeset
for help on using the changeset viewer.