Index: trunk/BNC/src/bnchelp.html
===================================================================
--- trunk/BNC/src/bnchelp.html	(revision 11075)
+++ trunk/BNC/src/bnchelp.html	(revision 11076)
@@ -4390,65 +4390,58 @@
 ! ----------------------------------------------------------------------------
 !
-!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN
-! ----------------------------------------------------------------------------
+!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN      SIS
+! -------------------------------------------------------------------------------------
+2022-08-29_08:01:30.000 G01  0.0297 -0.0526 -0.0198    -0.0005 -0.0301     1   0.8412
 ..
-2022-08-29_08:01:30.000 E02 -0.0023  0.1159 -0.0047     0.0187  0.0210    60
-2022-08-29_08:01:30.000 E03 -0.0567 -0.0411  0.0146    -0.0093  0.0474    61
-2022-08-29_08:01:30.000 E04  0.0695 -0.0406  0.0880    -0.0219 -0.0914    62
-2022-08-29_08:01:30.000 E05 -0.1042  0.1161 -0.0503    -0.0101  0.0942    63
-2022-08-29_08:01:30.000 E07  0.0354  0.0384 -0.0346     0.0134 -0.0219    65
-2022-08-29_08:01:30.000 E08 -0.0312  0.0312 -0.0481     0.0130  0.0442    66
-2022-08-29_08:01:30.000 E09 -0.0548  0.1941  0.0263    -0.0113  0.0436    67
-2022-08-29_08:01:30.000 E12  0.0402 -0.0023  0.0012    -0.0051 -0.0454    70
-2022-08-29_08:01:30.000 E13  0.0420 -0.0608 -0.0525    -0.0006 -0.0427    71
-2022-08-29_08:01:30.000 E15  0.0478  0.0348 -0.0353    -0.0122 -0.0600    73
-2022-08-29_08:01:30.000 E21  0.0639  0.0033  0.0292    -0.0167 -0.0806    79
-2022-08-29_08:01:30.000 E24  0.0900 -0.1113 -0.0385     0.0047 -0.0853    82
-2022-08-29_08:01:30.000 E25  0.0106  0.0340 -0.0564     0.0023 -0.0083    83
-2022-08-29_08:01:30.000 E26  0.0598  0.0506 -0.0983    -0.0011 -0.0609    84
-2022-08-29_08:01:30.000 E27  0.0763 -0.0972 -0.0480     0.0041 -0.0722    85
-2022-08-29_08:01:30.000 E30  0.0385  0.0266  0.0028     0.0092 -0.0293    88
-2022-08-29_08:01:30.000 E31  0.1017 -0.1834 -0.0211     0.0021 -0.0997    89
-2022-08-29_08:01:30.000 E33  0.0827  0.0385 -0.0741    -0.0060 -0.0887    91
-2022-08-29_08:01:30.000 E36  0.0099 -0.0769  0.0384     0.0269  0.0170    94
+2022-08-29_08:01:30.000 E02 -0.0023  0.1159 -0.0047     0.0187  0.0210    64   0.0135
+2022-08-29_08:01:30.000 E03 -0.0567 -0.0411  0.0146    -0.0093  0.0474    65  -0.0097
+2022-08-29_08:01:30.000 E04  0.0695 -0.0406  0.0880    -0.0219 -0.0914    66   0.0265
+2022-08-29_08:01:30.000 E05 -0.1042  0.1161 -0.0503    -0.0101  0.0942    67  -0.0869
+2022-08-29_08:01:30.000 E07  0.0354  0.0384 -0.0346     0.0134 -0.0219    69   0.1123
+2022-08-29_08:01:30.000 E08 -0.0312  0.0312 -0.0481     0.0130  0.0442    70   0.0575
+2022-08-29_08:01:30.000 E09 -0.0548  0.1941  0.0263    -0.0113  0.0436    71  -0.0135
+2022-08-29_08:01:30.000 E12  0.0402 -0.0023  0.0012    -0.0051 -0.0454    74   0.1628
+2022-08-29_08:01:30.000 E13  0.0420 -0.0608 -0.0525    -0.0006 -0.0427    75   0.1109
+2022-08-29_08:01:30.000 E15  0.0478  0.0348 -0.0353    -0.0122 -0.0600    77   0.0064
+2022-08-29_08:01:30.000 E21  0.0639  0.0033  0.0292    -0.0167 -0.0806    83   0.1190
+2022-08-29_08:01:30.000 E24  0.0900 -0.1113 -0.0385     0.0047 -0.0853    86  -0.0094
+2022-08-29_08:01:30.000 E25  0.0106  0.0340 -0.0564     0.0023 -0.0083    87  -0.0713
+2022-08-29_08:01:30.000 E26  0.0598  0.0506 -0.0983    -0.0011 -0.0609    88   0.0310
+2022-08-29_08:01:30.000 E27  0.0763 -0.0972 -0.0480     0.0041 -0.0722    89  -0.0293
+2022-08-29_08:01:30.000 E30  0.0385  0.0266  0.0028     0.0092 -0.0293    92  -0.0389
+2022-08-29_08:01:30.000 E31  0.1017 -0.1834 -0.0211     0.0021 -0.0997    93  -0.0114
+2022-08-29_08:01:30.000 E33  0.0827  0.0385 -0.0741    -0.0060 -0.0887    95   0.0877
+2022-08-29_08:01:30.000 E36  0.0099 -0.0769  0.0384     0.0269  0.0170    98   0.0620
 ..
