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:
parent
30cedd9215
commit
d0c19efd3d
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -359,6 +359,9 @@ public abstract class Warning {
|
||||
////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.
|
||||
public static final Warning THICK_FIN = new Other(trans.get("Warning.THICK_FIN"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user