Modify "fins on pods" test to use a modified Alpha III
This commit is contained in:
parent
b1643e4d14
commit
ecc8a32891
@ -1668,8 +1668,8 @@ public class TestRockets {
|
|||||||
// second model used to test with/without pods. In order to
|
// second model used to test with/without pods. In order to
|
||||||
// maintain consistency between the models, we'll create the
|
// maintain consistency between the models, we'll create the
|
||||||
// no-pods first, and then modify it to make the with-pods version
|
// no-pods first, and then modify it to make the with-pods version
|
||||||
public static final Rocket make3FNCWithPods() {
|
public static final Rocket makeEstesAlphaIIIWithPods() {
|
||||||
Rocket rocket = TestRockets.make3FNCNoPods();
|
Rocket rocket = TestRockets.makeEstesAlphaIII();
|
||||||
|
|
||||||
// find the body and fins
|
// find the body and fins
|
||||||
final InstanceMap imap = rocket.getSelectedConfiguration().getActiveInstances();
|
final InstanceMap imap = rocket.getSelectedConfiguration().getActiveInstances();
|
||||||
|
@ -234,12 +234,12 @@ public class BarrowmanCalculatorTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPhantomTubes() {
|
public void testPhantomTubes() {
|
||||||
Rocket rocketNoPods = TestRockets.make3FNCNoPods();
|
Rocket rocketNoPods = TestRockets.makeEstesAlphaIII();
|
||||||
FlightConfiguration configNoPods = rocketNoPods.getSelectedConfiguration();
|
FlightConfiguration configNoPods = rocketNoPods.getSelectedConfiguration();
|
||||||
FlightConditions conditionsNoPods = new FlightConditions(configNoPods);
|
FlightConditions conditionsNoPods = new FlightConditions(configNoPods);
|
||||||
WarningSet warningsNoPods = new WarningSet();
|
WarningSet warningsNoPods = new WarningSet();
|
||||||
|
|
||||||
Rocket rocketWithPods = TestRockets.make3FNCWithPods();
|
Rocket rocketWithPods = TestRockets.makeEstesAlphaIIIWithPods();
|
||||||
FlightConfiguration configPods = rocketWithPods.getSelectedConfiguration();
|
FlightConfiguration configPods = rocketWithPods.getSelectedConfiguration();
|
||||||
FlightConditions conditionsPods = new FlightConditions(configPods);
|
FlightConditions conditionsPods = new FlightConditions(configPods);
|
||||||
WarningSet warningsPods = new WarningSet();
|
WarningSet warningsPods = new WarningSet();
|
||||||
@ -248,7 +248,7 @@ public class BarrowmanCalculatorTest {
|
|||||||
|
|
||||||
final AerodynamicForces forcesNoPods = calcPods.getAerodynamicForces(configNoPods, conditionsNoPods, warningsNoPods);
|
final AerodynamicForces forcesNoPods = calcPods.getAerodynamicForces(configNoPods, conditionsNoPods, warningsNoPods);
|
||||||
final AerodynamicForces forcesPods = calcPods.getAerodynamicForces(configPods, conditionsPods, warningsPods);
|
final AerodynamicForces forcesPods = calcPods.getAerodynamicForces(configPods, conditionsPods, warningsPods);
|
||||||
assertEquals(" 3FNC With Pods rocket CD value is incorrect:", forcesPods.getCD(), forcesNoPods.getCD(), EPSILON);
|
assertEquals(" Estes Alpha III With Pods rocket CD value is incorrect:", forcesPods.getCD(), forcesNoPods.getCD(), EPSILON);
|
||||||
|
|
||||||
// The "with pods" version has no way of seeing the fins are
|
// The "with pods" version has no way of seeing the fins are
|
||||||
// on the actual body tube rather than the phantom tubes,
|
// on the actual body tube rather than the phantom tubes,
|
||||||
@ -265,16 +265,16 @@ public class BarrowmanCalculatorTest {
|
|||||||
// will be off-axis (one of the fins is taken as having an
|
// will be off-axis (one of the fins is taken as having an
|
||||||
// angle of 0 to the airstream, so it has no contribution).
|
// angle of 0 to the airstream, so it has no contribution).
|
||||||
// This doesn't turn out to cause a problem in an actual
|
// This doesn't turn out to cause a problem in an actual
|
||||||
// simulation, so we are just not testing for it. Test with
|
// simulation.
|
||||||
// correction if we want some time is here but commented out
|
|
||||||
|
|
||||||
final Coordinate cpNoPods = calcNoPods.getCP(configNoPods, conditionsNoPods, warningsNoPods);
|
final Coordinate cpNoPods = calcNoPods.getCP(configNoPods, conditionsNoPods, warningsNoPods);
|
||||||
final Coordinate cpPods = calcPods.getCP(configPods, conditionsPods, warningsPods);
|
final Coordinate cpPods = calcPods.getCP(configPods, conditionsPods, warningsPods);
|
||||||
|
System.out.printf("with pods %s\n", cpPods.toString());
|
||||||
assertEquals(" 3FNC With Pods rocket cp x value is incorrect:", cpPods.x, cpNoPods.x - 0.00672, EPSILON);
|
System.out.printf("without pods %s\n", cpNoPods.toString());
|
||||||
// assertEquals(" 3FNC With Pods rocket cp y value is incorrect:", cpPods.y, cpNoPods.y - 0.00548, EPSILON);
|
assertEquals(" Alpha III With Pods rocket cp x value is incorrect:", cpNoPods.x - 0.002788761352, cpPods.x, EPSILON);
|
||||||
// assertEquals(" 3FNC With Pods rocket cp z value is incorrect:", cpPods.z, cpNoPods.z, EPSILON);
|
assertEquals(" Alpha III With Pods rocket cp y value is incorrect:", cpNoPods.y - 0.005460218430206499, cpPods.y, EPSILON);
|
||||||
assertEquals(" 3FNC With Pods rocket CNa value is incorrect:", cpPods.weight, cpNoPods.weight - 3.14271, EPSILON);
|
assertEquals(" Alpha III With Pods rocket cp z value is incorrect:", cpNoPods.z, cpPods.z, EPSILON);
|
||||||
|
assertEquals(" Alpha III With Pods rocket CNa value is incorrect:", cpPods.weight, cpNoPods.weight - 3.91572, EPSILON);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user