Merge pull request #457 from JoePfeiffer/fix-booster-tumble

Fix booster tumble
This commit is contained in:
Wes Cravens 2018-10-21 11:24:07 -05:00 committed by GitHub
commit 8b0faf8308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,11 +217,11 @@ public class BasicEventSimulationEngine implements SimulationEngine {
if (wantToTumble) {
final boolean tooMuchThrust = t > THRUST_TUMBLE_CONDITION;
//final boolean isSustainer = status.getConfiguration().isStageActive(0);
final boolean isSustainer = currentStatus.getConfiguration().isStageActive(0);
final boolean isApogee = currentStatus.isApogeeReached();
if (tooMuchThrust) {
currentStatus.getWarnings().add(Warning.TUMBLE_UNDER_THRUST);
} else if (isApogee) {
} else if (isApogee || !isSustainer) {
addEvent(new FlightEvent(FlightEvent.Type.TUMBLE, currentStatus.getSimulationTime()));
currentStatus.setTumbling(true);
}