[Fixes 679]

Remove extra multiplication by finCount in FinSet:getLongitudinalUnitInertia() and FinSet:getRotationalUnitInertia()

Restore check for single fin before transfering to center of fin set in FinSet:getRotationalUnitInertia()
This commit is contained in:
JoePfeiffer 2020-06-24 15:48:44 -06:00
parent 43d6779e12
commit fc393d499e

View File

@ -670,14 +670,14 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
h2 = h * singlePlanformArea / w;
}
double inertia = (h2 + 2 * w2) / 24;
final double inertia = (h2 + 2 * w2) / 24;
if (finCount == 1)
return inertia;
final double rFront = this.getFinFront().y;
return finCount * (inertia + MathUtil.pow2(MathUtil.safeSqrt(h2) + rFront));
return inertia + MathUtil.pow2(MathUtil.safeSqrt(h2) + rFront);
}
@ -707,9 +707,14 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
h = MathUtil.safeSqrt(h * singlePlanformArea/ w);
}
final double inertia = h * h / 12;
if (finCount == 1)
return inertia;
final double rFront = this.getFinFront().y;
return finCount * (h * h / 12 + MathUtil.pow2(h / 2 + rFront));
return inertia + MathUtil.pow2(h / 2 + rFront);
}