-!
 ! Summary
 ! -----------------------------------------------------------------------------------------------------------------
 !
-!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset
-!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]
-! -----------------------------------------------------------------------------------------------------------------
+!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset     SISRMS    SISSig
+!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]       [mm]      [mm]
+! -------------------------------------------------------------------------------------------------------------------------------------
 ..
-!     E02        7.2      116.0       26.7      119.2     165       0.04       0.05       0.05       165     -0.12
-!     E03       61.0       38.7       15.1       73.8     165       0.03       0.21       0.03       165     -0.13
-!     E04       83.0       61.9       81.9      132.0     165       0.04       0.28       0.02       165      0.22
-!     E05       96.6      119.3       41.8      159.1     165       0.02       0.32       0.01       165     -0.02
-!     E07       29.6       30.9       38.9       57.8     165       0.03       0.10       0.02       165     -0.30
-!     E08       37.1       19.3       42.4       59.5     165       0.03       0.12       0.02       165     -0.34
-!     E09       43.6      174.4       42.2      184.6     165       0.01       0.14       0.01       165     -0.10
-!     E12       49.0        3.3       10.7       50.2     165       0.01       0.16       0.01       165     -0.39
-!     E13       33.6       39.3       66.1       83.9     165       0.02       0.11       0.03       165     -0.23
-!     E15       54.8       27.3       37.5       71.8     165       0.02       0.18       0.01       165      0.18
-!     E21       66.7       11.6       30.1       74.2     165       0.03       0.22       0.02       165     -0.13
-!     E24       91.3      110.1       33.2      146.9     165       0.02       0.30       0.02       165      0.32
-!     E25        9.9       41.2       62.8       75.8     165       0.01       0.03       0.01       165      0.27
-!     E26       62.1       51.6       94.6      124.4     165       0.01       0.21       0.01       165      0.10
-!     E27       73.4       84.1       52.2      123.2     165       0.02       0.24       0.01       165      0.34
-!     E30       38.2       38.0        7.2       54.4     165       0.02       0.13       0.01       165      0.23
-!     E31       93.7      170.0       23.4      195.5     165       0.03       0.31       0.04       165      0.37
-!     E33       92.6       34.0       65.4      118.4     165       0.01       0.31       0.01       165      0.00
-!     E36        5.9       63.0       45.6       78.0     165       0.03       0.02       0.02       165     -0.26
+!     E02        7.2      116.0       26.7      119.2     165       0.04       0.05       0.05       165     -0.12       42.6      14.9
+!     E03       61.0       38.7       15.1       73.8     165       0.03       0.21       0.03       165     -0.13       25.3      10.2
+!     E04       83.0       61.9       81.9      132.0     165       0.04       0.28       0.02       165      0.22       18.4       4.8
+!     E05       96.6      119.3       41.8      159.1     165       0.02       0.32       0.01       165     -0.02       89.2       3.0
+!     E07       29.6       30.9       38.9       57.8     165       0.03       0.10       0.02       165     -0.30      119.6       5.3
+!     E08       37.1       19.3       42.4       59.5     165       0.03       0.12       0.02       165     -0.34       65.0       5.1
+!     E09       43.6      174.4       42.2      184.6     165       0.01       0.14       0.01       165     -0.10       13.7       4.1
+!     E12       49.0        3.3       10.7       50.2     165       0.01       0.16       0.01       165     -0.39      166.2       4.1
+!     E13       33.6       39.3       66.1       83.9     165       0.02       0.11       0.03       165     -0.23      101.7       8.5
+!     E15       54.8       27.3       37.5       71.8     165       0.02       0.18       0.01       165      0.18        3.7       3.6
+!     E21       66.7       11.6       30.1       74.2     165       0.03       0.22       0.02       165     -0.13      105.3       6.9
+!     E24       91.3      110.1       33.2      146.9     165       0.02       0.30       0.02       165      0.32        5.9       4.8
+!     E25        9.9       41.2       62.8       75.8     165       0.01       0.03       0.01       165      0.27       70.1       3.0
+!     E26       62.1       51.6       94.6      124.4     165       0.01       0.21       0.01       165      0.10       32.3       3.9
+!     E27       73.4       84.1       52.2      123.2     165       0.02       0.24       0.01       165      0.34       28.3       2.6
+!     E30       38.2       38.0        7.2       54.4     165       0.02       0.13       0.01       165      0.23       30.4       4.5
+!     E31       93.7      170.0       23.4      195.5     165       0.03       0.31       0.04       165      0.37       21.1      11.9
+!     E33       92.6       34.0       65.4      118.4     165       0.01       0.31       0.01       165      0.00       91.6       4.4
+!     E36        5.9       63.0       45.6       78.0     165       0.03       0.02       0.02       165     -0.26       83.4       6.0
 ..
