Changeset 11220 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 23, 2026, 10:25:45 PM (7 days ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
-
bnchelp.html (modified) (2 diffs)
-
combination/bnccomb.cpp (modified) (7 diffs)
-
combination/bnccomb.h (modified) (2 diffs)
-
ssrQc.cpp (modified) (3 diffs)
-
ssrQc.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnchelp.html
r11218 r11220 5351 5351 Corrections with an epoch time more than 900 seconds from their reception, e.g. an erroneously encoded GLONASS 5352 5352 epoch (see the decoder message 'SSR epoch time ... differs by ... s from the GPS SSR epoch time of the stream'), 5353 are not used and their number is given below the table; they would otherwise move the report interval. 5353 are not used and their number is given below the table; they would otherwise move the report interval. Code and 5354 phase biases are only rejected for a future epoch, as their epoch may legitimately be hours old (Galileo HAS keeps 5355 the reference time of its quasi-static biases). 5354 5356 </p> 5355 5357 <p> … … 8639 8641 sum relaxes to zero with a time constant of one hour, so that a permanent change of the combined satellites shifts 8640 8642 the clocks only slowly. After a gap of more than 60 seconds (and at the start) the sum is set to zero. 8643 </p> 8644 <p> 8645 Clock corrections with an epoch time more than 60 seconds from the current time are not combined. Orbit corrections 8646 and biases more than 900 seconds from the current time are not stored either, e.g. an erroneously encoded GLONASS 8647 epoch hours ahead; it would otherwise mark the AC as having delivered all epochs up to then, so that the 8648 combination would no longer wait for it. Biases are only rejected for a future epoch: their epoch may legitimately 8649 be hours old (Galileo HAS). Such an epoch is reported in the logfile at most once per hour and AC 8650 ('bncComb: SHA00 orbit correction epoch ... is 11116 s from the current time, not used'). 8641 8651 </p> 8642 8652 <p> -
trunk/BNC/src/combination/bnccomb.cpp
r11218 r11220 47 47 const double CLK_LEVEL_TAU = 3600.0; // [s] relaxation of the sum to zero 48 48 const double CLK_LEVEL_MAXGAP = 60.0; // [s] longer gap: sum set to zero again 49 50 // Real-time input: corrections whose epoch differs more than this from the 51 // current time are not used (bogus epochs, e.g. a GLONASS epoch encoded hours 52 // ahead); clocks are limited to CLK_MAX_EPOCH_OFFSET anyway 53 const double MAX_EPOCH_OFFSET = 900.0; // [s] 54 const double CLK_MAX_EPOCH_OFFSET = 60.0; // [s] 49 55 50 56 using namespace std; … … 471 477 continue; 472 478 } 479 if (epochOutOfRange(acName, orbCorr._time, MAX_EPOCH_OFFSET, "orbit")) { 480 continue; 481 } 473 482 474 483 // Store the correction; the latest orbit of the previous IOD is kept as … … 514 523 continue; 515 524 } 525 if (epochOutOfRange(acName, satCodeBias._time, MAX_EPOCH_OFFSET, "code bias", true)) { 526 continue; 527 } 516 528 517 529 // Store the correction … … 553 565 continue; 554 566 } 567 if (epochOutOfRange(acName, satPhaseBias._time, MAX_EPOCH_OFFSET, "phase bias", true)) { 568 continue; 569 } 555 570 556 571 // Store the correction … … 562 577 } 563 578 579 580 // Real-time input: true if the correction epoch differs more than maxOffset 581 // from the current time (not used; replay of a raw file: more than 582 // MAX_EPOCH_OFFSET); pastOk: biases, whose epoch may legitimately be hours 583 // old (Galileo HAS: reference time of quasi-static biases), only future 584 // epochs are rejected; a warning at most once per hour and AC 585 // for offsets beyond MAX_EPOCH_OFFSET (bogus epochs, not just the backlog of 586 // a stream after a (re)connect) 587 //////////////////////////////////////////////////////////////////////////// 588 bool bncComb::epochOutOfRange(const QString& acName, const bncTime& epoTime, 589 double maxOffset, const char* type, bool pastOk) { 590 // replay of a raw file (batch): only bogus epochs, the current time is 591 // that of the replayed chunk 592 if (BNC_CORE->mode() == t_bncCore::batchPostProcessing) { 593 if (!BNC_CORE->dateAndTimeGPSSet()) { 594 return false; 595 } 596 maxOffset = max(maxOffset, MAX_EPOCH_OFFSET); 597 } 598 int currentWeek = 0; 599 double currentSec = 0.0; 600 currentGPSWeeks(currentWeek, currentSec); 601 bncTime currentTime(currentWeek, currentSec); 602 double offset = epoTime - currentTime; 603 if (fabs(offset) <= maxOffset || (pastOk && offset < 0.0)) { 604 return false; 605 } 606 if (fabs(offset) > MAX_EPOCH_OFFSET) { 607 bncTime& warned = _badEpochWarned[acName]; 608 if (!warned.valid() || currentTime - warned >= 3600.0) { 609 warned = currentTime; 610 emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + acName.toLatin1() + " " + type + 611 " correction epoch " + QByteArray(epoTime.datestr().c_str()) + " " + epoTime.timestr().c_str() + 612 QString(" is %1 s from the current time, not used").arg(offset, 0, 'f', 0).toLatin1() + 613 " (further ones of this AC not reported within the next hour)"), true); 614 } 615 } 616 #ifdef BNC_DEBUG_CMB 617 emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: future or very old data sets: " + acName.toLatin1() + " " + type + 618 QString(" %1 ").arg(epoTime.timestr().c_str()).toLatin1() + "vs. current time" + 619 QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1()), true); 620 #endif 621 return true; 622 } 564 623 565 624 // True if every AC has delivered clock corrections for epoTime or a later … … 598 657 } 599 658 659 // Check regarding current time (before the epoch is remembered: a bogus 660 // future epoch would mark the AC as delivered for hours, the combination 661 // would no longer wait for it) 662 // ---------------------------- 663 QString acOfClk; 664 QListIterator<cmbAC*> itClkAC(_ACs); 665 while (itClkAC.hasNext()) { 666 cmbAC* AC = itClkAC.next(); 667 if (AC->mountPoint == QString(newClk._staID.c_str())) { 668 acOfClk = AC->name; 669 break; 670 } 671 } 672 if (acOfClk.isEmpty() || 673 epochOutOfRange(acOfClk, newClk._time, CLK_MAX_EPOCH_OFFSET, "clock")) { // future or very old data sets 674 continue; 675 } 676 600 677 // Remember the latest correction epoch of each AC (whether or not the 601 678 // correction is used), to know when an AC has finished an epoch 602 679 // -------------------------------------------------------------------- 603 QListIterator<cmbAC*> itAC(_ACs); 604 while (itAC.hasNext()) { 605 cmbAC* AC = itAC.next(); 606 if (AC->mountPoint == QString(newClk._staID.c_str())) { 607 bncTime& acLast = _acLastClkTime[AC->name]; 608 if (!acLast.valid() || newClk._time > acLast) { 609 acLast = newClk._time; 610 } 611 break; 612 } 680 bncTime& acLast = _acLastClkTime[acOfClk]; 681 if (!acLast.valid() || newClk._time > acLast) { 682 acLast = newClk._time; 613 683 } 614 684 … … 649 719 } 650 720 continue; 651 }652 653 // Check regarding current time654 // ----------------------------655 if (BNC_CORE->mode() != t_bncCore::batchPostProcessing) {656 if (fabs(currentTime - newClk._time) > 60.0) { // future or very old data sets657 #ifdef BNC_DEBUG_CMB658 emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +659 QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. current time" +660 QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1()), true);661 #endif662 continue;663 }664 721 } 665 722 -
trunk/BNC/src/combination/bnccomb.h
r11218 r11220 257 257 QMap<QString, bncTime> _acLastClkTime; // latest correction epoch per AC 258 258 QMap<QString, bncTime> _refBiasWarned; // last warning per AC and system 259 QMap<QString, bncTime> _badEpochWarned; // last bad-epoch warning per AC (current time) 259 260 QMap<char, bncTime> _singleACWarned; // last 'fewer than 2 ACs' message per system 260 261 QMap<QString, QMap<QString, double> > _acBiasIF; // latest B_IF of the reference signals per AC and satellite … … 312 313 const QVector<t_datumObs>& datumObs, const ColumnVector& xx); 313 314 bool allACsDelivered(const bncTime& epoTime) const; 315 bool epochOutOfRange(const QString& acName, const bncTime& epoTime, double maxOffset, const char* type, 316 bool pastOk = false); 314 317 bncTime _resTime; 315 318 cmbCorr* _newCorr; -
trunk/BNC/src/ssrQc.cpp
r11218 r11220 508 508 // the report interval (no reports for hours) and distort all statistics 509 509 //////////////////////////////////////////////////////////////////////////// 510 bool t_ssrQc::badEpoch(const string& staID, const bncTime& time) { 511 if (fabs(currentTime() - time) <= MAX_EPOCH_OFFSET) { 510 bool t_ssrQc::badEpoch(const string& staID, const bncTime& time, bool pastOk) { 511 double offset = time - currentTime(); 512 if (fabs(offset) <= MAX_EPOCH_OFFSET || (pastOk && offset < 0.0)) { 512 513 return false; 513 514 } … … 585 586 QMutexLocker locker(&_mutex); 586 587 for (const t_satCodeBias& bias : codeBiases) { 587 if (badEpoch(bias._staID, bias._time)) continue; 588 if (badEpoch(bias._staID, bias._time, true)) continue; 588 589 bool sel = selected(bias._staID); 589 590 if (_excluded.contains(QString::fromStdString(bias._staID)) && bias._staID != _reference.toStdString()) continue; … … 635 636 QMutexLocker locker(&_mutex); 636 637 for (const t_satPhaseBias& bias : phaseBiases) { 637 if (badEpoch(bias._staID, bias._time)) continue; 638 if (badEpoch(bias._staID, bias._time, true)) continue; 638 639 QString staID = QString::fromStdString(bias._staID); 639 640 QString prn = QString::fromStdString(bias._prn.toString()); -
trunk/BNC/src/ssrQc.h
r11218 r11220 114 114 // Corrections with an epoch time far from the reception time (erroneously 115 115 // encoded): not used, counted per stream 116 bool badEpoch(const std::string& staID, const bncTime& time); 116 // pastOk: biases, whose epoch may legitimately be old (e.g. Galileo HAS) 117 bool badEpoch(const std::string& staID, const bncTime& time, bool pastOk = false); 117 118 QMap<QString, unsigned> _badEpochs; 118 119
Note:
See TracChangeset
for help on using the changeset viewer.
