Changeset 8271 in ntrip for trunk/BNC/src/latencychecker.cpp
- Timestamp:
- Feb 5, 2018, 11:04:58 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/latencychecker.cpp
r8204 r8271 321 321 322 322 if (_miscIntr > 0 ) { 323 t_latency& l = _lObs; l._type = "Observations"; 323 t_latency& l = _lObs; 324 l._type = "Observations"; 324 325 QListIterator<t_satObs> it(obsList); 325 326 while (it.hasNext()) { … … 393 394 } 394 395 l._numLat += 1; 395 l._oldSec = l._newSec;396 396 l._followSec = true; 397 397 } 398 l._oldSec = l._newSec; 398 399 } 399 400 _lObs = l; … … 406 407 void latencyChecker::checkCorrLatency(int corrGPSEpochTime, int type) { 407 408 if (corrGPSEpochTime < 0) { 408 return ; 409 } 409 return; 410 } 411 410 412 t_latency& l = _lOrb; // init 411 413 switch (type) { … … 440 442 if (_miscIntr > 0) { 441 443 l._newSec = corrGPSEpochTime; 442 int week;443 double sec;444 currentGPSWeeks(week, sec);445 double dt = fabs(sec - l._newSec);446 const double secPerWeek = 7.0 * 24.0 * 3600.0;447 if (dt > 0.5 * secPerWeek) {448 if (sec > l._newSec) {449 sec -= secPerWeek;450 } else {451 sec += secPerWeek;452 }453 }454 444 if (l._newSec > l._oldSec) { 455 445 if (int(l._newSec) % _miscIntr < int(l._oldSec) % _miscIntr) { … … 485 475 l.init(); 486 476 } 487 488 477 if (l._followSec) { 489 478 l._diffSec += l._newSec - l._oldSec; … … 494 483 } 495 484 } 485 486 // Compute the observations latency 487 // -------------------------------- 488 int week; 489 double sec; 490 currentGPSWeeks(week, sec); 491 double dt = fabs(sec - l._newSec); 492 const double secPerWeek = 7.0 * 24.0 * 3600.0; 493 if (dt > 0.5 * secPerWeek) { 494 if (sec > l._newSec) { 495 sec -= secPerWeek; 496 } else { 497 sec += secPerWeek; 498 } 499 } 496 500 l._curLat = sec - l._newSec; 497 501 l._sumLat += l._curLat; … … 504 508 } 505 509 l._numLat += 1; 506 l._oldSec = l._newSec;507 510 l._followSec = true; 508 511 setCurrentLatency(l._curLat); 509 512 } 510 switch (type) { 511 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258: 512 _lOrb = l; 513 break; 514 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259: 515 _lClk = l; 516 break; 517 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261: 518 _lClkOrb = l; 519 break; 520 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260: 521 _lCb = l; 522 break; 523 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270: 524 _lPb = l; 525 break; 526 case 1264: 527 _lVtec = l; 528 break; 529 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262: 530 _lUra = l; 531 break; 532 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263: 533 _lHr = l; 534 break; 535 } 536 } 513 l._oldSec = l._newSec; 514 } 515 516 switch (type) { 517 case 1057: case 1063: case 1240: case 1246: case 1252: case 1258: 518 _lOrb = l; 519 break; 520 case 1058: case 1064: case 1241: case 1247: case 1253: case 1259: 521 _lClk = l; 522 break; 523 case 1060: case 1066: case 1243: case 1249: case 1255: case 1261: 524 _lClkOrb = l; 525 break; 526 case 1059: case 1065: case 1242: case 1248: case 1254: case 1260: 527 _lCb = l; 528 break; 529 case 1265: case 1266: case 1267: case 1268: case 1269: case 1270: 530 _lPb = l; 531 break; 532 case 1264: 533 _lVtec = l; 534 break; 535 case 1061: case 1067: case 1244: case 1250: case 1256: case 1262: 536 _lUra = l; 537 break; 538 case 1062: case 1068: case 1245: case 1251: case 1257: case 1263: 539 _lHr = l; 540 break; 541 } 537 542 } 538 543
Note:
See TracChangeset
for help on using the changeset viewer.