Ignore:
Timestamp:
Oct 19, 2026, 10:30:14 AM (5 hours ago)
Author:
stuerze
Message:

Combination: further improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.cpp

    r11098 r11099  
    3434
    3535const double sig0_offACSat = 1000.0;
    36 const double sigP_offACSat =   0.01;
     36const double sigP_offACSat =   0.01; // per REF_SAMPL_offACSat, scaled with the time between the epochs
     37const double REF_SAMPL_offACSat = 10.0; // [s]
    3738
    3839const double sig0_clkSat   =  100.0;
    … …  
    11831184  // Prediction Step
    11841185  // ---------------
     1186  // The random walk of the AC satellite offsets is defined per time, not per
     1187  // epoch (sigP_offACSat per REF_SAMPL_offACSat seconds), so that the result
     1188  // does not depend on the combination sampling interval
     1189  double dt = _lastFilterEpoch[sys].valid() ? epoTime - _lastFilterEpoch[sys] : double(_cmbSampl);
     1190  if (dt <= 0.0) {
     1191    dt = double(_cmbSampl);
     1192  }
     1193  _lastFilterEpoch[sys] = epoTime;
    11851194  int nPar = _params[sys].size();
    11861195  ColumnVector x0(nPar);
    … …  
    11941203    }
    11951204    else {
    1196       _QQ[sys](iPar,iPar) += pp->sigP * pp->sigP;
     1205      double fac = (pp->type == cmbParam::offACSat) ? dt / REF_SAMPL_offACSat : 1.0;
     1206      _QQ[sys](iPar,iPar) += pp->sigP * pp->sigP * fac;
    11971207    }
    11981208    x0(iPar) = pp->xx;
    … …  
    13491359    double slope     = (sxx > 0.0) ? sxy / sxx : 0.0;
    13501360    double corrCoeff = (sxx > 0.0 && syy > 0.0) ? sxy / sqrt(sxx * syy) : 0.0;
     1361    // Hysteresis: a flagged AC is used for the clock datum again only after
     1362    // REINCLUDE_CHECKS passing checks in a row (1 hour). Right after the
     1363    // exclusion the offsets are reset and not yet converged, so a single
     1364    // passing check does not prove consistency; a borderline AC would
     1365    // otherwise change the clock datum every few minutes.
     1366    const int REINCLUDE_CHECKS = 12;
    13511367    if (spread < MIN_SPREAD || slope < MIN_SLOPE || corrCoeff < MIN_CORR) {
     1368      if (_biasInconsistent.contains(key) && ++_biasConsistentChecks[key] < REINCLUDE_CHECKS) {
     1369        continue;
     1370      }
     1371      _biasConsistentChecks.remove(key);
    13521372      if (_biasInconsistent.remove(key)) {
    13531373        QString msg = QString("%1 %2 code biases consistent with its clocks again, "
    … …  
    13721392                  .arg(acName).arg(sys).arg(refSig).arg(nn)
    13731393                  .arg(spread, 0, 'f', 3).arg(slope, 0, 'f', 2).arg(corrCoeff, 0, 'f', 2);
     1394    _biasConsistentChecks[key] = 0;
    13741395    if (!_biasInconsistent.contains(key)) {
    13751396      _biasInconsistent.insert(key);
Note: See TracChangeset for help on using the changeset viewer.