Inhibit reignition of already ignited motor
If a later stage motor's ignition event is triggered by burnout of earlier stage motors, an ignition even gets queued for every burnout in the earlier stage. This checks to see if a motor is already burning when an ignition event is processed for it, and ignores the event if so.
This commit is contained in:
		
							parent
							
								
									ede9dfe700
								
							
						
					
					
						commit
						a4fdc333ad
					
				| @ -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()); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user