load/save optimum delay time
This commit is contained in:
parent
2759711950
commit
03a6e614b8
@ -401,6 +401,8 @@ public class OpenRocketSaver extends RocketSaver {
|
||||
str += " launchrodvelocity=\"" + TextUtil.doubleToString(data.getLaunchRodVelocity()) + "\"";
|
||||
if (!Double.isNaN(data.getDeploymentVelocity()))
|
||||
str += " deploymentvelocity=\"" + TextUtil.doubleToString(data.getDeploymentVelocity()) + "\"";
|
||||
if (!Double.isNaN(data.getOptimumDelay()))
|
||||
str += " optimumdelay=\"" + TextUtil.doubleToString(data.getOptimumDelay()) + "\"";
|
||||
str += ">";
|
||||
writeln(str);
|
||||
indent++;
|
||||
|
@ -104,6 +104,7 @@ class FlightDataHandler extends AbstractElementHandler {
|
||||
double groundHitVelocity = Double.NaN;
|
||||
double launchRodVelocity = Double.NaN;
|
||||
double deploymentVelocity = Double.NaN;
|
||||
double optimumDelay = Double.NaN;
|
||||
|
||||
try {
|
||||
maxAltitude = DocumentConfig.stringToDouble(attributes.get("maxaltitude"));
|
||||
@ -142,9 +143,13 @@ class FlightDataHandler extends AbstractElementHandler {
|
||||
deploymentVelocity = DocumentConfig.stringToDouble(attributes.get("deploymentvelocity"));
|
||||
} catch (NumberFormatException ignore) {
|
||||
}
|
||||
try {
|
||||
optimumDelay = DocumentConfig.stringToDouble(attributes.get("optimumdelay"));
|
||||
} catch (NumberFormatException ignore) {
|
||||
}
|
||||
|
||||
data = new FlightData(maxAltitude, maxVelocity, maxAcceleration, maxMach,
|
||||
timeToApogee, flightTime, groundHitVelocity, launchRodVelocity, deploymentVelocity);
|
||||
timeToApogee, flightTime, groundHitVelocity, launchRodVelocity, deploymentVelocity, optimumDelay);
|
||||
}
|
||||
|
||||
data.getWarningSet().addAll(warningSet);
|
||||
|
Loading…
x
Reference in New Issue
Block a user