From fd8370280cea378d43a383f1385127cc1b38ca5e Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Fri, 1 Apr 2011 12:13:06 +0100 Subject: [PATCH] Changed integrator reset condition --- SGDP4.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SGDP4.cpp b/SGDP4.cpp index 24e4607..916b312 100644 --- a/SGDP4.cpp +++ b/SGDP4.cpp @@ -1080,11 +1080,11 @@ void SGDP4::DeepSpaceSecular(const double& t, double& xll, double& omgasm, return; /* - * 1st condition (if d_atime_ is less than one time step from epoch) + * 1st condition (if t is less than one time step from epoch) * 2nd condition (if d_atime_ and t are of opposite signs, so zero crossing required) * 3rd condition (if t is closer to zero than d_atime_) */ - if (fabs(d_atime_) < STEP || + if (fabs(t) < STEP || t * d_atime_ <= 0.0 || fabs(t) < fabs(d_atime_)) { /*