Changeset 11220 in ntrip for trunk


Ignore:
Timestamp:
Nov 23, 2026, 10:25:45 PM (7 hours ago)
Author:
stuerze
Message:

combination improved

Location:
trunk/BNC
Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/CHANGELOG.md

    r11218 r11220  
    33- CHANGED: **Upload Ephemeris vote: no replacement of an uploaded data set for receiver-dependent fields.** Once a data set is uploaded, a copy differing only in fields which differ legitimately between receivers (URA/URAI/SISA, GPS/QZSS L2 code, L2 P and fit flags, GLONASS Cn/A/P/P1/P3/FT/NA/N4, BDS AODE/AODC) no longer replaces it; receivers keep the first copy anyway, so these replacements only changed the uploaded content back and forth. Before the upload the majority still decides on all fields. Replay 20 Nov 2026 (8 h, 96 input streams): 447 instead of 751 replacements, GPS 43 instead of 329 (up to 8 per data set before, L2code/fit), all 46 health corrections (Bn, ln) unchanged
    44- ADDED: **SSR QC: IOD switch delay.** Per stream and system the number of switches of the orbit corrections to a new data set and the delay of the first correction after the reception of the data set by BNC (min / 10 % / median / max), for BDS also after the TOC (full-hour issue); switches back to an older data set are listed per satellite. Shows e.g. Analysis Centers using a new IOD earlier than 60 s after its broadcast (CAS01 BDS, Nov 2026, found by hand before)
    5 - FIXED: **SSR QC: corrections with an epoch time far from their reception moved the report interval.** A GLONASS epoch of SSRA01SHA1/SSRC01GFZ1 encoded 11758 s ahead (22 Nov 2026 00:10, "differs by 11758 s ... erroneously encoded?") moved the interval to 03:00: no reports for 01 and 02 h, the 03 h report covered 00:10-04:00 with latency maxima of ~650 s, which looked like a caster outage. Corrections more than 900 s from their reception are no longer used and counted per stream in the report
     5- FIXED: **SSR QC: corrections with an epoch time far from their reception moved the report interval.** A GLONASS epoch of SSRA01SHA1/SSRC01GFZ1 encoded 11758 s ahead (22 Nov 2026 00:10, "differs by 11758 s ... erroneously encoded?") moved the interval to 03:00: no reports for 01 and 02 h, the 03 h report covered 00:10-04:00 with latency maxima of ~650 s, which looked like a caster outage. Corrections more than 900 s from their reception are no longer used and counted per stream in the report (code and phase biases only for a future epoch: Galileo HAS biases keep their reference time, hours before reception; new test ssr_qc_has)
     6- FIXED: **Combination: bogus correction epochs.** A clock epoch hours ahead (the same SSRA00SHA1 GLONASS epoch) marked the AC as having delivered all epochs up to then, so that the combination no longer waited for it (its later clocks could be dropped as 'old correction'), and future orbits or biases replaced the stored ones. Clocks are now checked against the current time (60 s) before they count as delivered, orbits more than 900 s and biases more than 900 s in the future are not stored; also in raw file replay (900 s). Logged at most once per hour and AC
    67- ADDED: **SSR QC: common outages of the input.** Periods in which at least 75 % (and 3) of the streams have a gap at the same time (caster or network outage) are listed once in each report and no longer counted as gaps of the single streams; the latencies during and up to 120 s after them are left out. New test case ssr_qc_outage
    78- FIXED: **Combination (Kalman filter): jumps of the clock level of a system when a satellite is missing in one epoch.** The sum of the combined clocks was fixed to zero over the satellites of each epoch; a satellite not combined in an epoch (master AC without its correction, e.g. its correction referred to an ephemeris not yet received at the hourly BDS ephemeris change) shifted all other clocks of the system by its clock divided by the number of satellites and back at the next epoch. IGS03 20-23 Nov 2026: BDS jumps of 0.7-1.4 m in 22 of 57 hours, mostly at hh:01, once -4.9 m (15 satellites missing). Now the sum over the satellites also combined in the previous epoch keeps its value (previous clocks converted to the current ephemeris), relaxing to zero with a time constant of 1 h; after a gap > 60 s it is zero. Clocks relative to each other and orbits unchanged; replay 21 Nov 18:30-22:00: no common jumps, levels G/R/E within 0.15 m of before. New test case combi_bds_level, tool tests/tools/clkjumps.py
  • trunk/BNC/src/bnchelp.html

    r11218 r11220  
    53515351    Corrections with an epoch time more than 900 seconds from their reception, e.g. an erroneously encoded GLONASS
    53525352    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).
    53545356  </p>
    53555357  <p>
    … …  
    86398641    sum relaxes to zero with a time constant of one hour, so that a permanent change of the combined satellites shifts
    86408642    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').
    86418651  </p>
    86428652  <p>
  • trunk/BNC/src/combination/bnccomb.cpp

    r11218 r11220  
    4747const double CLK_LEVEL_TAU    = 3600.0; // [s] relaxation of the sum to zero
    4848const 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
     53const double MAX_EPOCH_OFFSET     = 900.0; // [s]
     54const double CLK_MAX_EPOCH_OFFSET =  60.0; // [s]
    4955
    5056using namespace std;
    … …  
    471477      continue;
    472478    }
     479    if (epochOutOfRange(acName, orbCorr._time, MAX_EPOCH_OFFSET, "orbit")) {
     480      continue;
     481    }
    473482
    474483    // Store the correction; the latest orbit of the previous IOD is kept as
    … …  
    514523      continue;
    515524    }
     525    if (epochOutOfRange(acName, satCodeBias._time, MAX_EPOCH_OFFSET, "code bias", true)) {
     526      continue;
     527    }
    516528
    517529    // Store the correction
    … …  
    553565      continue;
    554566    }
     567    if (epochOutOfRange(acName, satPhaseBias._time, MAX_EPOCH_OFFSET, "phase bias", true)) {
     568      continue;
     569    }
    555570
    556571    // Store the correction
    … …  
    562577}
    563578
     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////////////////////////////////////////////////////////////////////////////
     588bool 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}
    564623
    565624// True if every AC has delivered clock corrections for epoTime or a later
    … …  
    598657    }
    599658
     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
    600677    // Remember the latest correction epoch of each AC (whether or not the
    601678    // correction is used), to know when an AC has finished an epoch
    602679    // --------------------------------------------------------------------
    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;
    613683    }
    614684
    … …  
    649719      }
    650720      continue;
    651     }
    652 
    653     // Check regarding current time
    654     // ----------------------------
    655     if (BNC_CORE->mode() != t_bncCore::batchPostProcessing) {
    656       if (fabs(currentTime - newClk._time) > 60.0) { // future or very old data sets
    657   #ifdef BNC_DEBUG_CMB
    658         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   #endif
    662         continue;
    663       }
    664721    }
    665722
  • trunk/BNC/src/combination/bnccomb.h

    r11218 r11220  
    257257  QMap<QString, bncTime>                     _acLastClkTime; // latest correction epoch per AC
    258258  QMap<QString, bncTime>                     _refBiasWarned; // last warning per AC and system
     259  QMap<QString, bncTime>                     _badEpochWarned; // last bad-epoch warning per AC (current time)
    259260  QMap<char, bncTime>                        _singleACWarned; // last 'fewer than 2 ACs' message per system
    260261  QMap<QString, QMap<QString, double> >      _acBiasIF;       // latest B_IF of the reference signals per AC and satellite
    … …  
    312313                   const QVector<t_datumObs>& datumObs, const ColumnVector& xx);
    313314  bool allACsDelivered(const bncTime& epoTime) const;
     315  bool epochOutOfRange(const QString& acName, const bncTime& epoTime, double maxOffset, const char* type,
     316                       bool pastOk = false);
    314317  bncTime                                    _resTime;
    315318  cmbCorr*                                   _newCorr;
  • trunk/BNC/src/ssrQc.cpp

    r11218 r11220  
    508508// the report interval (no reports for hours) and distort all statistics
    509509////////////////////////////////////////////////////////////////////////////
    510 bool t_ssrQc::badEpoch(const string& staID, const bncTime& time) {
    511   if (fabs(currentTime() - time) <= MAX_EPOCH_OFFSET) {
     510bool 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)) {
    512513    return false;
    513514  }
    … …  
    585586  QMutexLocker locker(&_mutex);
    586587  for (const t_satCodeBias& bias : codeBiases) {
    587     if (badEpoch(bias._staID, bias._time)) continue;
     588    if (badEpoch(bias._staID, bias._time, true)) continue;
    588589    bool sel = selected(bias._staID);
    589590    if (_excluded.contains(QString::fromStdString(bias._staID)) && bias._staID != _reference.toStdString()) continue;
    … …  
    635636  QMutexLocker locker(&_mutex);
    636637  for (const t_satPhaseBias& bias : phaseBiases) {
    637     if (badEpoch(bias._staID, bias._time)) continue;
     638    if (badEpoch(bias._staID, bias._time, true)) continue;
    638639    QString staID = QString::fromStdString(bias._staID);
    639640    QString prn   = QString::fromStdString(bias._prn.toString());
  • trunk/BNC/src/ssrQc.h

    r11218 r11220  
    114114  // Corrections with an epoch time far from the reception time (erroneously
    115115  // 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);
    117118  QMap<QString, unsigned> _badEpochs;
    118119
  • trunk/BNC/tests/README.md

    r11218 r11220  
    173173  epoch 11758 s ahead; its 159 corrections are not used (counted in the report), the 5 min reports
    174174  continue normally.
     175* `ssr_qc_has`: `data/merged_260930_11min.raw` with 31_SsrQC (SSRA00EUH0 Galileo HAS and
     176  SSRA00CNE1): the HAS code biases keep their reference time 12876 s before reception and are
     177  still evaluated (bias epochs are only rejected more than 900 s in the future).
    175178* `ssr_qc_glo_ln`: GLONASS health flag ln on `data/glo_ln_261015_1h.raw` (BCEP00BKG0 GLONASS
    176179  ephemerides 09:40-10:40 and SSRA00GMV0 GLONASS corrections 09:55-10:40 of 15 Oct 2026, merged
Note: See TracChangeset for help on using the changeset viewer.