From 366cd6473f728e08d5abffce405ca3943f9d3f25 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sun, 3 Apr 2016 12:34:42 -0400 Subject: [PATCH 1/2] [Bugfix] Updated verification numbers in BarrowmanCalculatorTest --- .../sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java index 6c1627ab6..5d372d8b9 100644 --- a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java +++ b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java @@ -81,7 +81,6 @@ public class BarrowmanCalculatorTest { exp_cpx = ( cna_nose*cpx_nose + cna_body*cpx_body + cna_3fin*cpx_3fin + cna_lugs*cpx_lugs)/exp_cna; } - // calculated from OpenRocket 15.03 Coordinate cp_calc = calc.getCP(config, conditions, warnings); assertEquals(" Estes Alpha III CNa value is incorrect:", exp_cna, cp_calc.weight, EPSILON); @@ -117,9 +116,8 @@ public class BarrowmanCalculatorTest { FlightConditions conditions = new FlightConditions(config); WarningSet warnings = new WarningSet(); - // no clue: - double expCPx = 1.0367644; - double expCNa = 14.169; + double expCPx = 0.994642; + double expCNa = 15.437111; Coordinate calcCP = calc.getCP(config, conditions, warnings); assertEquals(" Falcon 9 Heavy CP x value is incorrect:", expCPx, calcCP.x, EPSILON); From e36aee38d5d26d3f5aa45b842ad15563ceeb5b9a Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sun, 3 Apr 2016 15:25:26 -0400 Subject: [PATCH 2/2] [Bugfix] Partial fix for Swing Tests -Changed default Motor Ignition event to AUTOMATIC -enabled swing-test path under intellij -fixed some simple compile errors in swing/test ... IntegrationTest --- .../sf/openrocket/motor/MotorConfiguration.java | 10 ++-------- swing/OpenRocket Swing.iml | 2 ++ swing/test/net/sf/openrocket/IntegrationTest.java | 14 +++++--------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/core/src/net/sf/openrocket/motor/MotorConfiguration.java b/core/src/net/sf/openrocket/motor/MotorConfiguration.java index 5248caa93..7148cd479 100644 --- a/core/src/net/sf/openrocket/motor/MotorConfiguration.java +++ b/core/src/net/sf/openrocket/motor/MotorConfiguration.java @@ -26,7 +26,7 @@ public class MotorConfiguration implements FlightConfigurableParameter + @@ -206,5 +207,6 @@ + \ No newline at end of file diff --git a/swing/test/net/sf/openrocket/IntegrationTest.java b/swing/test/net/sf/openrocket/IntegrationTest.java index 9bb4ff0d7..1783228e8 100644 --- a/swing/test/net/sf/openrocket/IntegrationTest.java +++ b/swing/test/net/sf/openrocket/IntegrationTest.java @@ -28,17 +28,12 @@ import net.sf.openrocket.file.motor.GeneralMotorLoader; import net.sf.openrocket.gui.main.UndoRedoAction; import net.sf.openrocket.l10n.DebugTranslator; import net.sf.openrocket.l10n.Translator; -import net.sf.openrocket.masscalc.BasicMassCalculator; import net.sf.openrocket.masscalc.MassCalculator; import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.ThrustCurveMotor; import net.sf.openrocket.plugin.PluginModule; -import net.sf.openrocket.rocketcomponent.Configuration; -import net.sf.openrocket.rocketcomponent.EngineBlock; -import net.sf.openrocket.rocketcomponent.MassComponent; -import net.sf.openrocket.rocketcomponent.NoseCone; -import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.rocketcomponent.*; import net.sf.openrocket.simulation.FlightDataType; import net.sf.openrocket.simulation.exception.SimulationException; import net.sf.openrocket.startup.Application; @@ -71,8 +66,8 @@ public class IntegrationTest { private Action undoAction, redoAction; private AerodynamicCalculator aeroCalc = new BarrowmanCalculator(); - private MassCalculator massCalc = new BasicMassCalculator(); - private Configuration config; + private MassCalculator massCalc = new MassCalculator(); + private FlightConfiguration config; private FlightConditions conditions; private String massComponentID = null; @@ -113,7 +108,8 @@ public class IntegrationTest { undoAction = UndoRedoAction.newUndoAction(document); redoAction = UndoRedoAction.newRedoAction(document); - config = document.getSimulation(0).getConfiguration(); + FlightConfigurationId fcid = document.getSimulation(0).getFlightConfigurationId(); + config = document.getRocket().getFlightConfiguration(fcid); conditions = new FlightConditions(config); // Test undo state