Modified unit test expected results to match corrected fin MOI.

testAlphaIIIStructure
    Three fins in finset, so Ixx and Iyy are reduced by a factor of 3
    Ixx reduced from 5.2771946530250825E-5 to 1.7590648843416942E-5
    Iyy reduced from 1.3580770106050167E-4 to 4.526923368683389E-5

    Total rocket MOI changed to Ir=1.8763734635622462E-5 and
    It=2.1238394331365588E-4

testFalcon9HComponentMOI
    Three fins in finset, so
    finset rotational MOI  changed from 0.00413298 to 0.001377661595723823
    finset longitudinal MOI changed from 0.01215133 to 0.004050443797127646

testFalcon9HeavyBoosterLaunchMOIs
    Two finsets, each three fins.  Each finset's MOI are reduced as in
    testFalcon9HComponentMOI, resulting in change to totals
    Ir=0.013480523485489424, It=0.07017476021288252

testFalcon9HeavyBoosterSpentMOIs
    Two finsets, each three fins, as above
    Ir=0.010420016485489425, It=0.06398514917026163

testFalcon9HeavyBoosterStageMassOverride
    Two finsets, each three fins, as above
    Ir=0.007100144485489424, It=16.030625168315694

testFalcon9HeavyComponentCMxOverride
    Two finsets, each three fins, as above
    Ir=0.007100144485489424, It=0.047289449862727435

testFalcon9HeavyComponentMassOverride
    Two finsets, each three fins, as above
    Ir=0.026027963480146098, It=0.35928666329363634
This commit is contained in:
JoePfeiffer 2020-06-29 11:32:31 -06:00
parent fc393d499e
commit 87c26cccf4

View File

@ -45,8 +45,8 @@ public class MassCalculatorTest extends BaseTestCase {
assertEquals("Simple Rocket CM is incorrect: ", expCM, actualRocketDryCM); assertEquals("Simple Rocket CM is incorrect: ", expCM, actualRocketDryCM);
double expMOIrot = 5.394503232245634E-5; double expMOIrot = 1.8763734635622462E-5;
double expMOIlong = 3.029224106873237E-4; double expMOIlong = 2.1238394331365588E-4;
double actualMOIrot = actualStructure.getRotationalInertia(); double actualMOIrot = actualStructure.getRotationalInertia();
double actualMOIlong = actualStructure.getLongitudinalInertia(); double actualMOIlong = actualStructure.getLongitudinalInertia();
@ -442,10 +442,10 @@ public class MassCalculatorTest extends BaseTestCase {
assertEquals(cc.getName() + " Longitudinal MOI calculated incorrectly: ", expInertia, compInertia, EPSILON); assertEquals(cc.getName() + " Longitudinal MOI calculated incorrectly: ", expInertia, compInertia, EPSILON);
final FinSet boosterFins = (FinSet) boosters.getChild(1).getChild(1); final FinSet boosterFins = (FinSet) boosters.getChild(1).getChild(1);
expInertia = 0.00413298; 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.01215133; expInertia = 0.004050443797127646;
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);
@ -668,11 +668,11 @@ public class MassCalculatorTest extends BaseTestCase {
RigidBody spent = MassCalculator.calculateBurnout(config); RigidBody spent = MassCalculator.calculateBurnout(config);
double expMOIRotational = 0.01593066; double expMOIRotational = 0.010420016485489425;
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.08018692435877221; double expMOI_tr = 0.06398514917026163;
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);
} }
@ -688,9 +688,9 @@ public class MassCalculatorTest extends BaseTestCase {
RigidBody launchData = MassCalculator.calculateLaunch(config); RigidBody launchData = MassCalculator.calculateLaunch(config);
final double expIxx = 0.01899116; final double expIxx = 0.013480523485489424;
final double actIxx = launchData.getRotationalInertia(); final double actIxx = launchData.getRotationalInertia();
final double expIyy = 0.08637653; final double expIyy = 0.07017476021288252;
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);
@ -731,11 +731,11 @@ public class MassCalculatorTest extends BaseTestCase {
assertEquals(" Booster Launch CM is incorrect: ", expCM, boosterSetCM); assertEquals(" Booster Launch CM is incorrect: ", expCM, boosterSetCM);
// Validate MOI // Validate MOI
double expMOI_axial = 0.01261079; double expMOI_axial = 0.007100144485489424;
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.046826943504207; double expMOI_tr = 16.030625168315694;
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);
} }
@ -785,11 +785,11 @@ public class MassCalculatorTest extends BaseTestCase {
assertEquals(" Booster Launch CM is incorrect: ", expCM, boosterCM); assertEquals(" Booster Launch CM is incorrect: ", expCM, boosterCM);
// Validate MOI // Validate MOI
double expMOI_axial = 0.031538609; double expMOI_axial = 0.026027963480146098;
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.37548843; double expMOI_tr = 0.35928666329363634;
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);
} }
@ -832,11 +832,11 @@ public class MassCalculatorTest extends BaseTestCase {
assertEquals(" Booster Launch CM is incorrect: ", expCM, structure.getCM()); assertEquals(" Booster Launch CM is incorrect: ", expCM, structure.getCM());
// Validate MOI // Validate MOI
final double expMOI_axial = 0.012610790; final double expMOI_axial = 0.007100144485489424;
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.063491225; final double expMOI_tr = 0.047289449862727435;
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);
} }