From 39d961df5694fc0ab6860b73447cd7a2798ce27e Mon Sep 17 00:00:00 2001 From: Joe Pfeiffer Date: Mon, 6 Aug 2018 17:11:12 -0600 Subject: [PATCH] Don't report timestep on thrust log line. First it was probably meant to be simulation time, not time step, and second it's already reported elsewhere Report altitude and event type at each simulation step --- .../sf/openrocket/simulation/BasicEventSimulationEngine.java | 5 +++-- .../net/sf/openrocket/simulation/RK4SimulationStepper.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index 7e48062e5..9416899c0 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -128,7 +128,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { if (nextEvent != null) { maxStepTime = MathUtil.max(nextEvent.getTime() - currentStatus.getSimulationTime(), 0.001); } - log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime()); + log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime() + " altitude " + oldAlt); currentStepper.step(currentStatus, maxStepTime); } SimulationListenerHelper.firePostStep(currentStatus); @@ -319,6 +319,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { } // Handle event + log.trace("Handling event " + event); switch (event.getType()) { case LAUNCH: { @@ -486,7 +487,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { break; case ALTITUDE: - log.trace("BasicEventSimulationEngine: Handling event " + event); + // nothing special needs to be done for this event break; case TUMBLE: diff --git a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java index ced30ce51..38f0eb7db 100644 --- a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java +++ b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java @@ -182,7 +182,7 @@ public class RK4SimulationStepper extends AbstractSimulationStepper { double thrustEstimate = store.thrustForce; store.thrustForce = calculateAverageThrust(status, store.timestep, store.longitudinalAcceleration, store.atmosphericConditions, true); - log.trace("Thrust at time " + store.timestep + " thrustForce = " + store.thrustForce); + log.trace("Thrust = " + store.thrustForce); double thrustDiff = Math.abs(store.thrustForce - thrustEstimate); // Log if difference over 1%, recompute if over 10% if (thrustDiff > 0.01 * thrustEstimate) {