From fae845ee49a63fd7bc574310cc2a102d38024882 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Thu, 31 Mar 2022 12:24:26 -0400 Subject: [PATCH] allow negative time_step / reverse orbit propagation --- src/orbits.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/orbits.cpp b/src/orbits.cpp index 9bece20..daf2ba1 100644 --- a/src/orbits.cpp +++ b/src/orbits.cpp @@ -238,7 +238,7 @@ getPropagatedTrueAnomaly(system_2body sys, double initial_anom) { // NOTE: 'pause' simulation when time_step is set close to 0 - if (sys.time_step < 1e-8) + if (sys.time_step < 1e-8 && sys.time_step > -1e-8) return initial_anom; double ecc_anom = getPropagatedEccAnomaly(sys, initial_anom);