Changeset 11214 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Nov 18, 2026, 8:21:50 PM (12 days ago)
Author:
stuerze
Message:

SSR QC improved

Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnchelp.html

    r11212 r11214  
    53865386</pre>
    53875387      The latest code biases of each stream are used,</li>
     5388    <li>the code biases of an APC stream (SSRA...) compared with those of the CoM stream of the same solution and
     5389      format (SSRC..., e.g. SSRA00GMV0 and SSRC00GMV0), if both are decoded, for IGS-SSR and old RTCM-SSR only (new
     5390      RTCM-SSR carries its own satellite antenna model, the reference point is left to the provider). For an APC
     5391      reference, the user reduces
     5392      the satellite PCOs of all frequencies by the PCO of the reference frequency (IGS SSR v1.00, section 'Satellite
     5393      Reference Point'), so the code biases of both streams have to be equal (differences up to 0.02 m tolerated).
     5394      Otherwise the RMS and the maximum difference (with satellite and signal) are reported, and with a 'QC ANTEX
     5395      File' the differences are compared with the PCO differences z(f) - z(ref) of the file: if they match, the APC
     5396      stream carries the frequency-dependent PCO differences in its code biases, which a user following the
     5397      convention applies twice (ionosphere-free combination of the reference signal biases z(IF) - z(ref) instead
     5398      of zero, e.g. 0.78 m for GPS IIIA), e.g.
     5399      <pre>
     5400  G code biases differ from those of the CoM stream SSRC00GMV0: RMS 0.227 m, max -0.510 m (G28 C2P) (32 satellites, 237 biases)
     5401  G code bias differences APC - CoM equal the satellite PCO differences z(f) - z(ref) of the ANTEX file (RMS of the residuals 0.002 m, 226 biases): frequency-dependent PCOs in the biases of the APC stream, applied twice by users reducing the PCOs by the PCO of the reference frequency (IGS SSR convention)
     5402  R code biases equal to those of the CoM stream SSRC00GMV0 (21 satellites, 63 biases)
     5403</pre></li>
    53885404    <li>the phase bias signals provided,</li>
    53895405    <li>the phase bias indicators: the SSR format, for IGS-SSR and old RTCM-SSR the dispersive bias consistency
  • trunk/BNC/src/ssrQc.cpp

    r11212 r11214  
    259259           << " completeness w.r.t. healthy broadcast ephemerides," << endl
    260260           << "IOD matching, code and phase bias signals, phase bias indicators, Melbourne-Wuebbena consistency"
    261            << " with the other ACs, yaw angle, code biases of the reference signals, clock jumps > "
     261           << " with the other ACs, yaw angle, code biases of the reference signals,"
     262           << " code biases of APC and CoM streams, clock jumps > "
    262263           << MAX_CLK_JUMP << " m, largest orbit corrections, VTEC models (system V)" << endl
    263264           << "Reference signals of the clocks: " << t_ssrRefSig::currentString().toStdString() << endl;
    … …  
    457458      storeHist(&corr, 0);
    458459    }
     460    _orbFormat[QString::fromStdString(corr._staID)] = corr._ssrFormat;
    459461    if (!selected(corr._staID)) continue;
    460462    QString prn = QString::fromStdString(corr._prn.toString());
    … …  
    979981      }
    980982      deviating(compare(1, QString()), QString("the median of the other ACs (at least %1 solutions)").arg(MIN_VOTE));
     983    }
     984  }
     985}
     986
     987// Code biases of an APC stream compared with the CoM stream of the same
     988// solution and format (SSRA00GMV0 / SSRC00GMV0), IGS-SSR and old RTCM-SSR
     989// only (new RTCM-SSR carries its own satellite antenna model, and the
     990// reference point is left to the provider). Following the IGS SSR
     991// convention, users of an APC stream reduce the satellite PCOs of all
     992// frequencies by the PCO of the reference frequency themselves, so the code
     993// biases of both streams have to be equal. Differences equal to
     994// z(f) - z(ref) of the ANTEX file show frequency-dependent PCO differences in
     995// the biases of the APC stream, which such users apply twice (ionosphere-free
     996// combination of the reference signal biases z(IF) - z(ref) instead of 0).
     997////////////////////////////////////////////////////////////////////////////
     998void t_ssrQc::compareApcComBiases(const QString& staID, char sys, const bncTime& tt, QStringList& lines) {
     999  const double MAX_DIFF = 0.02;  // [m] equal biases (resolution 0.01 m, slightly different epochs)
     1000  if (!staID.startsWith("SSRA")) {
     1001    return;
     1002  }
     1003  const QString comID = "SSRC" + staID.mid(4);
     1004  if (!_cbLast.contains(staID) || !_cbLast.contains(comID)) {
     1005    return;
     1006  }
     1007  // format of the latest orbit corrections (IGS-SSR: ssrUnknown)
     1008  if (_orbFormat.value(staID, ssrUnknown) == ssrRtcmNew || _orbFormat.value(comID, ssrUnknown) == ssrRtcmNew) {
     1009    return;
     1010  }
     1011  // reference frequency of the APC (IGS SSR v1.00, table 2)
     1012  t_frequency::type refFrq;
     1013  switch (sys) {
     1014    case 'G': refFrq = t_frequency::G1; break;
     1015    case 'R': refFrq = t_frequency::R1; break;
     1016    case 'E': refFrq = t_frequency::E1; break;
     1017    case 'C': refFrq = t_frequency::C2; break;
     1018    case 'J': refFrq = t_frequency::J1; break;
     1019    case 'S': refFrq = t_frequency::S1; break;
     1020    case 'I': refFrq = t_frequency::I5; break;
     1021    default: return;
     1022  }
     1023  QSet<QString> sats;
     1024  unsigned numBias = 0, numPco = 0;
     1025  double   sumSqr = 0.0, sumSqrRes = 0.0, maxDiff = 0.0;
     1026  QString  maxStr;
     1027  const QMap<QString, QMap<QString, double> >& apc = _cbLast[staID];
     1028  const QMap<QString, QMap<QString, double> >& com = _cbLast[comID];
     1029  for (auto itP = apc.constBegin(); itP != apc.constEnd(); ++itP) {
     1030    const QString& prn = itP.key();
     1031    if (prn[0].toLatin1() != sys || !com.contains(prn)) {
     1032      continue;
     1033    }
     1034    const QMap<QString, double>& bc = com[prn];
     1035    for (auto itS = itP.value().constBegin(); itS != itP.value().constEnd(); ++itS) {
     1036      const QString& sig = itS.key();
     1037      if (!bc.contains(sig) || sig.isEmpty()) {
     1038        continue;
     1039      }
     1040      double diff = itS.value() - bc[sig];
     1041      sats.insert(prn);
     1042      numBias++;
     1043      sumSqr += diff * diff;
     1044      if (fabs(diff) > fabs(maxDiff)) {
     1045        maxDiff = diff;
     1046        maxStr  = QString("%1 C%2").arg(prn).arg(sig);
     1047      }
     1048      if (_antex) {
     1049        // satCorr() at nadir 0 (PCV pattern at zenith 0 of the satellite) gives -z(f)
     1050        bool foundF = false, foundR = false;
     1051        double corrF = _antex->satCorr(prn, t_frequency::toFreq(sys, sig[0].toLatin1()), M_PI / 2.0, 0.0, foundF, tt);
     1052        double corrR = _antex->satCorr(prn, refFrq, M_PI / 2.0, 0.0, foundR, tt);
     1053        if (foundF && foundR) {
     1054          double res = diff - (corrR - corrF);   // expected z(f) - z(ref)
     1055          sumSqrRes += res * res;
     1056          numPco++;
     1057        }
     1058      }
     1059    }
     1060  }
     1061  if (numBias == 0) {
     1062    return;
     1063  }
     1064  double rms = sqrt(sumSqr / numBias);
     1065  if (fabs(maxDiff) <= MAX_DIFF) {
     1066    lines << QString("code biases equal to those of the CoM stream %1 (%2 satellites, %3 biases)")
     1067             .arg(comID).arg(sats.size()).arg(numBias);
     1068    return;
     1069  }
     1070  lines << QString("code biases differ from those of the CoM stream %1: RMS %2 m, max %3 m (%4) "
     1071                   "(%5 satellites, %6 biases)")
     1072           .arg(comID).arg(rms, 0, 'f', 3).arg(maxDiff, 0, 'f', 3).arg(maxStr).arg(sats.size()).arg(numBias);
     1073  if (numPco > 0) {
     1074    double rmsRes = sqrt(sumSqrRes / numPco);
     1075    if (rmsRes < MAX_DIFF || rmsRes < 0.2 * rms) {
     1076      lines << QString("code bias differences APC - CoM equal the satellite PCO differences z(f) - z(ref) of the "
     1077                       "ANTEX file (RMS of the residuals %1 m, %2 biases): frequency-dependent PCOs in the biases "
     1078                       "of the APC stream, applied twice by users reducing the PCOs by the PCO of the reference "
     1079                       "frequency (IGS SSR convention)").arg(rmsRes, 0, 'f', 3).arg(numPco);
     1080    }
     1081    else {
     1082      lines << QString("code bias differences APC - CoM not explained by the satellite PCO differences of the "
     1083                       "ANTEX file (RMS of the residuals %1 m, %2 biases)").arg(rmsRes, 0, 'f', 3).arg(numPco);
    9811084    }
    9821085  }
    … …  
    18191922      }
    18201923      compareCodeBiases(staID, sys, lines);
     1924      compareApcComBiases(staID, sys, endTime, lines);
    18211925      if (_phaseSignals.contains(staSys)) {
    18221926        QStringList sigs = _phaseSignals[staSys].values();
  • trunk/BNC/src/ssrQc.h

    r11212 r11214  
    200200                 QMap<QString, double>& dcbs, const QString& onlyAC = QString(),
    201201                 QMap<QString, int>* numVotes = 0);
     202  // Code biases of an APC stream (SSRA...) compared with the CoM stream of the
     203  // same solution and format (SSRC...), and with the ANTEX PCO differences;
     204  // IGS-SSR and old RTCM-SSR only
     205  void   compareApcComBiases(const QString& staID, char sys, const bncTime& tt, QStringList& lines);
     206  QMap<QString, e_ssrFormat> _orbFormat;   // stream: SSR format of the latest orbit corrections
    202207  QMap<QString, QMap<QString, QMap<QString, double> > > _cbLast; // stream, PRN, signal: latest code bias [m]
    203208  bncBiasSnx*               _bsxRef;    // reference code biases (option ssrQcBiasFile)
Note: See TracChangeset for help on using the changeset viewer.