From: Bill Kuker Date: Sun, 26 Jun 2011 22:02:49 +0000 (+0000) Subject: # Fix .eng number format X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=852011e835ca8f6d0e61c6819b8c29faf437e5ac;p=sw%2Fmotorsim # Fix .eng number format # Add small dummy mass so total weight > fuel weight in .eng files --- diff --git a/src/com/billkuker/rocketry/motorsim/io/ENGExporter.java b/src/com/billkuker/rocketry/motorsim/io/ENGExporter.java index 1a9f273..ce32500 100644 --- a/src/com/billkuker/rocketry/motorsim/io/ENGExporter.java +++ b/src/com/billkuker/rocketry/motorsim/io/ENGExporter.java @@ -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 gs = null; try {