diff --git a/core/src/net/sf/openrocket/aerodynamics/barrowman/SymmetricComponentCalc.java b/core/src/net/sf/openrocket/aerodynamics/barrowman/SymmetricComponentCalc.java index 8d2634959..b5965b2ee 100644 --- a/core/src/net/sf/openrocket/aerodynamics/barrowman/SymmetricComponentCalc.java +++ b/core/src/net/sf/openrocket/aerodynamics/barrowman/SymmetricComponentCalc.java @@ -18,7 +18,8 @@ import net.sf.openrocket.util.MathUtil; import net.sf.openrocket.util.PolyInterpolator; import net.sf.openrocket.util.Transformation; - +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Calculates the aerodynamic properties of a SymmetricComponent. @@ -32,6 +33,8 @@ import net.sf.openrocket.util.Transformation; */ public class SymmetricComponentCalc extends RocketComponentCalc { + private final static Logger log = LoggerFactory.getLogger(SymmetricComponentCalc.class); + public static final double BODY_LIFT_K = 1.1; private final double length; @@ -375,7 +378,16 @@ public class SymmetricComponentCalc extends RocketComponentCalc { interpolator.addPoint(m, stag * Math.pow(int1.getValue(m) / stag, log4)); } } - + + // dump transonic/supersonic knots, in a format easily imported into python + String vel = "vel = [ "; + String cd = "cd = [ "; + for (double m : interpolator.getXPoints()) { + vel = vel + m + ", "; + cd = cd + interpolator.getValue(m) + ", "; + } + log.debug(vel + "]"); + log.debug(cd + "]"); /* * Now the transonic/supersonic region is ok. We still need to interpolate @@ -391,6 +403,9 @@ public class SymmetricComponentCalc extends RocketComponentCalc { double cdMach0 = 0.8 * pow2(sinphi); double minDeriv = (interpolator.getValue(min + 0.01) - minValue) / 0.01; + + log.debug("cdMach0 = " + cdMach0); + log.debug("minDeriv = " + minDeriv); // These should not occur, but might cause havoc for the interpolation if ((cdMach0 >= minValue - 0.01) || (minDeriv <= 0.01)) { diff --git a/swing/resources/datafiles/presets/system.ser b/swing/resources/datafiles/presets/system.ser index 33648114c..28a7bbe93 100644 Binary files a/swing/resources/datafiles/presets/system.ser and b/swing/resources/datafiles/presets/system.ser differ