Correct active stages after STAGE_SEPARATION event
This commit is contained in:
parent
1448cde5aa
commit
dfe7e411d9
@ -109,6 +109,11 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
cur.active = _active;
|
cur.active = _active;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void copyStages(FlightConfiguration other) {
|
||||||
|
for (StageFlags cur : other.stages.values())
|
||||||
|
stages.put(cur.stageNumber, new StageFlags(cur.stageNumber, cur.active));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method flags a stage inactive. Other stages are unaffected.
|
* This method flags a stage inactive. Other stages are unaffected.
|
||||||
|
@ -408,7 +408,8 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
|
|
||||||
// Mark the status as having dropped the booster
|
// Mark the status as having dropped the booster
|
||||||
currentStatus.getConfiguration().clearStage( stageNumber);
|
currentStatus.getConfiguration().clearStage( stageNumber);
|
||||||
|
log.trace("current branch stages: " + currentStatus.getConfiguration().toStageListDetail());
|
||||||
|
|
||||||
// Prepare the simulation branch
|
// Prepare the simulation branch
|
||||||
SimulationStatus boosterStatus = new SimulationStatus(currentStatus);
|
SimulationStatus boosterStatus = new SimulationStatus(currentStatus);
|
||||||
boosterStatus.setFlightData(new FlightDataBranch(boosterStage.getName(), FlightDataType.TYPE_TIME));
|
boosterStatus.setFlightData(new FlightDataBranch(boosterStage.getName(), FlightDataType.TYPE_TIME));
|
||||||
@ -418,6 +419,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
log.info(String.format("==>> @ %g; from Branch: %s ---- Branching: %s ---- \n",
|
log.info(String.format("==>> @ %g; from Branch: %s ---- Branching: %s ---- \n",
|
||||||
currentStatus.getSimulationTime(),
|
currentStatus.getSimulationTime(),
|
||||||
currentStatus.getFlightData().getBranchName(), boosterStatus.getFlightData().getBranchName()));
|
currentStatus.getFlightData().getBranchName(), boosterStatus.getFlightData().getBranchName()));
|
||||||
|
log.trace("new branch stages: " + boosterStatus.getConfiguration().toStageListDetail());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,6 @@ public class SimulationStatus implements Monitorable {
|
|||||||
double angle = -cond.getTheta() - (Math.PI / 2.0 - this.simulationConditions.getLaunchRodDirection());
|
double angle = -cond.getTheta() - (Math.PI / 2.0 - this.simulationConditions.getLaunchRodDirection());
|
||||||
o = Quaternion.rotation(new Coordinate(0, 0, angle));
|
o = Quaternion.rotation(new Coordinate(0, 0, angle));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Launch rod angle and direction
|
// Launch rod angle and direction
|
||||||
o = o.multiplyLeft(Quaternion.rotation(new Coordinate(0, this.simulationConditions.getLaunchRodAngle(), 0)));
|
o = o.multiplyLeft(Quaternion.rotation(new Coordinate(0, this.simulationConditions.getLaunchRodAngle(), 0)));
|
||||||
o = o.multiplyLeft(Quaternion.rotation(new Coordinate(0, 0, Math.PI / 2.0 - this.simulationConditions.getLaunchRodDirection())));
|
o = o.multiplyLeft(Quaternion.rotation(new Coordinate(0, 0, Math.PI / 2.0 - this.simulationConditions.getLaunchRodDirection())));
|
||||||
@ -182,6 +180,8 @@ public class SimulationStatus implements Monitorable {
|
|||||||
this.apogeeReached = orig.apogeeReached;
|
this.apogeeReached = orig.apogeeReached;
|
||||||
this.tumbling = orig.tumbling;
|
this.tumbling = orig.tumbling;
|
||||||
|
|
||||||
|
this.configuration.copyStages(orig.configuration);
|
||||||
|
|
||||||
this.deployedRecoveryDevices.clear();
|
this.deployedRecoveryDevices.clear();
|
||||||
this.deployedRecoveryDevices.addAll(orig.deployedRecoveryDevices);
|
this.deployedRecoveryDevices.addAll(orig.deployedRecoveryDevices);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user