Index: trunk/BNS/bnseph.cpp
===================================================================
--- trunk/BNS/bnseph.cpp	(revision 890)
+++ trunk/BNS/bnseph.cpp	(revision 891)
@@ -348,4 +348,32 @@
                         ColumnVector& vv) const {
 
-}
-
+  const static double secPerWeek = 7 * 86400.0;
+
+  double dt = GPSweeks - _tt;
+  if (GPSweek != _GPSweek) {  
+    dt += (GPSweek - _GPSweek) * secPerWeek;
+  }
+
+  const static double maxStep = 10.0;
+
+  double tt = 0.0;
+  while (tt < dt) {
+    double step = maxStep;
+    if (tt + step > dt) {
+      step = dt - tt;
+    }
+    _xv = rungeKutta4(tt, _xv, step, glo_deriv);
+    tt += step;
+  }
+
+  xc(1) = _xv(1);
+  xc(2) = _xv(2);
+  xc(3) = _xv(3);
+
+  xc(4) = 0.0;
+  
+  vv(1) = _xv(4);
+  vv(2) = _xv(5);
+  vv(3) = _xv(6);
+}
+
Index: trunk/BNS/bnseph.h
===================================================================
--- trunk/BNS/bnseph.h	(revision 890)
+++ trunk/BNS/bnseph.h	(revision 891)
@@ -38,6 +38,6 @@
  private:
   static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv);
-  double       _tt;  // time in seconds of GPSweek
-  ColumnVector _xv;  // status vector (position, velocity) at time _tt
+  mutable double       _tt;  // time in seconds of GPSweek
+  mutable ColumnVector _xv;  // status vector (position, velocity) at time _tt
 
   double _E;                  // [days]   
