add some timeStep debug to BasicLandingStepper
This commit is contained in:
parent
0cc805b185
commit
194a802ea0
@ -79,6 +79,7 @@ public class BasicLandingStepper extends AbstractSimulationStepper {
|
||||
}
|
||||
// but don't let it get *too* small
|
||||
timeStep = Math.max(timeStep, MIN_TIME_STEP);
|
||||
log.debug("timeStep is " + timeStep);
|
||||
|
||||
// Perform Euler integration
|
||||
Coordinate newPosition = status.getRocketPosition().add(status.getRocketVelocity().multiply(timeStep)).
|
||||
@ -94,6 +95,7 @@ public class BasicLandingStepper extends AbstractSimulationStepper {
|
||||
// The new timestep is the solution of
|
||||
// 1/2 at^2 + vt + z0 = 0
|
||||
timeStep = (-v - Math.sqrt(v*v - 2*a*z0))/a;
|
||||
log.debug("ground hit changes timeStep to " + timeStep);
|
||||
|
||||
newPosition = status.getRocketPosition().add(status.getRocketVelocity().multiply(timeStep)).
|
||||
add(linearAcceleration.multiply(MathUtil.pow2(timeStep) / 2));
|
||||
@ -114,7 +116,6 @@ public class BasicLandingStepper extends AbstractSimulationStepper {
|
||||
w = status.getSimulationConditions().getGeodeticComputation().addCoordinate(w, status.getRocketPosition());
|
||||
status.setRocketWorldPosition(w);
|
||||
|
||||
|
||||
// Store data
|
||||
FlightDataBranch data = status.getFlightData();
|
||||
boolean extra = status.getSimulationConditions().isCalculateExtras();
|
||||
|
Loading…
x
Reference in New Issue
Block a user