Comments in BasicEventSimulationEngine.java indicate that if we're the
sustainer stage, we don't check for tumbling until after apogee, which is consistent with the email discussion eg https://sourceforge.net/p/openrocket/mailman/message/32016278/ Not switching to tumbling until after apogee results in unstable booster stages going into wild oscillations, and firing an exception terminating the branch of the simulation. This brings the code into conformity with the comment.
This commit is contained in:
parent
c4793cb8b2
commit
8700450f20
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user