Inhibit stall tests when recovery device(s) deployed or on the ground
This commit is contained in:
parent
03acca208a
commit
b06c535a80
@ -257,13 +257,12 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Check for Tumbling
|
// Check for fin stall and either set tumbling or LargeAOA warning depending on
|
||||||
// Conditions for transition are:
|
// rocket stability margin
|
||||||
// is not already tumbling
|
// Inhibited if already tumbling, parachutes deployed, or on the ground
|
||||||
// and not stable (cg > cp)
|
if (!currentStatus.isTumbling() &&
|
||||||
// and stallMargin() < 0
|
(currentStatus.getDeployedRecoveryDevices().size() == 0) &&
|
||||||
|
!currentStatus.isLanded()) {
|
||||||
if (!currentStatus.isTumbling()) {
|
|
||||||
final double cp = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_CP_LOCATION);
|
final double cp = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_CP_LOCATION);
|
||||||
final double cg = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_CG_LOCATION);
|
final double cg = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_CG_LOCATION);
|
||||||
final double aoa = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_AOA);
|
final double aoa = currentStatus.getFlightDataBranch().getLast(FlightDataType.TYPE_AOA);
|
||||||
@ -560,6 +559,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
case RECOVERY_DEVICE_DEPLOYMENT:
|
case RECOVERY_DEVICE_DEPLOYMENT:
|
||||||
RocketComponent c = event.getSource();
|
RocketComponent c = event.getSource();
|
||||||
int n = c.getStageNumber();
|
int n = c.getStageNumber();
|
||||||
|
|
||||||
// Ignore event if stage not active
|
// Ignore event if stage not active
|
||||||
if (currentStatus.getConfiguration().isStageActive(n)) {
|
if (currentStatus.getConfiguration().isStageActive(n)) {
|
||||||
// TODO: HIGH: Check stage activeness for other events as well?
|
// TODO: HIGH: Check stage activeness for other events as well?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user