From 7e5ab5de32a954b3653d38473bd1d8326fd35f42 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 28 Jul 2018 10:47:00 -0400 Subject: [PATCH] [fix] Revert patch 6289aef0... which introduced simulation anomalies --- .../net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java | 4 ++-- core/test/net/sf/openrocket/aerodynamics/FinSetCalcTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java b/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java index 156eea790..36b065ac6 100644 --- a/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java +++ b/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java @@ -77,7 +77,7 @@ public class FinSetCalc extends RocketComponentCalc { } /* - * Calculates the non-axial forces produced by *one* *instance* of the fins. + * Calculates the non-axial forces produced by each set of fins. * (normal and side forces, pitch, yaw and roll moments, CP position, CNa). */ @Override @@ -124,7 +124,7 @@ public class FinSetCalc extends RocketComponentCalc { cna = cna1 * mul; } else { // Basic CNa assuming full efficiency - cna = cna1 / 2.0; + cna = cna1 * finCount / 2.0; } // logger.debug("Component cna = {}", cna); diff --git a/core/test/net/sf/openrocket/aerodynamics/FinSetCalcTest.java b/core/test/net/sf/openrocket/aerodynamics/FinSetCalcTest.java index 0894d9c4a..7eb12199f 100644 --- a/core/test/net/sf/openrocket/aerodynamics/FinSetCalcTest.java +++ b/core/test/net/sf/openrocket/aerodynamics/FinSetCalcTest.java @@ -63,7 +63,7 @@ public class FinSetCalcTest { double exp_cna_fins = 24.146933; double exp_cpx_fins = 0.0193484; - assertEquals(" FinSetCalc produces bad CNa: ", exp_cna_fins, forces.getCNa()*fins.getInstanceCount(), EPSILON); + assertEquals(" FinSetCalc produces bad CNa: ", exp_cna_fins, forces.getCNa(), EPSILON); assertEquals(" FinSetCalc produces bad C_p.x: ", exp_cpx_fins, forces.getCP().x, EPSILON); assertEquals(" FinSetCalc produces bad CN: ", 0.0, forces.getCN(), EPSILON); assertEquals(" FinSetCalc produces bad C_m: ", 0.0, forces.getCm(), EPSILON); @@ -97,7 +97,7 @@ public class FinSetCalcTest { double exp_cna_fins = 32.195911; double exp_cpx_fins = 0.0193484; - assertEquals(" FinSetCalc produces bad CNa: ", exp_cna_fins, forces.getCNa()*fins.getFinCount(), EPSILON); + assertEquals(" FinSetCalc produces bad CNa: ", exp_cna_fins, forces.getCNa(), EPSILON); assertEquals(" FinSetCalc produces bad C_p.x: ", exp_cpx_fins, forces.getCP().x, EPSILON); assertEquals(" FinSetCalc produces bad CN: ", 0.0, forces.getCN(), EPSILON); assertEquals(" FinSetCalc produces bad C_m: ", 0.0, forces.getCm(), EPSILON);