MERGE with commit f8cfebe...
This commit is contained in:
commit
77bb060d25
@ -17,7 +17,6 @@ import net.sf.openrocket.rocketcomponent.ExternalComponent;
|
|||||||
import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish;
|
import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish;
|
||||||
import net.sf.openrocket.rocketcomponent.FinSet;
|
import net.sf.openrocket.rocketcomponent.FinSet;
|
||||||
import net.sf.openrocket.rocketcomponent.FlightConfiguration;
|
import net.sf.openrocket.rocketcomponent.FlightConfiguration;
|
||||||
import net.sf.openrocket.rocketcomponent.RingInstanceable;
|
|
||||||
import net.sf.openrocket.rocketcomponent.Rocket;
|
import net.sf.openrocket.rocketcomponent.Rocket;
|
||||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||||
import net.sf.openrocket.rocketcomponent.SymmetricComponent;
|
import net.sf.openrocket.rocketcomponent.SymmetricComponent;
|
||||||
@ -186,6 +185,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
if (!component.isAerodynamic())
|
if (!component.isAerodynamic())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
// Call calculation method
|
// Call calculation method
|
||||||
forces.zero();
|
forces.zero();
|
||||||
RocketComponentCalc calcObj = calcMap.get(component);
|
RocketComponentCalc calcObj = calcMap.get(component);
|
||||||
|
@ -167,6 +167,7 @@ public class MassCalculator implements Monitorable {
|
|||||||
int instanceCount = locations.length;
|
int instanceCount = locations.length;
|
||||||
double motorXPosition = mtrConfig.getX(); // location of motor from mount
|
double motorXPosition = mtrConfig.getX(); // location of motor from mount
|
||||||
|
|
||||||
|
|
||||||
Coordinate localCM = type.getCG( mtr ); // CoM from beginning of motor
|
Coordinate localCM = type.getCG( mtr ); // CoM from beginning of motor
|
||||||
localCM = localCM.setWeight( localCM.weight * instanceCount);
|
localCM = localCM.setWeight( localCM.weight * instanceCount);
|
||||||
// a *bit* hacky :P
|
// a *bit* hacky :P
|
||||||
|
@ -3,7 +3,6 @@ package net.sf.openrocket.aerodynamics;
|
|||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.fail;
|
|
||||||
|
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -129,12 +128,13 @@ public class BarrowmanCalculatorTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetWorstCP() {
|
public void testGetWorstCP() {
|
||||||
Rocket rocket = TestRockets.makeFalcon9Heavy();
|
// Rocket rocket = TestRockets.makeFalcon9Heavy();
|
||||||
FlightConfiguration config = rocket.getSelectedConfiguration();
|
// FlightConfiguration config = rocket.getSelectedConfiguration();
|
||||||
BarrowmanCalculator calc = new BarrowmanCalculator();
|
// BarrowmanCalculator calc = new BarrowmanCalculator();
|
||||||
FlightConditions conditions = new FlightConditions(config);
|
// FlightConditions conditions = new FlightConditions(config);
|
||||||
WarningSet warnings = new WarningSet();
|
// WarningSet warnings = new WarningSet();
|
||||||
|
|
||||||
|
// NYI
|
||||||
// Coordinate calcBestCP = calc.getCP(config, conditions, warnings);
|
// Coordinate calcBestCP = calc.getCP(config, conditions, warnings);
|
||||||
// Coordinate calcWorstCP = calc.getWorstCP(config, conditions, warnings);
|
// Coordinate calcWorstCP = calc.getWorstCP(config, conditions, warnings);
|
||||||
|
|
||||||
|
@ -178,6 +178,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe
|
|||||||
panel.add(label, "growx, right");
|
panel.add(label, "growx, right");
|
||||||
|
|
||||||
JComboBox<FlightConfiguration> combo = new JComboBox<FlightConfiguration>( configuration.getRocket().toConfigArray());
|
JComboBox<FlightConfiguration> combo = new JComboBox<FlightConfiguration>( configuration.getRocket().toConfigArray());
|
||||||
|
|
||||||
panel.add(combo, "wrap");
|
panel.add(combo, "wrap");
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user