diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index 1b94f637b..87a2d18d9 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -563,6 +563,7 @@ SimuRunDlg.msg.Unabletosim = Unable to simulate: SimuRunDlg.msg.errorOccurred = An error occurred during the simulation: BasicEventSimulationEngine.error.noMotorsDefined = No motors defined in the simulation. +BasicEventSimulationEngine.error.cantCalculateStability = Can't calculate rocket stability. BasicEventSimulationEngine.error.earlyMotorBurnout = Motor burnout without liftoff. BasicEventSimulationEngine.error.noConfiguredIgnition = No motors configured to ignite at liftoff BasicEventSimulationEngine.error.noIgnition = No motors ignited. @@ -1149,8 +1150,6 @@ NoseConeCfg.tab.General = General NoseConeCfg.tab.ttip.General = General properties NoseConeCfg.tab.Shoulder = Shoulder NoseConeCfg.tab.ttip.Shoulder = Shoulder properties -NoseConeCfg.checkbox.Flip = Flip to tail cone -NoseConeCfg.checkbox.Flip.ttip = Flips the nose cone direction to a tail cone. ! ParachuteConfig Parachute.Parachute = Parachute @@ -1365,7 +1364,7 @@ TCMotorSelPan.lbl.Datapoints = Data points: TCMotorSelPan.lbl.Digest = Digest: TCMotorSelPan.title.Thrustcurve = Thrust curve: TCMotorSelPan.title.Thrust = Thrust -TCMotorSelPan.delayBox.None = Plugged (none) +TCMotorSelPan.delayBox.None = None TCMotorSelPan.noDescription = No description available. TCMotorSelPan.btn.checkAll = Select All TCMotorSelPan.btn.checkNone = Clear All diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index 513190b8b..e31fa4a98 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -7,7 +7,9 @@ import java.util.Deque; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import net.sf.openrocket.aerodynamics.FlightConditions; import net.sf.openrocket.aerodynamics.Warning; +import net.sf.openrocket.aerodynamics.WarningSet; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.IgnitionEvent; import net.sf.openrocket.motor.MotorConfiguration; @@ -84,6 +86,13 @@ public class BasicEventSimulationEngine implements SimulationEngine { throw new MotorIgnitionException(trans.get("BasicEventSimulationEngine.error.noMotorsDefined")); } + // Can't calculate stability + if (currentStatus.getSimulationConditions().getAerodynamicCalculator() + .getCP(currentStatus.getConfiguration(), + new FlightConditions(currentStatus.getConfiguration()), + new WarningSet()).weight < MathUtil.EPSILON) + throw new SimulationException(trans.get("BasicEventSimulationEngine.error.cantCalculateStability")); + // Problems that let us simulate, but result is likely bad // No recovery device