commit
1448cde5aa
@ -6,6 +6,6 @@ addons:
|
|||||||
packages:
|
packages:
|
||||||
- ant-optional
|
- ant-optional
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk7
|
- openjdk8
|
||||||
script:
|
script:
|
||||||
- "ant -buildfile build.xml clean check jar unittest"
|
- "ant -buildfile build.xml clean check jar unittest"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
|
|||||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<mkdir dir="${classes.dir}"/>
|
<mkdir dir="${classes.dir}"/>
|
||||||
<echo level="info">Compiling main classes</echo>
|
<echo level="info">Compiling main classes</echo>
|
||||||
<javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" source="1.7" target="1.7"/>
|
<javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" source="1.8" target="1.8"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Executible Eclipse-Jar-In-Jar style JAR -->
|
<!-- Executible Eclipse-Jar-In-Jar style JAR -->
|
||||||
|
@ -37,7 +37,6 @@ RocketActions.EditAct.Edit = Edit
|
|||||||
RocketActions.EditAct.ttip.Edit = Edit the selected component.
|
RocketActions.EditAct.ttip.Edit = Edit the selected component.
|
||||||
RocketActions.NewStageAct.Newstage = New stage
|
RocketActions.NewStageAct.Newstage = New stage
|
||||||
RocketActions.NewStageAct.ttip.Newstage = Add a new stage to the rocket design.
|
RocketActions.NewStageAct.ttip.Newstage = Add a new stage to the rocket design.
|
||||||
RocketActions.ActBoosterstage = Booster stage
|
|
||||||
RocketActions.MoveUpAct.Moveup = Move up
|
RocketActions.MoveUpAct.Moveup = Move up
|
||||||
RocketActions.MoveUpAct.ttip.Moveup = Move this component upwards.
|
RocketActions.MoveUpAct.ttip.Moveup = Move this component upwards.
|
||||||
RocketActions.MoveDownAct.Movedown = Move down
|
RocketActions.MoveDownAct.Movedown = Move down
|
||||||
@ -335,7 +334,7 @@ generalprefs.lbl.languageEffect = The language will change the next time you sta
|
|||||||
! Simulation edit dialog
|
! Simulation edit dialog
|
||||||
simedtdlg.but.runsimulation = Run simulation
|
simedtdlg.but.runsimulation = Run simulation
|
||||||
simedtdlg.but.resettodefault = Reset to default
|
simedtdlg.but.resettodefault = Reset to default
|
||||||
simedtdlg.but.savedefault = Save as default
|
simedtdlg.but.savedefault = Save as default
|
||||||
simedtdlg.but.add = Add
|
simedtdlg.but.add = Add
|
||||||
simedtdlg.but.remove = Remove
|
simedtdlg.but.remove = Remove
|
||||||
simedtdlg.title.Editsim = Edit simulation
|
simedtdlg.title.Editsim = Edit simulation
|
||||||
@ -823,9 +822,6 @@ RocketCfg.lbl.Comments = Comments:
|
|||||||
RocketCfg.lbl.Revisionhistory = Revision history:
|
RocketCfg.lbl.Revisionhistory = Revision history:
|
||||||
RocketCfg.lbl.Material = Material:
|
RocketCfg.lbl.Material = Material:
|
||||||
|
|
||||||
! ShockCordConfig
|
|
||||||
ShockCordCfg.lbl.Shockcordlength = Shock cord length:
|
|
||||||
|
|
||||||
! RocketComponentConfig
|
! RocketComponentConfig
|
||||||
RocketCompCfg.lbl.Componentname = Component name:
|
RocketCompCfg.lbl.Componentname = Component name:
|
||||||
RocketCompCfg.ttip.Thecomponentname = The component name.
|
RocketCompCfg.ttip.Thecomponentname = The component name.
|
||||||
@ -1037,13 +1033,11 @@ NoseConeCfg.tab.ttip.Shoulder = Shoulder properties
|
|||||||
! ParachuteConfig
|
! ParachuteConfig
|
||||||
ParachuteCfg.lbl.Canopy = Canopy:
|
ParachuteCfg.lbl.Canopy = Canopy:
|
||||||
ParachuteCfg.lbl.Diameter = Diameter:
|
ParachuteCfg.lbl.Diameter = Diameter:
|
||||||
ParachuteCfg.lbl.Material = Material:
|
|
||||||
ParachuteCfg.combo.MaterialModel = The component material affects the weight of the component.
|
ParachuteCfg.combo.MaterialModel = The component material affects the weight of the component.
|
||||||
ParachuteCfg.lbl.longA1 = <html>Drag coefficient C<sub>D</sub>:
|
ParachuteCfg.lbl.longA1 = <html>Drag coefficient C<sub>D</sub>:
|
||||||
ParachuteCfg.lbl.longB1 = <html>The drag coefficient relative to the total area of the parachute.<br>
|
ParachuteCfg.lbl.longB1 = <html>The drag coefficient relative to the total area of the parachute.<br>
|
||||||
ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate.
|
ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate.
|
||||||
ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8.
|
ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8.
|
||||||
ParachuteCfg.but.Reset = Reset
|
|
||||||
ParachuteCfg.lbl.Shroudlines = Shroud lines:
|
ParachuteCfg.lbl.Shroudlines = Shroud lines:
|
||||||
ParachuteCfg.lbl.Numberoflines = Number of lines:
|
ParachuteCfg.lbl.Numberoflines = Number of lines:
|
||||||
ParachuteCfg.lbl.Linelength = Line length:
|
ParachuteCfg.lbl.Linelength = Line length:
|
||||||
@ -1571,7 +1565,7 @@ FlightEvent.Type.GROUND_HIT = Ground hit
|
|||||||
FlightEvent.Type.SIMULATION_END = Simulation end
|
FlightEvent.Type.SIMULATION_END = Simulation end
|
||||||
FlightEvent.Type.ALTITUDE = Altitude change
|
FlightEvent.Type.ALTITUDE = Altitude change
|
||||||
FlightEvent.Type.TUMBLE = Tumbling
|
FlightEvent.Type.TUMBLE = Tumbling
|
||||||
FlightEvent.Type.EXCEPTION = Exception
|
FlightEvent.Type.EXCEPTION = Exception
|
||||||
|
|
||||||
! ThrustCurveMotorColumns
|
! ThrustCurveMotorColumns
|
||||||
TCurveMotorCol.MANUFACTURER = Manufacturer
|
TCurveMotorCol.MANUFACTURER = Manufacturer
|
||||||
|
@ -463,10 +463,11 @@ public class FlightConfiguration implements FlightConfigurableParameter<FlightCo
|
|||||||
* @return the new configuration
|
* @return the new configuration
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public FlightConfiguration copy( final FlightConfigurationId copyId ) {
|
public FlightConfiguration copy( final FlightConfigurationId newId ) {
|
||||||
// Note the stages are updated in the constructor call.
|
// Note the stages are updated in the constructor call.
|
||||||
FlightConfiguration copy= new FlightConfiguration( this.rocket, copyId );
|
FlightConfiguration copy= new FlightConfiguration( this.rocket, newId );
|
||||||
|
final FlightConfigurationId copyId = copy.getId();
|
||||||
|
|
||||||
// copy motor instances.
|
// copy motor instances.
|
||||||
for( final MotorConfiguration sourceMotor: motors.values() ){
|
for( final MotorConfiguration sourceMotor: motors.values() ){
|
||||||
MotorConfiguration cloneMotor = sourceMotor.copy( copyId);
|
MotorConfiguration cloneMotor = sourceMotor.copy( copyId);
|
||||||
|
@ -128,7 +128,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
if (nextEvent != null) {
|
if (nextEvent != null) {
|
||||||
maxStepTime = MathUtil.max(nextEvent.getTime() - currentStatus.getSimulationTime(), 0.001);
|
maxStepTime = MathUtil.max(nextEvent.getTime() - currentStatus.getSimulationTime(), 0.001);
|
||||||
}
|
}
|
||||||
log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime());
|
log.trace("Taking simulation step at t=" + currentStatus.getSimulationTime() + " altitude " + oldAlt);
|
||||||
currentStepper.step(currentStatus, maxStepTime);
|
currentStepper.step(currentStatus, maxStepTime);
|
||||||
}
|
}
|
||||||
SimulationListenerHelper.firePostStep(currentStatus);
|
SimulationListenerHelper.firePostStep(currentStatus);
|
||||||
@ -319,6 +319,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle event
|
// Handle event
|
||||||
|
log.trace("Handling event " + event);
|
||||||
switch (event.getType()) {
|
switch (event.getType()) {
|
||||||
|
|
||||||
case LAUNCH: {
|
case LAUNCH: {
|
||||||
@ -486,7 +487,7 @@ public class BasicEventSimulationEngine implements SimulationEngine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ALTITUDE:
|
case ALTITUDE:
|
||||||
log.trace("BasicEventSimulationEngine: Handling event " + event);
|
// nothing special needs to be done for this event
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TUMBLE:
|
case TUMBLE:
|
||||||
|
@ -182,7 +182,7 @@ public class RK4SimulationStepper extends AbstractSimulationStepper {
|
|||||||
double thrustEstimate = store.thrustForce;
|
double thrustEstimate = store.thrustForce;
|
||||||
store.thrustForce = calculateAverageThrust(status, store.timestep, store.longitudinalAcceleration,
|
store.thrustForce = calculateAverageThrust(status, store.timestep, store.longitudinalAcceleration,
|
||||||
store.atmosphericConditions, true);
|
store.atmosphericConditions, true);
|
||||||
log.trace("Thrust at time " + store.timestep + " thrustForce = " + store.thrustForce);
|
log.trace("Thrust = " + store.thrustForce);
|
||||||
double thrustDiff = Math.abs(store.thrustForce - thrustEstimate);
|
double thrustDiff = Math.abs(store.thrustForce - thrustEstimate);
|
||||||
// Log if difference over 1%, recompute if over 10%
|
// Log if difference over 1%, recompute if over 10%
|
||||||
if (thrustDiff > 0.01 * thrustEstimate) {
|
if (thrustDiff > 0.01 * thrustEstimate) {
|
||||||
|
@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
|
|||||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
@ -97,4 +97,4 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
|||||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
<target name="build">
|
<target name="build">
|
||||||
<mkdir dir="${classes.dir}"/>
|
<mkdir dir="${classes.dir}"/>
|
||||||
<echo level="info">Compiling main classes</echo>
|
<echo level="info">Compiling main classes</echo>
|
||||||
<javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" source="1.7" target="1.7"/>
|
<javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false" source="1.8" target="1.8"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Executible Eclipse-Jar-In-Jar style JAR -->
|
<!-- Executible Eclipse-Jar-In-Jar style JAR -->
|
||||||
|
Binary file not shown.
@ -169,13 +169,7 @@ public class DebugLogDialog extends JDialog {
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
boolean isActive = ((JCheckBox)e.getSource()).isSelected();
|
boolean isActive = ((JCheckBox)e.getSource()).isSelected();
|
||||||
log.info(" toggled to: "+isActive );
|
enableDetailsPanel( isActive);
|
||||||
bottomPanel.setEnabled(isActive);
|
|
||||||
if(isActive) {
|
|
||||||
split.setDividerLocation(0.5);
|
|
||||||
}else {
|
|
||||||
split.setDividerLocation(1.0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -460,6 +454,17 @@ public class DebugLogDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void enableDetailsPanel(final boolean isActive){
|
||||||
|
bottomPanel.setEnabled(isActive);
|
||||||
|
if(isActive){
|
||||||
|
split.setDividerLocation(0.5);
|
||||||
|
split.setBottomComponent(bottomPanel);
|
||||||
|
}else {
|
||||||
|
split.setBottomComponent(null);
|
||||||
|
split.setDividerLocation(1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -619,8 +619,7 @@ public class RocketActions {
|
|||||||
ComponentConfigDialog.hideDialog();
|
ComponentConfigDialog.hideDialog();
|
||||||
|
|
||||||
RocketComponent stage = new AxialStage();
|
RocketComponent stage = new AxialStage();
|
||||||
//// Booster stage
|
|
||||||
stage.setName(trans.get("RocketActions.ActBoosterstage"));
|
|
||||||
//// Add stage
|
//// Add stage
|
||||||
document.addUndoPosition("Add stage");
|
document.addUndoPosition("Add stage");
|
||||||
rocket.addChild(stage);
|
rocket.addChild(stage);
|
||||||
|
@ -64,6 +64,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
|||||||
//// Motor tabs
|
//// Motor tabs
|
||||||
motorConfigurationPanel = new MotorConfigurationPanel(this, rocket);
|
motorConfigurationPanel = new MotorConfigurationPanel(this, rocket);
|
||||||
tabs.add(trans.get("edtmotorconfdlg.lbl.Motortab"), motorConfigurationPanel);
|
tabs.add(trans.get("edtmotorconfdlg.lbl.Motortab"), motorConfigurationPanel);
|
||||||
|
|
||||||
//// Recovery tab
|
//// Recovery tab
|
||||||
recoveryConfigurationPanel = new RecoveryConfigurationPanel(this, rocket);
|
recoveryConfigurationPanel = new RecoveryConfigurationPanel(this, rocket);
|
||||||
tabs.add(trans.get("edtmotorconfdlg.lbl.Recoverytab"), recoveryConfigurationPanel);
|
tabs.add(trans.get("edtmotorconfdlg.lbl.Recoverytab"), recoveryConfigurationPanel);
|
||||||
@ -76,7 +77,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
|||||||
newConfButton.addActionListener(new ActionListener() {
|
newConfButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
addConfiguration();
|
addOrCopyConfiguration(false);
|
||||||
configurationChanged();
|
configurationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +109,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
|||||||
copyConfButton.addActionListener(new ActionListener() {
|
copyConfButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
copyConfiguration();
|
addOrCopyConfiguration(true);
|
||||||
configurationChanged();
|
configurationChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -118,37 +119,46 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
|||||||
|
|
||||||
this.add(tabs, "spanx, grow, wrap rel");
|
this.add(tabs, "spanx, grow, wrap rel");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addConfiguration() {
|
|
||||||
FlightConfigurationId newId = new FlightConfigurationId();
|
|
||||||
FlightConfiguration newConfig = new FlightConfiguration( rocket, newId );
|
|
||||||
rocket.setFlightConfiguration( newId, newConfig);
|
|
||||||
|
|
||||||
// Create a new simulation for this configuration.
|
/**
|
||||||
createSimulationForNewConfiguration( newId );
|
* either create or copy configuration
|
||||||
|
* set new configuration as current
|
||||||
configurationChanged();
|
* create simulation for new configuration
|
||||||
}
|
*/
|
||||||
|
private void addOrCopyConfiguration(boolean copy) {
|
||||||
private void copyConfiguration() {
|
FlightConfiguration newConfig;
|
||||||
FlightConfigurationId oldId = this.motorConfigurationPanel.getSelectedConfigurationId();
|
FlightConfigurationId newId;
|
||||||
FlightConfiguration oldConfig = rocket.getFlightConfiguration(oldId);
|
|
||||||
|
|
||||||
FlightConfigurationId newId = new FlightConfigurationId();
|
// create or copy configuration
|
||||||
FlightConfiguration newConfig = oldConfig.copy( newId);
|
if (copy) {
|
||||||
|
FlightConfigurationId oldId = this.motorConfigurationPanel.getSelectedConfigurationId();
|
||||||
|
FlightConfiguration oldConfig = rocket.getFlightConfiguration(oldId);
|
||||||
|
|
||||||
for (RocketComponent c : rocket) {
|
newConfig = oldConfig.copy(null);
|
||||||
if (c instanceof FlightConfigurableComponent) {
|
newId = newConfig.getId();
|
||||||
((FlightConfigurableComponent) c).copyFlightConfiguration(oldId, newId);
|
|
||||||
|
for (RocketComponent c : rocket) {
|
||||||
|
if (c instanceof FlightConfigurableComponent) {
|
||||||
|
((FlightConfigurableComponent) c).copyFlightConfiguration(oldId, newId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
newConfig = new FlightConfiguration(rocket, null);
|
||||||
|
newId = newConfig.getId();
|
||||||
}
|
}
|
||||||
rocket.setFlightConfiguration( newId, newConfig);
|
|
||||||
|
|
||||||
|
// associate configuration with Id and select it
|
||||||
|
rocket.setFlightConfiguration(newId, newConfig);
|
||||||
|
rocket.setSelectedConfiguration(newId);
|
||||||
|
|
||||||
// Create a new simulation for this configuration.
|
// create simulation for configuration
|
||||||
createSimulationForNewConfiguration( newId);
|
Simulation newSim = new Simulation(rocket);
|
||||||
|
|
||||||
configurationChanged();
|
OpenRocketDocument doc = BasicFrame.findDocument(rocket);
|
||||||
|
if (doc != null) {
|
||||||
|
newSim.setName(doc.getNextSimulationName());
|
||||||
|
doc.addSimulation(newSim);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renameConfiguration() {
|
private void renameConfiguration() {
|
||||||
@ -164,18 +174,6 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
|||||||
configurationChanged();
|
configurationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* prereq - assumes that the new configuration has been set as the default configuration.
|
|
||||||
*/
|
|
||||||
private void createSimulationForNewConfiguration( final FlightConfigurationId fcid ) {
|
|
||||||
Simulation newSim = new Simulation(rocket);
|
|
||||||
OpenRocketDocument doc = BasicFrame.findDocument(rocket);
|
|
||||||
if (doc != null) {
|
|
||||||
newSim.setName(doc.getNextSimulationName());
|
|
||||||
doc.addSimulation(newSim);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void configurationChanged() {
|
private void configurationChanged() {
|
||||||
motorConfigurationPanel.fireTableDataChanged();
|
motorConfigurationPanel.fireTableDataChanged();
|
||||||
recoveryConfigurationPanel.fireTableDataChanged();
|
recoveryConfigurationPanel.fireTableDataChanged();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user