From 7cf8e393d884c59fff893bd1b4b236171e49f4a2 Mon Sep 17 00:00:00 2001 From: Matthew Robinaugh Date: Fri, 29 Oct 2021 14:14:54 -0700 Subject: [PATCH] Changed location of dt declaration --- include/sim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sim.h b/include/sim.h index 97a1238..dd186fe 100644 --- a/include/sim.h +++ b/include/sim.h @@ -16,7 +16,6 @@ double limit(double value, double upr, double lwr); // Any parameters that are constants should be declared here instead of // buried in code -double const dt = 0.001; double const g = -9.81; bool sim(struct Vehicle &State, struct Vehicle &PrevState) { @@ -71,6 +70,7 @@ bool sim(struct Vehicle &State, struct Vehicle &PrevState) { } void burnStartTimeCalc(Vehicle &State) { + double dt = State.stepSize; double velocity = State.vz; double h = 0;