1
0
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:
bpmcgeeney
2021-09-15 19:56:35 -07:00
parent 78cd59dd11
commit fdddd1f741
8 changed files with 5696 additions and 4310 deletions

View File

@@ -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;
}