mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 07:06:51 +00:00
fixed issue where while loop didnt work on linux
This commit is contained in:
parent
dbb6888602
commit
e18a0f03f7
@ -19,7 +19,7 @@ bool sim(struct Vehicle &State, struct Vehicle &PrevState) {
|
||||
// defining a few random values here cause I'm lazy
|
||||
State.burnElapsed = 2000;
|
||||
State.mass = State.massInitial;
|
||||
PrevState.thrust = 0;
|
||||
PrevState.thrust = 0.0;
|
||||
|
||||
burnStartTimeCalc(State);
|
||||
|
||||
@ -52,7 +52,7 @@ bool sim(struct Vehicle &State, struct Vehicle &PrevState) {
|
||||
vehicleDynamics(State, PrevState, t);
|
||||
write2CSV(State, outfile, t);
|
||||
t++;
|
||||
} while ((State.z > 0) && (State.thrust != 0));
|
||||
} while ((State.z > 0.0) || (State.thrust > 1.0));
|
||||
|
||||
outfile.close();
|
||||
|
||||
@ -399,4 +399,4 @@ double derivative(double x2, double x1, double dt) {
|
||||
double integral(double x, double y, double dt) {
|
||||
double integ = (x * dt / 1000) + y;
|
||||
return integ;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user