diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b64d343..6e32a32 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,7 +2,7 @@ "version": "2.0.0", "tasks": [ { - "type": "cppbuild", + "type": "process", "label": "buildSim", "command": "g++", "args": [ diff --git a/include/sim.h b/include/sim.h index 94403fe..0c95b92 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/1000.0; double velocity = State.vz; double h = 0;