[1373] Display warning when no recovery device configured

This commit is contained in:
Peter Tsongalis 2022-06-12 12:32:33 -07:00
parent 87b225b38b
commit f5cc1f61bf
3 changed files with 8 additions and 0 deletions

View File

@ -1787,6 +1787,7 @@ Warning.PARALLEL_FINS = Too many parallel fins
Warning.SUPERSONIC = Body calculations may not be entirely accurate at supersonic speeds.
Warning.RECOVERY_LAUNCH_ROD = Recovery device device deployed while on the launch guide.
Warning.RECOVERY_HIGH_SPEED = Recovery device deployment at high speed
Warning.NO_RECOVERY_DEVICE = No recovery device defined in the simulation.
Warning.TUMBLE_UNDER_THRUST = Stage began to tumble under thrust.
Warning.EVENT_AFTER_LANDING = Flight Event occurred after landing:
Warning.ZERO_LENGTH_BODY = Zero length bodies may not result in accurate simulations.

View File

@ -375,6 +375,8 @@ public abstract class Warning {
////Recovery device opened while motor still burning.
public static final Warning RECOVERY_DEPLOYMENT_WHILE_BURNING = new Other(trans.get("Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING"));
////No recovery device for simulation
public static final Warning NO_RECOVERY_DEVICE = new Other(trans.get("Warning.NO_RECOVERY_DEVICE"));
//// Invalid parameter encountered, ignoring.
public static final Warning FILE_INVALID_PARAMETER = new Other(trans.get("Warning.FILE_INVALID_PARAMETER"));

View File

@ -344,6 +344,11 @@ public class BasicEventSimulationEngine implements SimulationEngine {
}
}
// Add a warning if there is no recovery device defined.
if (!currentStatus.getConfiguration().hasRecoveryDevice()) {
currentStatus.getWarnings().add(Warning.NO_RECOVERY_DEVICE);
}
// Handle event
log.trace("Handling event " + event);
switch (event.getType()) {