-!
-! Mean
-! -----------------------------------------------------------------------------------------------------------------
-!
-!    GNSS   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk
-!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]
-! -----------------------------------------------------------------------------------------------------------------
-!       E       61.4       81.5       48.6      113.1    3135       0.02       0.21       0.18      3135
-!       G       37.6       60.0       40.9       81.8    4620       0.02       0.13       0.13      4620
-!       R       71.0      127.0      114.0      184.8    2640       0.04       0.24       0.24      2640
+!       E       61.4       81.5       48.6      113.1    3135       0.02       0.21       0.18      3135                 73.3       6.7
+!       G       37.6       60.0       40.9       81.8    4620       0.02       0.13       0.13      4620                816.9       5.5
+!       R       71.0      127.0      114.0      184.8    2640       0.04       0.24       0.24      2640                820.2      15.0
 </p>
 </pre>
@@ -4490,4 +4483,11 @@
       <td>BNC internal sequence number</td>
     </tr>
+    <tr>
+      <td>'SIS' &nbsp;</td>
+      <td>Signal-in-space difference: radial component of the orbit coordinate difference minus clock difference
+        [m]. Unlike 'clk' and 'clkRed', only the epoch-wise clock offset common to all satellites of a system (clock
+        datum) is removed, not the satellite-specific clock offset ('Offset'). It is the part of the orbit and clock
+        differences affecting the user's range.</td>
+    </tr>
   </table>
   <p>
@@ -4538,5 +4538,16 @@
     <tr>
       <td>'Offset' &nbsp;</td>
-      <td>Clock offset [ns]</td>
+      <td>Satellite-specific clock offset, constant over the comparison period [ns]</td>
+    </tr>
+    <tr>
+      <td>'SISRMS' &nbsp;</td>
+      <td>RMS of the signal-in-space differences 'SIS', including the constant satellite-specific part [mm]</td>
+    </tr>
+    <tr>
+      <td>'SISSig' &nbsp;</td>
+      <td>Standard deviation of the signal-in-space differences about the mean of the satellite [mm]; for a system
+        (lines 'G', 'R', ...) pooled over its satellites. A large 'SISRMS' with a small 'SISSig' indicates constant
+        differences per satellite, as typical between products of different ACs (different realizations of the
+        satellite clocks and code biases).</td>
     </tr>
   </table>
