# Fix .eng number format
[sw/motorsim] / src / com / billkuker / rocketry / motorsim / io / ENGExporter.java
index 17ff7fc71d38a624021a9ae957eaa39299d5f8ed..ce3250057faf2e2acf2b1883b36bb0108d5dca2a 100644 (file)
@@ -15,8 +15,8 @@ import javax.measure.unit.SI;
 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 {
 
@@ -32,9 +32,9 @@ 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.###");
+               NumberFormat nf = new DecimalFormat("0.####");
 
                StringBuffer out = new StringBuffer();
 
@@ -54,7 +54,7 @@ public class ENGExporter {
                double wt = prop.doubleValue(SI.KILOGRAM);
 
                out.append(nf.format(dia) + " " + nf.format(len) + " 0-0-0 "
-                               + nf.format(wt) + " " + nf.format(wt) + " MF\n");
+                               + nf.format(wt) + " " + nf.format(wt + 0.1) + " MF\n");
 
                GraphSimplifier<Duration, Force> gs = null;
                try {