diff --git a/core/src/net/sf/openrocket/aerodynamics/BarrowmanCalculator.java b/core/src/net/sf/openrocket/aerodynamics/BarrowmanCalculator.java index 1c714209d..97cfb076e 100644 --- a/core/src/net/sf/openrocket/aerodynamics/BarrowmanCalculator.java +++ b/core/src/net/sf/openrocket/aerodynamics/BarrowmanCalculator.java @@ -17,7 +17,6 @@ import net.sf.openrocket.rocketcomponent.ExternalComponent; import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FlightConfiguration; -import net.sf.openrocket.rocketcomponent.RingInstanceable; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.SymmetricComponent; @@ -186,6 +185,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator { if (!component.isAerodynamic()) continue; + // Call calculation method forces.zero(); RocketComponentCalc calcObj = calcMap.get(component); diff --git a/core/src/net/sf/openrocket/masscalc/MassCalculator.java b/core/src/net/sf/openrocket/masscalc/MassCalculator.java index 07ba1c094..411d37b1e 100644 --- a/core/src/net/sf/openrocket/masscalc/MassCalculator.java +++ b/core/src/net/sf/openrocket/masscalc/MassCalculator.java @@ -166,6 +166,7 @@ public class MassCalculator implements Monitorable { Coordinate[] locations = mountComp.getLocations(); // location of mount, w/in entire rocket int instanceCount = locations.length; double motorXPosition = mtrConfig.getX(); // location of motor from mount + Coordinate localCM = type.getCG( mtr ); // CoM from beginning of motor localCM = localCM.setWeight( localCM.weight * instanceCount); diff --git a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java index 59c12c9cd..6c1627ab6 100644 --- a/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java +++ b/core/test/net/sf/openrocket/aerodynamics/BarrowmanCalculatorTest.java @@ -3,7 +3,6 @@ package net.sf.openrocket.aerodynamics; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import org.junit.BeforeClass; import org.junit.Test; @@ -96,7 +95,7 @@ public class BarrowmanCalculatorTest { AerodynamicCalculator calc = new BarrowmanCalculator(); FlightConditions conditions = new FlightConditions(config); WarningSet warnings = new WarningSet(); - + // calculated from OpenRocket 15.03: //double expCPx = 0.225; @@ -129,12 +128,13 @@ public class BarrowmanCalculatorTest { @Test public void testGetWorstCP() { - Rocket rocket = TestRockets.makeFalcon9Heavy(); - FlightConfiguration config = rocket.getSelectedConfiguration(); - BarrowmanCalculator calc = new BarrowmanCalculator(); - FlightConditions conditions = new FlightConditions(config); - WarningSet warnings = new WarningSet(); +// Rocket rocket = TestRockets.makeFalcon9Heavy(); +// FlightConfiguration config = rocket.getSelectedConfiguration(); +// BarrowmanCalculator calc = new BarrowmanCalculator(); +// FlightConditions conditions = new FlightConditions(config); +// WarningSet warnings = new WarningSet(); + // NYI // Coordinate calcBestCP = calc.getCP(config, conditions, warnings); // Coordinate calcWorstCP = calc.getWorstCP(config, conditions, warnings); diff --git a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java index 891e99a58..ea5b1e4d4 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java @@ -178,6 +178,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe panel.add(label, "growx, right"); JComboBox combo = new JComboBox( configuration.getRocket().toConfigArray()); + panel.add(combo, "wrap");