Index: trunk/BNC/src/orbComp/sp3Comp.cpp
===================================================================
--- trunk/BNC/src/orbComp/sp3Comp.cpp	(revision 11075)
+++ trunk/BNC/src/orbComp/sp3Comp.cpp	(revision 11076)
@@ -231,4 +231,8 @@
         stat[prn.toString()]._offset = xx[index];
         if (dr.find(prn) != dr.end()){
+          // signal-in-space difference: radial minus clock, only the
+          // epoch-wise clock offset (datum) removed, i.e. including the
+          // satellite-specific clock offset
+          epochs[ie]->_sis[prn] = dr.find(prn)->second[0] - (dc[prn] + xx[index]);
           dcRed[prn] = dc[prn] - dr.find(prn)->second[0]; // clock minus radial component
           stat[prn.toString()]._dcRedMean += dcRed[prn];
@@ -368,6 +372,6 @@
     out << "!\n! Clock residuals and orbit differences in [m]\n"
            "! ----------------------------------------------------------------------------\n";
-    out << "!\n!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN"
-            "\n! ----------------------------------------------------------------------------\n";
+    out << "!\n!  Epoch                PRN  radial   along   out        clk    clkRed   iPRN      SIS"
+            "\n! -------------------------------------------------------------------------------------\n";
   }
   for (unsigned ii = 0; ii < epochs.size(); ii++) {
@@ -376,4 +380,5 @@
     const map<t_prn, double>&       dc = epochs[ii]->_dc;
     const map<t_prn, double>&    dcRed = epochs[ii]->_dcRed;
+    const map<t_prn, double>&      sis = epochs[ii]->_sis;
     for (map<t_prn, ColumnVector>::const_iterator it = dr.begin(); it != dr.end(); it++) {
       const t_prn&  prn = it->first;
@@ -413,5 +418,20 @@
         }
         if (!_summaryOnly) {
-          out << "    " << setw(2) << int(prn) << "\n";
+          out << "    " << setw(2) << int(prn);
+        }
+        if (sis.find(prn) != sis.end()) {
+          double sisVal = sis.find(prn)->second;
+          stat[prn.toString()]._sisSum += sisVal;
+          stat[all.str()     ]._sisSum += sisVal;
+          stat[prn.toString()]._sisSqr += sisVal * sisVal;
+          stat[all.str()     ]._sisSqr += sisVal * sisVal;
+          stat[prn.toString()]._ns     += 1;
+          stat[all.str()     ]._ns     += 1;
+          if (!_summaryOnly) {
+            out << "  " << setw(7) << setprecision(4) << sisVal;
+          }
+        }
+        if (!_summaryOnly) {
+          out << "\n";
         }
       }
@@ -424,7 +444,16 @@
   out << "!\n! Summary";
   out << "\n! -----------------------------------------------------------------------------------------------------------------\n";
-  out << "!\n!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset "
-          "\n!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]  "
-          "\n! -----------------------------------------------------------------------------------------------------------------\n";
+  out << "!\n!     PRN   radialRMS   alongRMS    outRMS     3DRMS      nOrb    clkRMS    clkRedRMS   clkRedSig   nClk    Offset     SISRMS    SISSig"
+          "\n!              [mm]       [mm]        [mm]      [mm]      [-]      [ns]        [ns]        [ns]      [-]     [ns]       [mm]      [mm]"
+          "\n! -------------------------------------------------------------------------------------------------------------------------------------\n";
+  // SIS standard deviation of a system: pooled about the satellite means
+  map<char, double> sisVarSys;
+  for (map<string, t_stat>::const_iterator it = stat.begin(); it != stat.end(); it++) {
+    const t_stat& st = it->second;
+    stringstream all; all << it->first[0] << 99;
+    if (it->first != all.str() && st._ns > 0) {
+      sisVarSys[it->first[0]] += st._sisSqr - st._sisSum * st._sisSum / st._ns;
+    }
+  }
   for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) {
     const string& prn  = it->first;
@@ -464,4 +493,13 @@
           out << setw( 9) << setprecision(2) << stat._offset / t_CST::c * 1e9;
         }
+        else {
+          out << setw( 9) << " ";
+        }
+      }
+      if (stat._ns > 0) {
+        double var = (prn == all.str()) ? sisVarSys[sys] / stat._ns
+                                        : stat._sisSqr / stat._ns - pow(stat._sisSum / stat._ns, 2);
+        out << setw(11) << setprecision(1) << sqrt(stat._sisSqr / stat._ns) * 1e3 << ' '
+            << setw( 9) << setprecision(1) << sqrt(max(0.0, var)) * 1e3;
       }
       out << "\n";
Index: trunk/BNC/src/orbComp/sp3Comp.h
===================================================================
--- trunk/BNC/src/orbComp/sp3Comp.h	(revision 11075)
+++ trunk/BNC/src/orbComp/sp3Comp.h	(revision 11076)
@@ -61,4 +61,5 @@
     std::map<t_prn, double>       _dc;
     std::map<t_prn, double>       _dcRed;
+    std::map<t_prn, double>       _sis;   // radial - clock, epoch-wise clock offset removed only
   };
 
@@ -73,6 +74,9 @@
       _dcRedSig   = 0.0;
       _offset     = 0.0;
+      _sisSum     = 0.0;
+      _sisSqr     = 0.0;
       _nr         = 0;
       _nc         = 0;
+      _ns         = 0;
     }
     ColumnVector _rao;
@@ -83,6 +87,9 @@
     double       _dcRedSig;
     double       _offset;
+    double       _sisSum;
+    double       _sisSqr;
     int          _nr;
     int          _nc;
+    int          _ns;
   };
 
