Index: /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10992)
+++ /trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 10993)
@@ -314,4 +314,5 @@
       orbCorr._dotXr[1]  = _clkOrb.Sat[ii].Orbit.DotDeltaAlongTrack;
       orbCorr._dotXr[2]  = _clkOrb.Sat[ii].Orbit.DotDeltaCrossTrack;
+      orbCorr._rtcmSsr   = (_type == RTCMssr || _type == RTCMnewssr);
 
       _orbCorrections[_lastTime].append(orbCorr);
Index: /trunk/BNC/src/ephemeris.cpp
===================================================================
--- /trunk/BNC/src/ephemeris.cpp	(revision 10992)
+++ /trunk/BNC/src/ephemeris.cpp	(revision 10993)
@@ -731,7 +731,15 @@
   // Relativistic Correction
   // -----------------------
-  //xc[3] -= 4.442807633e-10 * _e * sqrt(a0) * sin(E);
-  // as recommended from new RTCM-SSR =>IS-GPS-200D: paragraph 20.3.3.3.3.1: 
-  xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
+  // Both forms are equivalent per the ICD for an unperturbed broadcast orbit,
+  // but differ numerically once harmonic (Crc/Crs/Cuc/Cus/Cic/Cis) terms are
+  // included in xc/vv. The velocity-based form (IS-GPS-200D 20.3.3.3.3.1) is
+  // the one recommended together with RTCM-SSR corrections; the classic
+  // eccentricity-based form is used otherwise (broadcast-only or IGS-SSR).
+  if (_orbCorr && _orbCorr->_rtcmSsr) {
+    xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
+  }
+  else {
+    xc[3] -= 4.442807633e-10 * _e * sqrt(a0) * sin(E);
+  }
 
   xc[4] = _clock_drift + _clock_driftrate * tc;
@@ -2056,5 +2064,12 @@
   // Relativistic Correction
   // -----------------------
-  xc[3] -= 4.442807309e-10 * _e * sqrt(a0) * sin(E);
+  // See t_ephGPS::position() for the rationale behind selecting between the
+  // eccentricity-based and velocity-based forms.
+  if (_orbCorr && _orbCorr->_rtcmSsr) {
+    xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
+  }
+  else {
+    xc[3] -= 4.442807309e-10 * _e * sqrt(a0) * sin(E);
+  }
 
   xc[4] = _clock_drift + _clock_driftrate * tc;
@@ -2960,5 +2975,12 @@
   // Relativistic Correction
   // -----------------------
-  xc[3] -= 4.442807309e-10 * _e * sqrt(a0) * sin(E);
+  // See t_ephGPS::position() for the rationale behind selecting between the
+  // eccentricity-based and velocity-based forms.
+  if (_orbCorr && _orbCorr->_rtcmSsr) {
+    xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
+  }
+  else {
+    xc[3] -= 4.442807309e-10 * _e * sqrt(a0) * sin(E);
+  }
 
   xc[4] = _clock_drift + _clock_driftrate * tc;
Index: /trunk/BNC/src/satObs.cpp
===================================================================
--- /trunk/BNC/src/satObs.cpp	(revision 10992)
+++ /trunk/BNC/src/satObs.cpp	(revision 10993)
@@ -86,4 +86,5 @@
   _xr.ReSize(3);    _xr    = 0.0;
   _dotXr.ReSize(3); _dotXr = 0.0;
+  _rtcmSsr   = false;
 }
 
@@ -111,5 +112,6 @@
          << setw(10) << setprecision(4) << corr._dotXr[0] * 1.e3 << ' '   // m/s => mm/s
          << setw(10) << setprecision(4) << corr._dotXr[1] * 1.e3 << ' '   // m/s => mm/s
-         << setw(10) << setprecision(4) << corr._dotXr[2] * 1.e3 << endl; // m/s => mm/s
+         << setw(10) << setprecision(4) << corr._dotXr[2] * 1.e3 << ' '   // m/s => mm/s
+         << (corr._rtcmSsr ? 1 : 0) << endl;
   }
   out->flush();
@@ -148,4 +150,15 @@
     corr._dotXr[1] /= 1.e3; // mm/s => m/s
     corr._dotXr[2] /= 1.e3; // mm/s => m/s
+
+    // Optional trailing column - absent in files written before this field
+    // existed, in which case the source format is unknown and defaults to
+    // the classic eccentricity-based relativistic correction.
+    int rtcmSsrFlag = 0;
+    if (in >> rtcmSsrFlag) {
+      corr._rtcmSsr = (rtcmSsrFlag != 0);
+    }
+    else {
+      corr._rtcmSsr = false;
+    }
 
     corrList.push_back(corr);
Index: /trunk/BNC/src/satObs.h
===================================================================
--- /trunk/BNC/src/satObs.h	(revision 10992)
+++ /trunk/BNC/src/satObs.h	(revision 10993)
@@ -117,4 +117,7 @@
   ColumnVector   _xr;
   ColumnVector   _dotXr;
+  bool           _rtcmSsr; // true: RTCM-SSR/RTCM-SSR-new source (velocity-based relativistic
+                            // correction per IS-GPS-200D 20.3.3.3.3.1); false: IGS-SSR or
+                            // unknown source (classic eccentricity-based correction)
 };
 
