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;