Index: trunk/BNC/RTCM3/ephemeris.cpp
===================================================================
--- trunk/BNC/RTCM3/ephemeris.cpp	(revision 2555)
+++ trunk/BNC/RTCM3/ephemeris.cpp	(revision 2556)
@@ -157,5 +157,6 @@
 // Derivative of the state vector using a simple force model (static)
 ////////////////////////////////////////////////////////////////////////////
-ColumnVector t_ephGlo::glo_deriv(double /* tt */, const ColumnVector& xv) {
+ColumnVector t_ephGlo::glo_deriv(double /* tt */, const ColumnVector& xv,
+                                 double* acc) {
 
   // State vector components
@@ -169,5 +170,5 @@
   static const double AE    = 6378136.0;
   static const double OMEGA = 7292115.e-11;
-  static const double C20   = -1082.63e-6;
+  static const double C20   = -1082.625e-6;
 
   double rho = rr.norm_Frobenius();
@@ -184,7 +185,7 @@
   va(2) = vv(2);
   va(3) = vv(3);
-  va(4) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(1) + t4*vv(2); 
-  va(5) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(2) - t4*vv(1); 
-  va(6) = (t1 + t2*(3.0-5.0*z2/(rho*rho))     ) * rr(3);
+  va(4) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(1) + t4*vv(2) + acc[0]; 
+  va(5) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(2) - t4*vv(1) + acc[1]; 
+  va(6) = (t1 + t2*(3.0-5.0*z2/(rho*rho))     ) * rr(3)            + acc[2];
 
   return va;
@@ -210,6 +211,10 @@
   double step = dtPos / nSteps;
 
+  double acc[3];
+  acc[0] = _x_acceleration;
+  acc[1] = _x_acceleration;
+  acc[2] = _x_acceleration;
   for (int ii = 1; ii <= nSteps; ii++) { 
-    _xv = rungeKutta4(_tt, _xv, step, glo_deriv);
+    _xv = rungeKutta4(_tt, _xv, step, acc, glo_deriv);
     _tt += step;
   }
Index: trunk/BNC/RTCM3/ephemeris.h
===================================================================
--- trunk/BNC/RTCM3/ephemeris.h	(revision 2555)
+++ trunk/BNC/RTCM3/ephemeris.h	(revision 2556)
@@ -104,5 +104,6 @@
 
  private:
-  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv);
+  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv,
+                                double* acc);
 
   mutable double       _tt;  // time in seconds of GPSweek
Index: trunk/BNC/bncutils.cpp
===================================================================
--- trunk/BNC/bncutils.cpp	(revision 2555)
+++ trunk/BNC/bncutils.cpp	(revision 2556)
@@ -255,13 +255,14 @@
   const ColumnVector& yi, // vector of the initial y-values
   double dx,              // the step size for the integration
-  ColumnVector (*der)(double x, const ColumnVector& y)
+  double* acc,            // aditional acceleration
+  ColumnVector (*der)(double x, const ColumnVector& y, double* acc)
                           // A pointer to a function that computes the 
                           // derivative of a function at a point (x,y)
                          ) {
 
-  ColumnVector k1 = der(xi       , yi       ) * dx;
-  ColumnVector k2 = der(xi+dx/2.0, yi+k1/2.0) * dx;
-  ColumnVector k3 = der(xi+dx/2.0, yi+k2/2.0) * dx;
-  ColumnVector k4 = der(xi+dx    , yi+k3    ) * dx;
+  ColumnVector k1 = der(xi       , yi       , acc) * dx;
+  ColumnVector k2 = der(xi+dx/2.0, yi+k1/2.0, acc) * dx;
+  ColumnVector k3 = der(xi+dx/2.0, yi+k2/2.0, acc) * dx;
+  ColumnVector k4 = der(xi+dx    , yi+k3    , acc) * dx;
 
   ColumnVector yf = yi + k1/6.0 + k2/3.0 + k3/3.0 + k4/6.0;
Index: trunk/BNC/bncutils.h
===================================================================
--- trunk/BNC/bncutils.h	(revision 2555)
+++ trunk/BNC/bncutils.h	(revision 2556)
@@ -52,4 +52,5 @@
 
 ColumnVector rungeKutta4(double xi, const ColumnVector& yi, double dx,
-                         ColumnVector (*der)(double x, const ColumnVector& y));
+                         double* acc,
+	    ColumnVector (*der)(double x, const ColumnVector& y, double* acc));
 #endif
