diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6e32a32..c8b0bbe 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,7 +11,8 @@ "-o", "${workspaceFolder}/main.exe", "-I", - "${workspaceFolder}/include" + "${workspaceFolder}/include", + "-Wall" ], "options": { "cwd": "${fileDirname}" diff --git a/include/sim.h b/include/sim.h index f261857..9197380 100644 --- a/include/sim.h +++ b/include/sim.h @@ -70,7 +70,7 @@ bool sim(struct Vehicle &State, struct Vehicle &PrevState) { } void burnStartTimeCalc(Vehicle &State) { - double dt = State.stepSize/1000.0; + double dt = State.stepSize / 1000.0; double velocity = State.vz; double h = 0; @@ -95,8 +95,8 @@ void burnStartTimeCalc(Vehicle &State) { h = integral(velocity, h, State.stepSize); } - State.z = 18.88;//h + (pow(velocity, 2) / (2 * -g)); // starting height - State.burnVelocity = velocity; // terminal velocity + State.z = 19.09; // h + (pow(velocity, 2) / (2 * -g)); // starting height + State.burnVelocity = velocity; // terminal velocity std::cout << State.z << std::endl; double burnStartTime = State.burnVelocity / -g;