Merge pull request #2271 from JoePfeiffer/fix-2239

If stage separation occurs before clearing launch rail, warn the user
This commit is contained in:
Sibo Van Gool 2023-07-27 16:58:13 +02:00 committed by GitHub
commit 5bb71e8dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -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.TUBE_OVERLAP = Overlapping tube fins may not simulate accurately.
Warning.EMPTY_BRANCH = Simulation branch contains no data Warning.EMPTY_BRANCH = Simulation branch contains no data
Warning.SEPARATION_ORDER = Stages separated in an unreasonable order Warning.SEPARATION_ORDER = Stages separated in an unreasonable order
Warning.EARLY_SEPARATION = Stages separated before clearing launch rod/rail
! Scale dialog ! Scale dialog
ScaleDialog.lbl.scaleRocket = Entire rocket ScaleDialog.lbl.scaleRocket = Entire rocket

View File

@ -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_SEPARATION = new Other(trans.get("Warning.TUBE_SEPARATION"));
public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP")); public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP"));
/** A <code>Warning</code> that stage separation occurred at other than the last stage */
public static final Warning SEPARATION_ORDER = new Other(trans.get("Warning.SEPARATION_ORDER")); public static final Warning SEPARATION_ORDER = new Other(trans.get("Warning.SEPARATION_ORDER"));
/** A <code>Warning</code> 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")); public static final Warning EMPTY_BRANCH = new Other(trans.get("Warning.EMPTY_BRANCH"));
} }

View File

@ -485,6 +485,11 @@ public class BasicEventSimulationEngine implements SimulationEngine {
currentStatus.getWarnings().add(Warning.SEPARATION_ORDER); 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 // Create a new simulation branch for the booster
SimulationStatus boosterStatus = new SimulationStatus(currentStatus); SimulationStatus boosterStatus = new SimulationStatus(currentStatus);