\r
import org.jscience.physics.amount.Amount;\r
\r
-public class CylindricalChamber implements Chamber {\r
+public class CylindricalChamber implements Chamber, ICylindricalChamber {\r
\r
private Amount<Length> length = Amount.valueOf(200, SI.MILLIMETER);\r
private Amount<Length> oD = Amount.valueOf(31, SI.MILLIMETER);\r
--- /dev/null
+package com.billkuker.rocketry.motorsim;\r
+\r
+import javax.measure.quantity.Length;\r
+\r
+import org.jscience.physics.amount.Amount;\r
+\r
+public interface ICylindricalChamber {\r
+ public Amount<Length> getLength();\r
+\r
+\r
+ public Amount<Length> getID();\r
+\r
+ \r
+ public Amount<Length> getOD();\r
+}\r
\r
import com.billkuker.rocketry.motorsim.Chamber;\r
import com.billkuker.rocketry.motorsim.CylindricalChamber;\r
+import com.billkuker.rocketry.motorsim.ICylindricalChamber;\r
import com.billkuker.rocketry.motorsim.RocketScience;\r
\r
-public class Schedule40 implements Chamber {\r
+public class Schedule40 implements Chamber, ICylindricalChamber {\r
public static enum Size { \r
\r
//Dimensions: http://www.harvel.com/pipepvc-sch40-80-dim.asp\r
\r
import com.billkuker.rocketry.motorsim.Chamber;\r
import com.billkuker.rocketry.motorsim.CylindricalChamber;\r
+import com.billkuker.rocketry.motorsim.ICylindricalChamber;\r
import com.billkuker.rocketry.motorsim.RocketScience;\r
\r
-public class Schedule80 implements Chamber {\r
+public class Schedule80 implements Chamber, ICylindricalChamber {\r
public static enum Size { \r
\r
//Dimensions: http://www.harvel.com/pipepvc-sch40-80-dim.asp\r
import org.jscience.physics.amount.Amount;
import com.billkuker.rocketry.motorsim.Burn;
-import com.billkuker.rocketry.motorsim.CylindricalChamber;
import com.billkuker.rocketry.motorsim.GraphSimplifier;
+import com.billkuker.rocketry.motorsim.ICylindricalChamber;
public class ENGExporter {
public static void export(Burn b, OutputStream os) throws IOException {
- CylindricalChamber cha = (CylindricalChamber) b.getMotor().getChamber();
+ ICylindricalChamber cha = (ICylindricalChamber) b.getMotor().getChamber();
NumberFormat nf = new DecimalFormat("00.####");