Changeset 4428 in ntrip for trunk/BNC/src
- Timestamp:
- Jul 22, 2012, 5:48:30 PM (12 years ago)
- Location:
- trunk/BNC/src/RTCM3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r3428 r4428 48 48 #include "bncsettings.h" 49 49 #include "rtcm3torinex.h" 50 #include "bnctime.h" 50 51 51 52 using namespace std; … … 73 74 connect(this, SIGNAL(newCorrLine(QString, QString, long)), 74 75 (bncApp*) qApp, SLOT(slotNewCorrLine(QString, QString, long))); 76 77 connect(this, SIGNAL(newMessage(QByteArray,bool)), 78 (bncApp*) qApp, SLOT(slotMessage(const QByteArray,bool))); 75 79 76 80 memset(&_co, 0, sizeof(_co)); … … 217 221 _co, &_bias); 218 222 219 long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));220 221 223 QStringListIterator it(asciiLines); 222 224 while (it.hasNext()) { 223 225 QString line = it.next(); 224 printLine(line, coTime);226 printLine(line, GPSweek, _GPSweeks); 225 227 } 226 228 … … 240 242 // 241 243 //////////////////////////////////////////////////////////////////////////// 242 void RTCM3coDecoder::printLine(const QString& line, long coTime) { 244 void RTCM3coDecoder::printLine(const QString& line, int GPSweek, 245 double GPSweeks) { 243 246 if (_out) { 244 247 *_out << line.toAscii().data() << endl; … … 246 249 } 247 250 248 emit newCorrLine(line, _staID, coTime); 251 int currWeek; 252 double currSec; 253 currentGPSWeeks(currWeek, currSec); 254 bncTime currTime(currWeek, currSec); 255 256 bncTime corrTime(GPSweek, GPSweeks); 257 258 double dt = currTime - corrTime; 259 const double MAXDT = 10 * 60.0; 260 if (fabs(dt) > MAXDT) { 261 emit newMessage("suspicious correction", false); 262 } 263 else { 264 long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5)); 265 emit newCorrLine(line, _staID, coTime); 266 } 249 267 } 250 268 -
trunk/BNC/src/RTCM3/RTCM3coDecoder.h
r3578 r4428 51 51 signals: 52 52 void newCorrLine(QString line, QString staID, long coTime); 53 void newMessage(QByteArray msg, bool showOnScreen); 53 54 54 55 private: 55 void printLine(const QString& line, long coTime);56 void printLine(const QString& line, int GPSweek, double GPSweeks); 56 57 std::ofstream* _out; 57 58 QString _staID;
Note:
See TracChangeset
for help on using the changeset viewer.