Don't add delay time in again when queueing upper stage ignition event
This commit is contained in:
parent
3513cb9bba
commit
56bf5e1af8
@ -325,18 +325,11 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
// Check for motor ignition events, add ignition events to queue
|
// Check for motor ignition events, add ignition events to queue
|
||||||
for (MotorClusterState state : currentStatus.getActiveMotors() ){
|
for (MotorClusterState state : currentStatus.getActiveMotors() ){
|
||||||
if (state.testForIgnition(currentStatus.getConfiguration(), event)) {
|
if (state.testForIgnition(currentStatus.getConfiguration(), event)) {
|
||||||
MotorClusterState sourceState = (MotorClusterState) event.getData();
|
|
||||||
double ignitionDelay = 0;
|
|
||||||
if (event.getType() == FlightEvent.Type.BURNOUT)
|
|
||||||
ignitionDelay = 0;
|
|
||||||
else if (event.getType() == FlightEvent.Type.EJECTION_CHARGE)
|
|
||||||
ignitionDelay = sourceState.getEjectionDelay();
|
|
||||||
|
|
||||||
MotorMount mount = state.getMount();
|
MotorMount mount = state.getMount();
|
||||||
MotorConfiguration motorInstance = mount.getMotorConfig(this.fcid);
|
MotorConfiguration motorInstance = mount.getMotorConfig(this.fcid);
|
||||||
ignitionDelay += motorInstance.getIgnitionDelay();
|
|
||||||
|
|
||||||
final double ignitionTime = currentStatus.getSimulationTime() + ignitionDelay;
|
final double ignitionTime = currentStatus.getSimulationTime() + motorInstance.getIgnitionDelay();
|
||||||
|
|
||||||
// TODO: this event seems to get enqueue'd multiple times ...
|
// TODO: this event seems to get enqueue'd multiple times ...
|
||||||
log.info("Queueing Ignition Event for: "+state.toDescription()+" @: "+ignitionTime);
|
log.info("Queueing Ignition Event for: "+state.toDescription()+" @: "+ignitionTime);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user