Fixed computation of Logitudinal Unit Inertia for tube like things.

This commit is contained in:
kruland2607 2014-11-12 09:12:56 -06:00
parent fcd3220633
commit b93926ec4b
2 changed files with 21 additions and 21 deletions

View File

@ -281,8 +281,8 @@ public class BodyTube extends SymmetricComponent implements MotorMount, Coaxial
@Override @Override
public double getLongitudinalUnitInertia() { public double getLongitudinalUnitInertia() {
// 1/12 * (3 * (r1^2 + r2^2) + h^2) // 1/12 * (3 * (r2^2 + r1^2) + h^2)
return (3 * (MathUtil.pow2(getInnerRadius())) + MathUtil.pow2(getOuterRadius()) + MathUtil.pow2(getLength())) / 12; return (3 * (MathUtil.pow2(getOuterRadius()) + MathUtil.pow2(getInnerRadius())) + MathUtil.pow2(getLength())) / 12;
} }
@Override @Override

View File

@ -211,8 +211,8 @@ public class LaunchLug extends ExternalComponent implements Coaxial {
@Override @Override
public double getLongitudinalUnitInertia() { public double getLongitudinalUnitInertia() {
// 1/12 * (3 * (r1^2 + r2^2) + h^2) // 1/12 * (3 * (r2^2 + r1^2) + h^2)
return (3 * (MathUtil.pow2(getInnerRadius())) + MathUtil.pow2(getOuterRadius()) + MathUtil.pow2(getLength())) / 12; return (3 * (MathUtil.pow2(getOuterRadius()) + MathUtil.pow2(getInnerRadius())) + MathUtil.pow2(getLength())) / 12;
} }
@Override @Override