mirror of
https://gitlab.com/lander-team/lander-cpp.git
synced 2025-07-25 23:51:35 +00:00
implemented new criteria for stopping simulation as well as a failure/success message
This commit is contained in:
13
src/main.cpp
13
src/main.cpp
@@ -8,7 +8,7 @@
|
||||
#include "Vehicle.h"
|
||||
#include "sim.h"
|
||||
|
||||
void sim(struct Vehicle &);
|
||||
bool sim(struct Vehicle &);
|
||||
|
||||
int main() {
|
||||
Vehicle State;
|
||||
@@ -47,10 +47,15 @@ int main() {
|
||||
State.burntime = 3.45 - 0.148; // [s]
|
||||
State.mdot = State.massPropellant / State.burntime; // [kg/s]
|
||||
|
||||
sim(State, PrevState);
|
||||
bool outcome = sim(State, PrevState);
|
||||
|
||||
std::cout << "Finished";
|
||||
std::cin.get();
|
||||
std::cout << "Finished"
|
||||
<< "\n";
|
||||
|
||||
if (outcome == 1)
|
||||
std::cout << "Success!";
|
||||
else if (outcome == 0)
|
||||
std::cout << "Failed!";
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user