Check that next symmetric component, if non-null, is active

This commit is contained in:
JoePfeiffer 2020-09-30 20:40:28 -06:00
parent 796d245bbe
commit 0381be91ca

View File

@ -672,7 +672,9 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
// if I'm the last component, set my base CD
// note: the iterator *should* serve up the next component.... buuuut ....
// this code has is tested, and there's no compelling reason to change.
if (s.getNextSymmetricComponent() == null) {
final SymmetricComponent n = s.getNextSymmetricComponent();
if ((n == null) ||
!configuration.isStageActive(n.getStageNumber())) {
double area = Math.PI * pow2(s.getAftRadius());
double cd = base * area / conditions.getRefArea();
total += cd;