MERGE with commit f8cfebe...

This commit is contained in:
Daniel_M_Williams 2016-01-09 17:11:20 -05:00
commit 77bb060d25
4 changed files with 10 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -178,6 +178,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe
panel.add(label, "growx, right");
JComboBox<FlightConfiguration> combo = new JComboBox<FlightConfiguration>( configuration.getRocket().toConfigArray());
panel.add(combo, "wrap");