Merge pull request #1945 from JoePfeiffer/fix-1938

Inhibit reignition of already ignited motor
This commit is contained in:
Joe Pfeiffer 2023-01-05 10:52:43 -07:00 committed by GitHub
commit 05e894c1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,7 +396,13 @@ public class BasicEventSimulationEngine implements SimulationEngine {
case IGNITION: {
MotorClusterState motorState = (MotorClusterState) event.getData();
// If there are multiple ignition events (as is the case if the preceding stage has several burnout events, for instance)
// We get multiple ignition events for the upper stage motor. Ignore are all after the first.
if (motorState.getIgnitionTime() < currentStatus.getSimulationTime()) {
log.info("Ignoring motor " +motorState.toDescription()+" ignition event @"+currentStatus.getSimulationTime());
continue;
}
log.info(" Igniting motor: "+motorState.toDescription()+" @"+currentStatus.getSimulationTime());
motorState.ignite( event.getTime());