diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index 0a7a07f20..dc4c1a47e 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -2030,6 +2030,7 @@ Warning.TUBE_SEPARATION = Space between tube fins may not simulate accurately. Warning.TUBE_OVERLAP = Overlapping tube fins may not simulate accurately. Warning.EMPTY_BRANCH = Simulation branch contains no data Warning.SEPARATION_ORDER = Stages separated in an unreasonable order +Warning.EARLY_SEPARATION = Stages separated before clearing launch rod/rail ! Scale dialog ScaleDialog.lbl.scaleRocket = Entire rocket diff --git a/core/src/net/sf/openrocket/logging/Warning.java b/core/src/net/sf/openrocket/logging/Warning.java index 9d1bc0421..23c4bcb90 100644 --- a/core/src/net/sf/openrocket/logging/Warning.java +++ b/core/src/net/sf/openrocket/logging/Warning.java @@ -386,7 +386,11 @@ public abstract class Warning extends Message { public static final Warning TUBE_SEPARATION = new Other(trans.get("Warning.TUBE_SEPARATION")); public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP")); + /** A Warning that stage separation occurred at other than the last stage */ public static final Warning SEPARATION_ORDER = new Other(trans.get("Warning.SEPARATION_ORDER")); + /** A Warning that stage separation occurred before the rocket cleared the launch rod or rail */ + public static final Warning EARLY_SEPARATION = new Other(trans.get("Warning.EARLY_SEPARATION")); + public static final Warning EMPTY_BRANCH = new Other(trans.get("Warning.EMPTY_BRANCH")); } diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index be9fd8bc6..32977c194 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -485,6 +485,11 @@ public class BasicEventSimulationEngine implements SimulationEngine { currentStatus.getWarnings().add(Warning.SEPARATION_ORDER); } + // If I haven't cleared the rail yet, flag a warning + if (!currentStatus.isLaunchRodCleared()) { + currentStatus.getWarnings().add(Warning.EARLY_SEPARATION); + } + // Create a new simulation branch for the booster SimulationStatus boosterStatus = new SimulationStatus(currentStatus);