Index: trunk/BNS/bnseph.cpp
===================================================================
--- trunk/BNS/bnseph.cpp	(revision 2557)
+++ trunk/BNS/bnseph.cpp	(revision 2558)
@@ -634,5 +634,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
@@ -646,5 +647,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();
@@ -661,7 +662,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;
@@ -684,6 +685,10 @@
   double step = dtPos / nSteps;
 
+  double acc[3];
+  acc[0] = _x_acceleration * 1.e3;
+  acc[1] = _x_acceleration * 1.e3;
+  acc[2] = _x_acceleration * 1.e3;
   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/BNS/bnseph.h
===================================================================
--- trunk/BNS/bnseph.h	(revision 2557)
+++ trunk/BNS/bnseph.h	(revision 2558)
@@ -41,5 +41,6 @@
   virtual int  RTCM3(unsigned char *);
  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
   mutable ColumnVector _xv;  // status vector (position, velocity) at time _tt
Index: trunk/BNS/bnsutils.cpp
===================================================================
--- trunk/BNS/bnsutils.cpp	(revision 2557)
+++ trunk/BNS/bnsutils.cpp	(revision 2558)
@@ -128,13 +128,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/BNS/bnsutils.h
===================================================================
--- trunk/BNS/bnsutils.h	(revision 2557)
+++ trunk/BNS/bnsutils.h	(revision 2558)
@@ -31,5 +31,6 @@
 
 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));
 
 QByteArray waitForLine(QTcpSocket* socket);
