diff --git a/core/src/net/sf/openrocket/rocketcomponent/StageSeparationConfiguration.java b/core/src/net/sf/openrocket/rocketcomponent/StageSeparationConfiguration.java index 31ee0c893..d7ef82824 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/StageSeparationConfiguration.java +++ b/core/src/net/sf/openrocket/rocketcomponent/StageSeparationConfiguration.java @@ -98,7 +98,7 @@ public class StageSeparationConfiguration implements FlightConfigurableParameter private static final Translator trans = Application.getTranslator(); - private SeparationEvent separationEvent = SeparationEvent.UPPER_IGNITION; + private SeparationEvent separationEvent = SeparationEvent.EJECTION; private double separationDelay = 0; private final List configListeners = new LinkedList<>(); diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index e128cae5f..69fdf3d3d 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -425,24 +425,28 @@ public class BasicEventSimulationEngine implements SimulationEngine { } case STAGE_SEPARATION: { - // Record the event. - currentStatus.getFlightData().addEvent(event); - RocketComponent boosterStage = event.getSource(); final int stageNumber = boosterStage.getStageNumber(); - - // Mark the status as having dropped the booster - currentStatus.getConfiguration().clearStage( stageNumber); - - // Prepare the simulation branch - SimulationStatus boosterStatus = new SimulationStatus(currentStatus); - boosterStatus.setFlightData(new FlightDataBranch(boosterStage.getName(), FlightDataType.TYPE_TIME)); - // Mark the booster status as only having the booster. - boosterStatus.getConfiguration().setOnlyStage(stageNumber); - toSimulate.push(boosterStatus); - log.info(String.format("==>> @ %g; from Branch: %s ---- Branching: %s ---- \n", - currentStatus.getSimulationTime(), - currentStatus.getFlightData().getBranchName(), boosterStatus.getFlightData().getBranchName())); + + if (currentStatus.getConfiguration().isStageActive(stageNumber-1)) { + // Record the event. + currentStatus.getFlightData().addEvent(event); + + // Mark the status as having dropped the booster + currentStatus.getConfiguration().clearStage( stageNumber); + + // Prepare the simulation branch + SimulationStatus boosterStatus = new SimulationStatus(currentStatus); + boosterStatus.setFlightData(new FlightDataBranch(boosterStage.getName(), FlightDataType.TYPE_TIME)); + // Mark the booster status as only having the booster. + boosterStatus.getConfiguration().setOnlyStage(stageNumber); + toSimulate.push(boosterStatus); + log.info(String.format("==>> @ %g; from Branch: %s ---- Branching: %s ---- \n", + currentStatus.getSimulationTime(), + currentStatus.getFlightData().getBranchName(), boosterStatus.getFlightData().getBranchName())); + } else { + log.debug("upper stage is not active; not performing separation"); + } break; } diff --git a/swing/src/net/sf/openrocket/gui/dialogs/AboutDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/AboutDialog.java index 452a617dc..0496d774b 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/AboutDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/AboutDialog.java @@ -57,28 +57,30 @@ public class AboutDialog extends JDialog { "Polish Rocketry Society / \u0141ukasz & Alex Kazanski (Polish)
" + "Sibo Van Gool (Dutch)
" + "
" + - "See all contributors at
" + - href("https://github.com/openrocket/openrocket/graphs/contributors") + "
" + + "See all contributors at
" + href("https://github.com/openrocket/openrocket/graphs/contributors", false, false) + "
" + "
" + "OpenRocket utilizes the following libraries:
" + "
" + - "MiG Layout (" + href("http://www.miglayout.com/") + ")
" + - "JFreeChart (" + href("http://www.jfree.org/jfreechart/") + ")
" + - "iText (" + href("http://www.itextpdf.com/") + ")
" + - "exp4j (" + href("http://projects.congrace.de/exp4j/index.html") + ")
" + - "JOGL (" + href("http://jogamp.org/jogl/www/") + ")
" + - "Guava (" + href("https://github.com/google/guava") + ")
" + - "Opencsv (" + href("http://opencsv.sourceforge.net/") + ")
" + - "Simple Logging Facade for Java (" + href("http://www.slf4j.org/") + ")
" + - "Java library for parsing and rendering CommonMark (" + href("https://github.com/commonmark/commonmark-java") + ")
" + + "MiG Layout" + href("http://www.miglayout.com", true, true) + "
" + + "JFreeChart" + href("http://www.jfree.org/jfreechart", true, true) + "
" + + "iText" + href("http://www.itextpdf.com", true, true) + "
" + + "exp4j" + href("http://projects.congrace.de/exp4j/index.html", true, true) + "
" + + "JOGL" + href("http://jogamp.org/jogl/www", true, true) + "
" + + "Guava" + href("https://github.com/google/guava", true, true) + "
" + + "Opencsv" + href("http://opencsv.sourceforge.net", true, true) + "
" + + "Simple Logging Facade for Java" + href("http://www.slf4j.org", true, true) + "
" + + "Java library for parsing and rendering CommonMark" + href("https://github.com/commonmark/commonmark-java", true, true) + "
" + + "RSyntaxTextArea" + href("http://bobbylight.github.io/RSyntaxTextArea", true, true) + "
" + + "yasson" + href("https://eclipse-ee4j.github.io/yasson", true, true) + "
" + "
" + "OpenRocket gratefully acknowledges our use of the following databases:
" + "
" + - "Rocket Motor Data (" + href("https://www.thrustcurve.org/") + ")
" + - "Enhanced components database for OpenRocket" + href("https://github.com/dbcook/openrocket-database/") + ")
"; + "Rocket Motor Data" + href("https://www.thrustcurve.org", true, true) + "
" + + "Enhanced components database for OpenRocket" + href("https://github.com/dbcook/openrocket-database", true, true) + + ""; - private String href(String url) { - return "" + url + ""; + private String href(String url, boolean delimiters, boolean leadingSpace) { + return (leadingSpace ? " " : "") + (delimiters ? "(" : "") + "" + url + "" + (delimiters ? ")" : ""); } public AboutDialog(JFrame parent) {