From 9f1363535742ffafe21a5358d3e509d3086f53cb Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 13 Dec 2023 08:42:05 -0700 Subject: [PATCH] Moved calculation of all body tube properties into BodyTube instead of punting some to SymmetricComponent. This is both a little faster and will let me compare the results from the two in unit tests. --- .../net/sf/openrocket/rocketcomponent/BodyTube.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java b/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java index e8215e2c9..8750cd132 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java +++ b/core/src/net/sf/openrocket/rocketcomponent/BodyTube.java @@ -328,8 +328,15 @@ public class BodyTube extends SymmetricComponent implements BoxBounded, MotorMou return (MathUtil.pow2(getInnerRadius()) + MathUtil.pow2(getOuterRadius())) / 2; } - - + @Override + public double getComponentWetArea() { + return Math.PI * getOuterRadius() * 2 * getLength(); + } + + @Override + public double getComponentPlanformArea() { + return getOuterRadius() * 2 * getLength(); + } /** * Helper function for cylinder volume.