Browse Source

allow negative time_step / reverse orbit propagation

main
cinnaboot 4 years ago
parent
commit
fae845ee49
  1. 2
      src/orbits.cpp

2
src/orbits.cpp

@ -238,7 +238,7 @@ getPropagatedTrueAnomaly(system_2body sys,
double initial_anom) double initial_anom)
{ {
// NOTE: 'pause' simulation when time_step is set close to 0 // 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; return initial_anom;
double ecc_anom = getPropagatedEccAnomaly(sys, initial_anom); double ecc_anom = getPropagatedEccAnomaly(sys, initial_anom);

Loading…
Cancel
Save