Changeset 2558 in ntrip for trunk/BNS/bnseph.cpp
- Timestamp:
- Aug 10, 2010, 9:37:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnseph.cpp
r2493 r2558 634 634 // Derivative of the state vector using a simple force model (static) 635 635 //////////////////////////////////////////////////////////////////////////// 636 ColumnVector t_ephGlo::glo_deriv(double /* tt */, const ColumnVector& xv) { 636 ColumnVector t_ephGlo::glo_deriv(double /* tt */, const ColumnVector& xv, 637 double* acc) { 637 638 638 639 // State vector components … … 646 647 static const double AE = 6378136.0; 647 648 static const double OMEGA = 7292115.e-11; 648 static const double C20 = -1082.6 3e-6;649 static const double C20 = -1082.625e-6; 649 650 650 651 double rho = rr.norm_Frobenius(); … … 661 662 va(2) = vv(2); 662 663 va(3) = vv(3); 663 va(4) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(1) + t4*vv(2) ;664 va(5) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(2) - t4*vv(1) ;665 va(6) = (t1 + t2*(3.0-5.0*z2/(rho*rho)) ) * rr(3) ;664 va(4) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(1) + t4*vv(2) + acc[0]; 665 va(5) = (t1 + t2*(1.0-5.0*z2/(rho*rho)) + t3) * rr(2) - t4*vv(1) + acc[1]; 666 va(6) = (t1 + t2*(3.0-5.0*z2/(rho*rho)) ) * rr(3) + acc[2]; 666 667 667 668 return va; … … 684 685 double step = dtPos / nSteps; 685 686 687 double acc[3]; 688 acc[0] = _x_acceleration * 1.e3; 689 acc[1] = _x_acceleration * 1.e3; 690 acc[2] = _x_acceleration * 1.e3; 686 691 for (int ii = 1; ii <= nSteps; ii++) { 687 _xv = rungeKutta4(_tt, _xv, step, glo_deriv);692 _xv = rungeKutta4(_tt, _xv, step, acc, glo_deriv); 688 693 _tt += step; 689 694 }
Note:
See TracChangeset
for help on using the changeset viewer.