save simulation step data after step, not before it
This commit is contained in:
parent
5e0304126e
commit
fefd805fcc
@ -204,10 +204,6 @@ public class RK4SimulationStepper extends AbstractSimulationStepper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store data
|
|
||||||
// TODO: MEDIUM: Store acceleration etc of entire RK4 step, store should be cloned or something...
|
|
||||||
storeData(status, store);
|
|
||||||
|
|
||||||
|
|
||||||
//// Second position, k2 = f(t + h/2, y + k1*h/2)
|
//// Second position, k2 = f(t + h/2, y + k1*h/2)
|
||||||
|
|
||||||
@ -270,6 +266,10 @@ public class RK4SimulationStepper extends AbstractSimulationStepper {
|
|||||||
|
|
||||||
status.setPreviousTimeStep(store.timestep);
|
status.setPreviousTimeStep(store.timestep);
|
||||||
|
|
||||||
|
// Store data
|
||||||
|
// TODO: MEDIUM: Store acceleration etc of entire RK4 step, store should be cloned or something...
|
||||||
|
storeData(status, store);
|
||||||
|
|
||||||
// Verify that values don't run out of range
|
// Verify that values don't run out of range
|
||||||
if (status.getRocketVelocity().length2() > 1e18 ||
|
if (status.getRocketVelocity().length2() > 1e18 ||
|
||||||
status.getRocketPosition().length2() > 1e18 ||
|
status.getRocketPosition().length2() > 1e18 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user