From 2c194312d3b1e0efebc9cf6ba166cb370ee93d07 Mon Sep 17 00:00:00 2001 From: bpmcgeeney Date: Mon, 1 Nov 2021 13:16:51 -0700 Subject: [PATCH] Fixed --- include/sim.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sim.h b/include/sim.h index 0c95b92..767626b 100644 --- a/include/sim.h +++ b/include/sim.h @@ -143,6 +143,8 @@ void burnStartTimeCalc(Vehicle &State) { local_h += local_v * State.stepSize / 1000.0; } while (local_thrustFiring != 3); + + State.z = State.z - local_h; } void vehicleDynamics(Vehicle &State, Vehicle &PrevState, int t) { @@ -239,7 +241,7 @@ void thrustSelection(Vehicle &State, int t) { // as well as current mass State.burnElapsed = (t - State.burnStart) / 1000; State.mass = State.massInitial - (State.mdot * State.burnElapsed); - } else if (std::abs(State.burnVelocity + State.vz) < 0.001) { + } else if (std::abs(State.burnVelocity + State.vz) < 0.90) { // Start burn State.burnStart = t; State.burnElapsed = 0;