# Fix .eng number format
authorBill Kuker <bkuker@billkuker.com>
Sun, 26 Jun 2011 22:02:49 +0000 (22:02 +0000)
committerBill Kuker <bkuker@billkuker.com>
Sun, 26 Jun 2011 22:02:49 +0000 (22:02 +0000)
# Add small dummy mass so total weight > fuel weight in .eng files

src/com/billkuker/rocketry/motorsim/io/ENGExporter.java

index 1a9f273c1b8daf9c4060c3571ba1ade19e38650f..ce3250057faf2e2acf2b1883b36bb0108d5dca2a 100644 (file)
@@ -34,7 +34,7 @@ public class ENGExporter {
 
                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 {