Adjust expected unit test results to account for modified longitudinal MOI calculation
This commit is contained in:
parent
e1f59d7dc8
commit
69e45029a2
@ -676,6 +676,10 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
|
|||||||
// Izz = h * w * (h^2 + w^2) / 12, so Izz/M = (h^2 + w^2) / 12
|
// Izz = h * w * (h^2 + w^2) / 12, so Izz/M = (h^2 + w^2) / 12
|
||||||
// (Iyy / M + Izz / M) / 2 = (h^2 + 2 * w^2)/24
|
// (Iyy / M + Izz / M) / 2 = (h^2 + 2 * w^2)/24
|
||||||
final double inertia = (h2 + 2 * w2) / 24;
|
final double inertia = (h2 + 2 * w2) / 24;
|
||||||
|
|
||||||
|
System.out.println("component " + this);
|
||||||
|
System.out.println("finCount " + finCount);
|
||||||
|
System.out.println("inertia " + inertia);
|
||||||
|
|
||||||
if (finCount == 1)
|
if (finCount == 1)
|
||||||
return inertia;
|
return inertia;
|
||||||
|
@ -46,7 +46,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
|
|
||||||
|
|
||||||
double expMOIrot = 1.8763734635622462E-5;
|
double expMOIrot = 1.8763734635622462E-5;
|
||||||
double expMOIlong = 2.1238394331365588E-4;
|
double expMOIlong = 1.7808603404853048E-4;
|
||||||
|
|
||||||
double actualMOIrot = actualStructure.getRotationalInertia();
|
double actualMOIrot = actualStructure.getRotationalInertia();
|
||||||
double actualMOIlong = actualStructure.getLongitudinalInertia();
|
double actualMOIlong = actualStructure.getLongitudinalInertia();
|
||||||
@ -445,7 +445,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
expInertia = 0.001377661595723823;
|
expInertia = 0.001377661595723823;
|
||||||
compInertia = boosterFins.getRotationalInertia();
|
compInertia = boosterFins.getRotationalInertia();
|
||||||
assertEquals(boosterFins.getName() + " Rotational MOI calculated incorrectly: ", expInertia, compInertia, EPSILON);
|
assertEquals(boosterFins.getName() + " Rotational MOI calculated incorrectly: ", expInertia, compInertia, EPSILON);
|
||||||
expInertia = 0.004050443797127646;
|
expInertia = 0.0016272177418619116;
|
||||||
compInertia = boosterFins.getLongitudinalInertia();
|
compInertia = boosterFins.getLongitudinalInertia();
|
||||||
assertEquals(boosterFins.getName() + " Longitudinal MOI calculated incorrectly: ", expInertia, compInertia, EPSILON);
|
assertEquals(boosterFins.getName() + " Longitudinal MOI calculated incorrectly: ", expInertia, compInertia, EPSILON);
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
double boosterMOIRotational = spent.getRotationalInertia();
|
double boosterMOIRotational = spent.getRotationalInertia();
|
||||||
assertEquals(" Booster x-axis MOI is incorrect: ", expMOIRotational, boosterMOIRotational, EPSILON);
|
assertEquals(" Booster x-axis MOI is incorrect: ", expMOIRotational, boosterMOIRotational, EPSILON);
|
||||||
|
|
||||||
double expMOI_tr = 0.06398514917026163;
|
double expMOI_tr = 0.05913869705973017;
|
||||||
double boosterMOI_tr = spent.getLongitudinalInertia();
|
double boosterMOI_tr = spent.getLongitudinalInertia();
|
||||||
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
||||||
}
|
}
|
||||||
@ -690,7 +690,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
|
|
||||||
final double expIxx = 0.013480523485489424;
|
final double expIxx = 0.013480523485489424;
|
||||||
final double actIxx = launchData.getRotationalInertia();
|
final double actIxx = launchData.getRotationalInertia();
|
||||||
final double expIyy = 0.07017476021288252;
|
final double expIyy = 0.06532830810235105;
|
||||||
final double actIyy = launchData.getLongitudinalInertia();
|
final double actIyy = launchData.getLongitudinalInertia();
|
||||||
|
|
||||||
assertEquals(" Booster x-axis MOI is incorrect: ", expIxx, actIxx, EPSILON);
|
assertEquals(" Booster x-axis MOI is incorrect: ", expIxx, actIxx, EPSILON);
|
||||||
@ -735,7 +735,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
double boosterMOI_xx = burnout.getRotationalInertia();
|
double boosterMOI_xx = burnout.getRotationalInertia();
|
||||||
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
||||||
|
|
||||||
double expMOI_tr = 16.030625168315694;
|
double expMOI_tr = 16.025778716205167;
|
||||||
double boosterMOI_tr = burnout.getLongitudinalInertia();
|
double boosterMOI_tr = burnout.getLongitudinalInertia();
|
||||||
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
||||||
}
|
}
|
||||||
@ -789,7 +789,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
double boosterMOI_xx = boosterData.getRotationalInertia();
|
double boosterMOI_xx = boosterData.getRotationalInertia();
|
||||||
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
||||||
|
|
||||||
double expMOI_tr = 0.35928666329363634;
|
double expMOI_tr = 0.35444021118310487;
|
||||||
double boosterMOI_tr = boosterData.getLongitudinalInertia();
|
double boosterMOI_tr = boosterData.getLongitudinalInertia();
|
||||||
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
||||||
}
|
}
|
||||||
@ -798,7 +798,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
public void testFalcon9HeavyComponentCMxOverride() {
|
public void testFalcon9HeavyComponentCMxOverride() {
|
||||||
Rocket rocket = TestRockets.makeFalcon9Heavy();
|
Rocket rocket = TestRockets.makeFalcon9Heavy();
|
||||||
rocket.setName("Falcon9Heavy." + Thread.currentThread().getStackTrace()[1].getMethodName());
|
rocket.setName("Falcon9Heavy." + Thread.currentThread().getStackTrace()[1].getMethodName());
|
||||||
|
|
||||||
FlightConfiguration config = rocket.getEmptyConfiguration();
|
FlightConfiguration config = rocket.getEmptyConfiguration();
|
||||||
rocket.setSelectedConfiguration(config.getId());
|
rocket.setSelectedConfiguration(config.getId());
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ public class MassCalculatorTest extends BaseTestCase {
|
|||||||
double boosterMOI_xx = structure.getRotationalInertia();
|
double boosterMOI_xx = structure.getRotationalInertia();
|
||||||
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
assertEquals(" Booster x-axis MOI is incorrect: ", expMOI_axial, boosterMOI_xx, EPSILON);
|
||||||
|
|
||||||
final double expMOI_tr = 0.047289449862727435;
|
final double expMOI_tr = 0.04244299775219597;
|
||||||
double boosterMOI_tr = structure.getLongitudinalInertia();
|
double boosterMOI_tr = structure.getLongitudinalInertia();
|
||||||
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
assertEquals(" Booster transverse MOI is incorrect: ", expMOI_tr, boosterMOI_tr, EPSILON);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user