Adjust calculation of axial length (for fineness friction adjustment) to be from tip of rocket to aft-most axial component instead of simply adding all axial component lengths together. Necessary so body tubes on pods don't add to length incorrectly.
TODO: I suspect we actually ought to be calculating the fineness of the tubes on each pod and adjusting friction on each of them accordinging.
This commit is contained in:
parent
5e5ce3d06e
commit
9845decb20
@ -388,7 +388,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
|
|
||||||
double finFriction = 0;
|
double finFriction = 0;
|
||||||
double bodyFriction = 0;
|
double bodyFriction = 0;
|
||||||
double maxR = 0, len = 0;
|
double maxR = 0, minX = Double.MAX_VALUE, maxX = 0;
|
||||||
|
|
||||||
double[] roughnessLimited = new double[Finish.values().length];
|
double[] roughnessLimited = new double[Finish.values().length];
|
||||||
Arrays.fill(roughnessLimited, Double.NaN);
|
Arrays.fill(roughnessLimited, Double.NaN);
|
||||||
@ -454,10 +454,14 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
/ conditions.getRefArea());
|
/ conditions.getRefArea());
|
||||||
}
|
}
|
||||||
|
|
||||||
double r = Math.max(s.getForeRadius(), s.getAftRadius());
|
final double componentMinX = context.getLocation().x;
|
||||||
if (r > maxR)
|
minX = Math.min(minX, componentMinX);
|
||||||
maxR = r;
|
|
||||||
len += c.getLength();
|
final double componentMaxX = componentMinX + c.getLength();
|
||||||
|
maxX = Math.max(maxX, componentMaxX);
|
||||||
|
|
||||||
|
final double componentMaxR = Math.max(s.getForeRadius(), s.getAftRadius());
|
||||||
|
maxR = Math.max(maxR, componentMaxR);
|
||||||
|
|
||||||
} else if (c instanceof FinSet) {
|
} else if (c instanceof FinSet) {
|
||||||
|
|
||||||
@ -477,7 +481,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fB may be POSITIVE_INFINITY, but that's ok for us
|
// fB may be POSITIVE_INFINITY, but that's ok for us
|
||||||
double fB = (len + 0.0001) / maxR;
|
double fB = (maxX - minX + 0.0001) / maxR;
|
||||||
double correction = (1 + 1.0 / (2 * fB));
|
double correction = (1 + 1.0 / (2 * fB));
|
||||||
|
|
||||||
// Correct body data in map
|
// Correct body data in map
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user