Changeset 11076 in ntrip for trunk/BNC/src/orbComp/sp3Comp.cpp


Ignore:
Timestamp:
Oct 5, 2026, 7:00:19 PM (7 hours ago)
Author:
stuerze
Message:

addded SIS to the SP3 comparison

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/orbComp/sp3Comp.cpp

    r11023 r11076  
    231231        stat[prn.toString()]._offset = xx[index];
    232232        if (dr.find(prn) != dr.end()){
     233          // signal-in-space difference: radial minus clock, only the
     234          // epoch-wise clock offset (datum) removed, i.e. including the
     235          // satellite-specific clock offset
     236          epochs[ie]->_sis[prn] = dr.find(prn)->second[0] - (dc[prn] + xx[index]);
    233237          dcRed[prn] = dc[prn] - dr.find(prn)->second[0]; // clock minus radial component
    234238          stat[prn.toString()]._dcRedMean += dcRed[prn];
    … …  
    368372    out << "!\n! Clock residuals and orbit differences in [m]\n"
    369373           "! ----------------------------------------------------------------------------\n";
    370     out << "!\n!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN"
    371             "\n! ----------------------------------------------------------------------------\n";
     374    out << "!\n!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN      SIS"
     375            "\n! -------------------------------------------------------------------------------------\n";
    372376  }
    373377  for (unsigned ii = 0; ii < epochs.size(); ii++) {
    … …  
    376380    const map<t_prn, double>&       dc = epochs[ii]->_dc;
    377381    const map<t_prn, double>&    dcRed = epochs[ii]->_dcRed;
     382    const map<t_prn, double>&      sis = epochs[ii]->_sis;
    378383    for (map<t_prn, ColumnVector>::const_iterator it = dr.begin(); it != dr.end(); it++) {
    379384      const t_prn&  prn = it->first;
    … …  
    413418        }
    414419        if (!_summaryOnly) {
    415           out << "    " << setw(2) << int(prn) << "\n";
     420          out << "    " << setw(2) << int(prn);
     421        }
     422        if (sis.find(prn) != sis.end()) {
     423          double sisVal = sis.find(prn)->second;
     424          stat[prn.toString()]._sisSum += sisVal;
     425          stat[all.str()     ]._sisSum += sisVal;
     426          stat[prn.toString()]._sisSqr += sisVal * sisVal;
     427          stat[all.str()     ]._sisSqr += sisVal * sisVal;
     428          stat[prn.toString()]._ns     += 1;
     429          stat[all.str()     ]._ns     += 1;
     430          if (!_summaryOnly) {
     431            out << "  " << setw(7) << setprecision(4) << sisVal;
     432          }
     433        }
     434        if (!_summaryOnly) {
     435          out << "\n";
    416436        }
    417437      }
    … …  
    424444  out << "!\n! Summary";
    425445  out << "\n! -----------------------------------------------------------------------------------------------------------------\n";
    426   out << "!\n!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset "
    427           "\n!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]  "
    428           "\n! -----------------------------------------------------------------------------------------------------------------\n";
     446  out << "!\n!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset     SISRMS    SISSig"
     447          "\n!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]       [mm]      [mm]"
     448          "\n! -------------------------------------------------------------------------------------------------------------------------------------\n";
     449  // SIS standard deviation of a system: pooled about the satellite means
     450  map<char, double> sisVarSys;
     451  for (map<string, t_stat>::const_iterator it = stat.begin(); it != stat.end(); it++) {
     452    const t_stat& st = it->second;
     453    stringstream all; all << it->first[0] << 99;
     454    if (it->first != all.str() && st._ns > 0) {
     455      sisVarSys[it->first[0]] += st._sisSqr - st._sisSum * st._sisSum / st._ns;
     456    }
     457  }
    429458  for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) {
    430459    const string& prn  = it->first;
    … …  
    464493          out << setw( 9) << setprecision(2) << stat._offset / t_CST::c * 1e9;
    465494        }
     495        else {
     496          out << setw( 9) << " ";
     497        }
     498      }
     499      if (stat._ns > 0) {
     500        double var = (prn == all.str()) ? sisVarSys[sys] / stat._ns
     501                                        : stat._sisSqr / stat._ns - pow(stat._sisSum / stat._ns, 2);
     502        out << setw(11) << setprecision(1) << sqrt(stat._sisSqr / stat._ns) * 1e3 << ' '
     503            << setw( 9) << setprecision(1) << sqrt(max(0.0, var)) * 1e3;
    466504      }
    467505      out << "\n";
Note: See TracChangeset for help on using the changeset viewer.