diff --git a/core/build.xml b/core/build.xml index cd46194e5..9252b6bc6 100644 --- a/core/build.xml +++ b/core/build.xml @@ -59,7 +59,7 @@ - + diff --git a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSet.java b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSet.java index 8c9f8f964..fc9a0e24c 100644 --- a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSet.java +++ b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSet.java @@ -158,15 +158,9 @@ public class ThrustCurveMotorSet implements Comparable { if (!simplifiedDesignation.equalsIgnoreCase(simplifyDesignation(m.getDesignation()))) return false; - if (!designation.equalsIgnoreCase(m.getDesignation())) - return false; - if (caseInfo != null && !caseInfo.equalsIgnoreCase(m.getCaseInfo())) return false; - if (available != m.isAvailable()) - return false; - return true; } diff --git a/core/src/net/sf/openrocket/masscalc/MassCalculator.java b/core/src/net/sf/openrocket/masscalc/MassCalculator.java index f39bab384..5a0ffa7b9 100644 --- a/core/src/net/sf/openrocket/masscalc/MassCalculator.java +++ b/core/src/net/sf/openrocket/masscalc/MassCalculator.java @@ -34,7 +34,7 @@ public class MassCalculator implements Monitorable { //private static final Logger log = LoggerFactory.getLogger(MassCalculator.class); - public boolean debug=false; + public boolean debug=true; public static final double MIN_MASS = 0.001 * MathUtil.EPSILON; diff --git a/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java b/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java index e78edc061..ac4b37a6b 100644 --- a/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java +++ b/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java @@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.Coordinate; +import net.sf.openrocket.util.Inertia; import net.sf.openrocket.util.MathUtil; public class ThrustCurveMotor implements Motor, Comparable, Serializable { @@ -46,7 +47,6 @@ public class ThrustCurveMotor implements Motor, Comparable, Se private String propellantInfo; private double initialMass; - private double propellantMass; private double maxThrust; private double burnTimeEstimate; private double averageThrust; @@ -130,11 +130,6 @@ public class ThrustCurveMotor implements Motor, Comparable, Se return this; } - public Builder setPropellantMass(double v) { - motor.propellantMass = v; - return this; - } - public Builder setStandardDelays(double[] d) { motor.delays = d; return this; @@ -215,7 +210,9 @@ public class ThrustCurveMotor implements Motor, Comparable, Se throw new IllegalArgumentException("Illegal motor type=" + motor.type); } - + motor.unitRotationalInertia = Inertia.filledCylinderRotational( motor.diameter / 2); + motor.unitLongitudinalInertia = Inertia.filledCylinderLongitudinal( motor.diameter / 2, motor.length); + motor.computeStatistics(); return motor; @@ -555,7 +552,7 @@ public class ThrustCurveMotor implements Motor, Comparable, Se } public double getPropellantMass(){ - return propellantMass; + return (getLaunchMass() - getBurnoutMass()); } @Override diff --git a/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java b/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java index 87afda839..e43d1a3a0 100644 --- a/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java +++ b/core/src/net/sf/openrocket/thrustcurve/SerializeThrustcurveMotors.java @@ -126,7 +126,7 @@ public class SerializeThrustcurveMotors { builder.setInitialMass(mi.getTot_mass_g() / 1000.0); } if (mi.getProp_mass_g() != null) { - builder.setPropellantMass(mi.getProp_mass_g() / 1000.0); +// builder.setPropellantMass(mi.getProp_mass_g() / 1000.0); } builder.setCaseInfo(mi.getCase_info());