Merge pull request #457 from JoePfeiffer/fix-booster-tumble
Fix booster tumble
This commit is contained in:
commit
8b0faf8308
@ -217,11 +217,11 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
|
|
||||||
if (wantToTumble) {
|
if (wantToTumble) {
|
||||||
final boolean tooMuchThrust = t > THRUST_TUMBLE_CONDITION;
|
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();
|
final boolean isApogee = currentStatus.isApogeeReached();
|
||||||
if (tooMuchThrust) {
|
if (tooMuchThrust) {
|
||||||
currentStatus.getWarnings().add(Warning.TUMBLE_UNDER_THRUST);
|
currentStatus.getWarnings().add(Warning.TUMBLE_UNDER_THRUST);
|
||||||
} else if (isApogee) {
|
} else if (isApogee || !isSustainer) {
|
||||||
addEvent(new FlightEvent(FlightEvent.Type.TUMBLE, currentStatus.getSimulationTime()));
|
addEvent(new FlightEvent(FlightEvent.Type.TUMBLE, currentStatus.getSimulationTime()));
|
||||||
currentStatus.setTumbling(true);
|
currentStatus.setTumbling(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user