Changeset 1566 in ntrip
- Timestamp:
- Feb 4, 2009, 9:19:20 AM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/GPSDecoder.h
r1562 r1566 136 136 } 137 137 138 virtual QList<int>* epochList() {return 0;}139 140 138 struct t_antInfo { 141 139 enum t_type { ARP, APC }; -
trunk/BNC/RTCM3/RTCM3Decoder.h
r1562 r1566 41 41 virtual ~RTCM3Decoder(); 42 42 virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg); 43 virtual QList<int>* epochList(){44 return (_coDecoder ? &(_coDecoder->_epochList) : 0);43 int corrGPSEpochTime() const { 44 return (_coDecoder ? _coDecoder->GPSEpochTime() : -1); 45 45 } 46 46 signals: -
trunk/BNC/RTCM3/RTCM3coDecoder.cpp
r1535 r1566 142 142 double GPSweeks; 143 143 currentGPSWeeks(GPSweek, GPSweeks); 144 145 for (int kk = 0; kk < _co.epochSize; kk++) {146 _epochList.push_back(_co.epochGPS[kk]); /* Weber, for latency */147 }148 149 144 if (_co.NumberOfGPSSat > 0) { 150 145 if (GPSweeks > _co.GPSEpochTime + 86400.0) { -
trunk/BNC/RTCM3/RTCM3coDecoder.h
r1562 r1566 43 43 virtual ~RTCM3coDecoder(); 44 44 virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg); 45 virtual QList<int>* epochList() {return &_epochList;} 46 QList<int> _epochList; 45 int GPSEpochTime() const {return _co.GPSEpochTime;} 47 46 48 47 signals: -
trunk/BNC/RTCM3/clock_orbit_rtcm.c
r1305 r1566 3 3 Name: clock_orbit_rtcm.c 4 4 Project: RTCM3 5 Version: $Id: clock_orbit_rtcm.c,v 1. 4.2.3 2008/12/19 09:29:13mervart Exp $5 Version: $Id: clock_orbit_rtcm.c,v 1.5 2008/12/19 10:16:59 mervart Exp $ 6 6 Authors: Dirk Stöcker 7 7 Description: state space approach for RTCM3 … … 502 502 if(!co) return GCOBR_NOCLOCKORBITPARAMETER; 503 503 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat) 504 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */505 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */506 504 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 507 505 G_RESERVED6 … … 530 528 if(!co) return GCOBR_NOCLOCKORBITPARAMETER; 531 529 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat) 532 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */533 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */534 530 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 535 531 G_RESERVED6 … … 550 546 if(!co) return -5; 551 547 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat) 552 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */553 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */554 548 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 555 549 G_RESERVED6 -
trunk/BNC/RTCM3/clock_orbit_rtcm.h
r1035 r1566 6 6 Name: clock_orbit_rtcm.h 7 7 Project: RTCM3 8 Version: $Id: clock_orbit_rtcm.h,v 1. 2 2008/05/06 15:07:41 mervartExp $8 Version: $Id: clock_orbit_rtcm.h,v 1.3 2008/08/15 16:29:19 weber Exp $ 9 9 Authors: Dirk Stöcker 10 10 Description: state space approach for RTCM3 … … 52 52 int ClockDataSupplied; /* boolean */ 53 53 int OrbitDataSupplied; /* boolean */ 54 int epochGPS[101]; /* Weber, for latency */55 int epochSize; /* Weber, for latency */56 54 enum SatelliteReferencePoint SatRefPoint; 57 55 enum SatelliteReferenceDatum SatRefDatum; -
trunk/BNC/bncgetthread.cpp
r1562 r1566 377 377 _latencyChecker->checkOutage(irc == success); 378 378 _latencyChecker->checkObsLatency(_decoder->_obsList); 379 _latencyChecker->checkCorrLatency(_decoder->epochList()); 379 RTCM3Decoder* rtcm3decoder = dynamic_cast<RTCM3Decoder*>(_decoder); 380 if (rtcm3decoder) { 381 _latencyChecker->checkCorrLatency(rtcm3decoder->corrGPSEpochTime()); 382 } 380 383 scanRTCM(); 381 384 -
trunk/BNC/latencychecker.cpp
r1564 r1566 338 338 // Perform latency checks (corrections) 339 339 ////////////////////////////////////////////////////////////////////////////// 340 void latencyChecker::checkCorrLatency( QList<int>* epochList) {341 342 if ( epochList ==0) {340 void latencyChecker::checkCorrLatency(int corrGPSEpochTime) { 341 342 if (corrGPSEpochTime < 0) { 343 343 return; 344 344 } … … 347 347 if (_perfIntr > 0) { 348 348 349 QListIterator<int> it(*epochList); 350 while (it.hasNext()) { 351 _newSecGPS = it.next(); 352 353 int week; 354 double sec; 355 currentGPSWeeks(week, sec); 356 double dt = fabs(sec - _newSecGPS); 357 const double secPerWeek = 7.0 * 24.0 * 3600.0; 358 if (dt > 0.5 * secPerWeek) { 359 if (sec > _newSecGPS) { 360 sec -= secPerWeek; 361 } else { 362 sec += secPerWeek; 363 } 364 } 365 if (_newSecGPS != _oldSecGPS) { 366 if (int(_newSecGPS) % _perfIntr < int(_oldSecGPS) % _perfIntr) { 367 if (_numLat>0) { 368 QString late; 369 if (_meanDiff>0.) { 370 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs, %6 gaps") 371 .arg(int(_sumLat/_numLat*100)/100.) 372 .arg(int(_minLat*100)/100.) 373 .arg(int(_maxLat*100)/100.) 374 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 375 .arg(_numLat) 376 .arg(_numGaps); 377 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 378 } 379 else { 380 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs") 381 .arg(int(_sumLat/_numLat*100)/100.) 382 .arg(int(_minLat*100)/100.) 383 .arg(int(_maxLat*100)/100.) 384 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 385 .arg(_numLat); 386 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 387 } 349 _newSecGPS = corrGPSEpochTime; 350 351 int week; 352 double sec; 353 currentGPSWeeks(week, sec); 354 double dt = fabs(sec - _newSecGPS); 355 const double secPerWeek = 7.0 * 24.0 * 3600.0; 356 if (dt > 0.5 * secPerWeek) { 357 if (sec > _newSecGPS) { 358 sec -= secPerWeek; 359 } else { 360 sec += secPerWeek; 361 } 362 } 363 if (_newSecGPS != _oldSecGPS) { 364 if (int(_newSecGPS) % _perfIntr < int(_oldSecGPS) % _perfIntr) { 365 if (_numLat>0) { 366 QString late; 367 if (_meanDiff>0.) { 368 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs, %6 gaps") 369 .arg(int(_sumLat/_numLat*100)/100.) 370 .arg(int(_minLat*100)/100.) 371 .arg(int(_maxLat*100)/100.) 372 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 373 .arg(_numLat) 374 .arg(_numGaps); 375 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 376 } 377 else { 378 late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs") 379 .arg(int(_sumLat/_numLat*100)/100.) 380 .arg(int(_minLat*100)/100.) 381 .arg(int(_maxLat*100)/100.) 382 .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.) 383 .arg(_numLat); 384 emit(newMessage(QString(_staID + late ).toAscii(), true) ); 388 385 } 389 _meanDiff = int(_diffSecGPS)/_numLat;390 _diffSecGPS = 0;391 _numGaps= 0;392 _sumLat = 0.0;393 _sumLatQ= 0.0;394 _numLat =0;395 _minLat = 1000.;396 _maxLat = -1000.;397 }398 if (_followSec) {399 _diffSecGPS += _newSecGPS - _oldSecGPS;400 if (_meanDiff>0.) {401 if (_newSecGPS - _oldSecGPS > 1.5 * _meanDiff) {402 _numGaps += 1;403 }386 } 387 _meanDiff = int(_diffSecGPS)/_numLat; 388 _diffSecGPS = 0; 389 _numGaps = 0; 390 _sumLat = 0.0; 391 _sumLatQ = 0.0; 392 _numLat = 0; 393 _minLat = 1000.; 394 _maxLat = -1000.; 395 } 396 if (_followSec) { 397 _diffSecGPS += _newSecGPS - _oldSecGPS; 398 if (_meanDiff>0.) { 399 if (_newSecGPS - _oldSecGPS > 1.5 * _meanDiff) { 400 _numGaps += 1; 404 401 } 405 402 } 406 _curLat = sec - _newSecGPS; 407 _sumLat += _curLat; 408 _sumLatQ += _curLat * _curLat; 409 if (_curLat < _minLat) { 410 _minLat = _curLat; 411 } 412 if (_curLat >= _maxLat) { 413 _maxLat = _curLat; 414 } 415 _numLat += 1; 416 _oldSecGPS = _newSecGPS; 417 _followSec = true; 418 } 419 } 420 } 421 } 422 423 epochList->clear(); 403 } 404 _curLat = sec - _newSecGPS; 405 _sumLat += _curLat; 406 _sumLatQ += _curLat * _curLat; 407 if (_curLat < _minLat) { 408 _minLat = _curLat; 409 } 410 if (_curLat >= _maxLat) { 411 _maxLat = _curLat; 412 } 413 _numLat += 1; 414 _oldSecGPS = _newSecGPS; 415 _followSec = true; 416 } 417 } 418 } 424 419 } 425 420 -
trunk/BNC/latencychecker.h
r1562 r1566 38 38 void checkOutage(bool decoded); 39 39 void checkObsLatency(const QList<p_obs>& obsList); 40 void checkCorrLatency( QList<int>* epochList);40 void checkCorrLatency(int corrGPSEpochTime); 41 41 42 42 signals:
Note:
See TracChangeset
for help on using the changeset viewer.