mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-06-16 15:17:23 +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
|
// defining a few random values here cause I'm lazy
|
||||||
State.burnElapsed = 2000;
|
State.burnElapsed = 2000;
|
||||||
State.mass = State.massInitial;
|
State.mass = State.massInitial;
|
||||||
PrevState.thrust = 0;
|
PrevState.thrust = 0.0;
|
||||||
|
|
||||||
burnStartTimeCalc(State);
|
burnStartTimeCalc(State);
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ bool sim(struct Vehicle &State, struct Vehicle &PrevState) {
|
|||||||
vehicleDynamics(State, PrevState, t);
|
vehicleDynamics(State, PrevState, t);
|
||||||
write2CSV(State, outfile, t);
|
write2CSV(State, outfile, t);
|
||||||
t++;
|
t++;
|
||||||
} while ((State.z > 0) && (State.thrust != 0));
|
} while ((State.z > 0.0) || (State.thrust > 1.0));
|
||||||
|
|
||||||
outfile.close();
|
outfile.close();
|
||||||
|
|
||||||
@ -399,4 +399,4 @@ double derivative(double x2, double x1, double dt) {
|
|||||||
double integral(double x, double y, double dt) {
|
double integral(double x, double y, double dt) {
|
||||||
double integ = (x * dt / 1000) + y;
|
double integ = (x * dt / 1000) + y;
|
||||||
return integ;
|
return integ;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user