Instead of just checking continuity, we're doing a few more sanity checks on
SymmetricComponent geometry.
This commit is contained in:
parent
c8e98cf319
commit
30cedd9215
@ -69,7 +69,7 @@ public interface AerodynamicCalculator extends Monitorable {
|
||||
public AerodynamicCalculator newInstance();
|
||||
|
||||
/**
|
||||
* Test component assembly for continuity (esp. diameter), and post any needed warnings
|
||||
* Check component assembly for geometric problems and post any needed warnings
|
||||
*/
|
||||
public void testIsContinuous(FlightConfiguration configuration, final RocketComponent component, WarningSet warnings);
|
||||
public void checkGeometry(FlightConfiguration configuration, final RocketComponent component, WarningSet warnings);
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
||||
if (calcMap == null)
|
||||
buildCalcMap(configuration);
|
||||
|
||||
testIsContinuous(configuration, configuration.getRocket(), warnings);
|
||||
checkGeometry(configuration, configuration.getRocket(), warnings);
|
||||
|
||||
final InstanceMap imap = configuration.getActiveInstances();
|
||||
|
||||
@ -276,7 +276,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testIsContinuous(FlightConfiguration configuration, final RocketComponent treeRoot, WarningSet warnings ){
|
||||
public void checkGeometry(FlightConfiguration configuration, final RocketComponent treeRoot, WarningSet warnings ){
|
||||
Queue<RocketComponent> queue = new LinkedList<>();
|
||||
for (RocketComponent child : treeRoot.getChildren()) {
|
||||
// Ignore inactive stages
|
||||
@ -320,7 +320,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
||||
|
||||
prevComp = sym;
|
||||
}else if( comp instanceof ComponentAssembly ){
|
||||
testIsContinuous(configuration, comp, warnings);
|
||||
checkGeometry(configuration, comp, warnings);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ public class BarrowmanCalculatorTest {
|
||||
FlightConfiguration configuration = rocket.getSelectedConfiguration();
|
||||
WarningSet warnings = new WarningSet();
|
||||
|
||||
calc.testIsContinuous(configuration, rocket, warnings);
|
||||
calc.checkGeometry(configuration, rocket, warnings);
|
||||
assertTrue("Estes Alpha III should be continuous: ", warnings.isEmpty());
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ public class BarrowmanCalculatorTest {
|
||||
FlightConfiguration configuration = rocket.getSelectedConfiguration();
|
||||
WarningSet warnings = new WarningSet();
|
||||
|
||||
calc.testIsContinuous(configuration, rocket, warnings);
|
||||
calc.checkGeometry(configuration, rocket, warnings);
|
||||
assertTrue("F9H should be continuous: ", warnings.isEmpty());
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ public class BarrowmanCalculatorTest {
|
||||
body.setOuterRadius( 0.012 );
|
||||
body.setName( body.getName()+" << discontinuous");
|
||||
|
||||
calc.testIsContinuous(configuration, rocket, warnings);
|
||||
calc.checkGeometry(configuration, rocket, warnings);
|
||||
assertFalse(" Estes Alpha III has an undetected discontinuity:", warnings.isEmpty());
|
||||
}
|
||||
|
||||
@ -340,7 +340,7 @@ public class BarrowmanCalculatorTest {
|
||||
body.setOuterRadius( 0.012 );
|
||||
body.setName( body.getName()+" << discontinuous");
|
||||
|
||||
calc.testIsContinuous(configuration, rocket, warnings);
|
||||
calc.checkGeometry(configuration, rocket, warnings);
|
||||
assertFalse(" Missed discontinuity in Falcon 9 Heavy:" , warnings.isEmpty());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user