Add check for open airframe forward end

Also, it turned out the discontinuity check didn't correctly check across stages (so it wouldn't notice if the aft end of one state wasn't the same as the forward end of the next).  Fixed.
This commit is contained in:
JoePfeiffer 2022-12-28 11:01:54 -07:00
parent 30cedd9215
commit d0c19efd3d
3 changed files with 13 additions and 9 deletions

View File

@ -1849,6 +1849,7 @@ PlotConfiguration.Groundtrack = Ground track
Warning.LargeAOA.str1 = Large angle of attack encountered.
Warning.LargeAOA.str2 = Large angle of attack encountered (
Warning.DISCONTINUITY = Discontinuity in rocket body diameter
Warning.OPEN_AIRFRAME_FORWARD = Forward end of airframe is open (radius is > 0)
Warning.THICK_FIN = Thick fins may not simulate accurately.
Warning.JAGGED_EDGED_FIN = Jagged-edged fin predictions may be inaccurate.
Warning.LISTENERS_AFFECTED = Listeners modified the flight simulation

View File

@ -44,7 +44,6 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
private double cacheDiameter = -1;
private double cacheLength = -1;
public BarrowmanCalculator() {
}
@ -299,14 +298,16 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
}
SymmetricComponent sym = (SymmetricComponent) comp;
prevComp = sym.getPreviousSymmetricComponent();
if( null == prevComp){
prevComp = sym;
continue;
}
// Check for radius discontinuity
if ( !MathUtil.equals(sym.getForeRadius(), prevComp.getAftRadius())) {
warnings.add( Warning.DIAMETER_DISCONTINUITY, sym + ", " + prevComp);
if (sym.getForeRadius() - sym.getThickness() > MathUtil.EPSILON) {
warnings.add(Warning.OPEN_AIRFRAME_FORWARD, sym.toString());
}
} else {
// Check for radius discontinuity
if ( !MathUtil.equals(sym.getForeRadius(), prevComp.getAftRadius())) {
warnings.add( Warning.DIAMETER_DISCONTINUITY, sym + ", " + prevComp);
}
}
// double x = component.toAbsolute(Coordinate.NUL)[0].x;
@ -318,7 +319,6 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
//}
//componentX = component.toAbsolute(new Coordinate(component.getLengthAerodynamic()))[0].x;
prevComp = sym;
}else if( comp instanceof ComponentAssembly ){
checkGeometry(configuration, comp, warnings);
}

View File

@ -358,6 +358,9 @@ public abstract class Warning {
/** A <code>Warning</code> that the body diameter is discontinuous. */
////Discontinuity in rocket body diameter.
public static final Warning DIAMETER_DISCONTINUITY = new Other(trans.get("Warning.DISCONTINUITY"));
/** A <code>Warning</code> that a ComponentAssembly has an open forward end */
public static final Warning OPEN_AIRFRAME_FORWARD = new Other(trans.get("Warning.OPEN_AIRFRAME_FORWARD"));
/** A <code>Warning</code> that the fins are thick compared to the rocket body. */
////Thick fins may not be modeled accurately.