diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/DocumentConfig.java b/core/src/net/sf/openrocket/file/openrocket/importt/DocumentConfig.java
index 138456aa8..16f733ec9 100644
--- a/core/src/net/sf/openrocket/file/openrocket/importt/DocumentConfig.java
+++ b/core/src/net/sf/openrocket/file/openrocket/importt/DocumentConfig.java
@@ -369,7 +369,9 @@ class DocumentConfig {
setters.put("MassObject:packedlength", new DoubleSetter(
Reflection.findMethod(MassObject.class, "setLength", double.class)));
setters.put("MassObject:packedradius", new DoubleSetter(
- Reflection.findMethod(MassObject.class, "setRadius", double.class)));
+ Reflection.findMethod(MassObject.class, "setRadius", double.class),
+ "auto", " ",
+ Reflection.findMethod(MassObject.class, "setRadiusAutomatic", boolean.class)));
setters.put("MassObject:radialposition", new DoubleSetter(
Reflection.findMethod(MassObject.class, "setRadialPosition", double.class)));
setters.put("MassObject:radialdirection", new DoubleSetter(
diff --git a/core/src/net/sf/openrocket/file/openrocket/savers/MassObjectSaver.java b/core/src/net/sf/openrocket/file/openrocket/savers/MassObjectSaver.java
index 298cb2636..cefbb9345 100644
--- a/core/src/net/sf/openrocket/file/openrocket/savers/MassObjectSaver.java
+++ b/core/src/net/sf/openrocket/file/openrocket/savers/MassObjectSaver.java
@@ -14,7 +14,11 @@ public class MassObjectSaver extends InternalComponentSaver {
MassObject mass = (MassObject) c;
elements.add("" + mass.getLength() + "");
- elements.add("" + mass.getRadius() + "");
+ if (mass.isRadiusAutomatic()) {
+ elements.add("auto " + mass.getRadiusNoAuto() + "");
+ } else {
+ elements.add("" + mass.getRadiusNoAuto() + "");
+ }
elements.add("" + mass.getRadialPosition() + "");
elements.add("" + (mass.getRadialDirection() * 180.0 / Math.PI)
+ "");
diff --git a/core/src/net/sf/openrocket/preset/ComponentPreset.java b/core/src/net/sf/openrocket/preset/ComponentPreset.java
index 46df68c88..7309998f8 100644
--- a/core/src/net/sf/openrocket/preset/ComponentPreset.java
+++ b/core/src/net/sf/openrocket/preset/ComponentPreset.java
@@ -153,6 +153,9 @@ public class ComponentPreset implements Comparable, Serializabl
ComponentPreset.DESCRIPTION,
ComponentPreset.DIAMETER,
ComponentPreset.SIDES,
+ ComponentPreset.PARACHUTE_CD,
+ ComponentPreset.PACKED_DIAMETER,
+ ComponentPreset.PACKED_LENGTH,
ComponentPreset.LINE_COUNT,
ComponentPreset.LINE_LENGTH,
ComponentPreset.LINE_MATERIAL,
@@ -208,6 +211,9 @@ public class ComponentPreset implements Comparable, Serializabl
public final static TypedKey MASS = new TypedKey("Mass", Double.class, UnitGroup.UNITS_MASS);
public final static TypedKey DIAMETER = new TypedKey("Diameter", Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey SIDES = new TypedKey("Sides", Integer.class);
+ public static final TypedKey PARACHUTE_CD = new TypedKey("DragCoefficient", Double.class, UnitGroup.UNITS_COEFFICIENT);
+ public final static TypedKey PACKED_LENGTH = new TypedKey("PackedLength", Double.class, UnitGroup.UNITS_LENGTH);
+ public final static TypedKey PACKED_DIAMETER = new TypedKey("PackedDiameter", Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey LINE_COUNT = new TypedKey("LineCount", Integer.class);
public final static TypedKey LINE_LENGTH = new TypedKey("LineLength", Double.class, UnitGroup.UNITS_LENGTH);
public final static TypedKey LINE_MATERIAL = new TypedKey("LineMaterial", Material.class);
@@ -237,6 +243,11 @@ public class ComponentPreset implements Comparable, Serializabl
FILLED,
DIAMETER,
SIDES,
+ /** DO NOT add new presets to this list without defining table.column
+ PARACHUTE_CD,
+ PACKED_LENGTH,
+ PACKED_DIAMETER,
+ */
LINE_COUNT,
LINE_LENGTH,
LINE_MATERIAL,
diff --git a/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java b/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java
index 1bf861570..e7137fe99 100644
--- a/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java
+++ b/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java
@@ -23,6 +23,12 @@ public class ParachuteDTO extends BaseComponentDTO {
private AnnotatedLengthDTO diameter;
@XmlElement(name = "Sides")
private Integer sides;
+ @XmlElement(name = "PackedDiameter")
+ private AnnotatedLengthDTO PackedDiameter;
+ @XmlElement(name = "PackedLength")
+ private AnnotatedLengthDTO PackedLength;
+ @XmlElement(name = "DragCoefficient")
+ private AnnotatedLengthDTO DragCoefficient;
@XmlElement(name = "LineCount")
private Integer lineCount;
@XmlElement(name = "LineLength")
@@ -57,6 +63,38 @@ public class ParachuteDTO extends BaseComponentDTO {
this.sides = sides;
}
+
+ public double getPackedDiameter() {
+ return PackedDiameter.getValue();
+ }
+
+ public void setPackedDiameter(AnnotatedLengthDTO PackedDiameter) {
+ this.PackedDiameter = PackedDiameter;
+ }
+ public void setPackedDiameter(double PackedDiameter) {
+ this.PackedDiameter = new AnnotatedLengthDTO(PackedDiameter);
+ }
+
+ public double getPackedLength() {
+ return PackedLength.getValue();
+ }
+
+ public void setPackedLength(AnnotatedLengthDTO PackedLength) {
+ this.PackedLength = PackedLength;
+ }
+ public void setPackedLength(double PackedLength) {
+ this.PackedLength = new AnnotatedLengthDTO(PackedLength);
+ }
+
+ public double getDragCoefficient() {
+ return DragCoefficient.getValue();
+ }
+
+ public void setDragCoefficient(AnnotatedLengthDTO DragCoefficient) {
+ this.DragCoefficient = DragCoefficient;
+ }
+ public void setDragCoefficient(double DragCoefficient) { this.DragCoefficient = new AnnotatedLengthDTO(DragCoefficient); }
+
public Integer getLineCount() {
return lineCount;
}
@@ -102,6 +140,15 @@ public class ParachuteDTO extends BaseComponentDTO {
if ( preset.has(ComponentPreset.SIDES)) {
setSides(preset.get(ComponentPreset.SIDES));
}
+ if ( preset.has(ComponentPreset.PACKED_DIAMETER)) {
+ setPackedDiameter(preset.get(ComponentPreset.PACKED_DIAMETER));
+ }
+ if ( preset.has(ComponentPreset.PACKED_LENGTH)) {
+ setPackedLength(preset.get(ComponentPreset.PACKED_LENGTH));
+ }
+ if ( preset.has(ComponentPreset.PARACHUTE_CD)) {
+ setDragCoefficient(preset.get(ComponentPreset.PARACHUTE_CD));
+ }
if ( preset.has(ComponentPreset.LINE_MATERIAL)) {
setLineMaterial(new AnnotatedMaterialDTO(preset.get(ComponentPreset.LINE_MATERIAL)));
}
@@ -120,6 +167,15 @@ public class ParachuteDTO extends BaseComponentDTO {
// need to fix the MATERIAL packed into the componentpreset.
props.put(ComponentPreset.TYPE, type);
props.put(ComponentPreset.DIAMETER, this.getDiameter());
+ if ( this.PackedDiameter != null ) {
+ props.put(ComponentPreset.PACKED_DIAMETER, this.getPackedDiameter());
+ }
+ if ( this.PackedLength != null ) {
+ props.put(ComponentPreset.PACKED_LENGTH, this.getPackedLength());
+ }
+ if ( this.PackedLength != null ) {
+ props.put(ComponentPreset.PARACHUTE_CD, this.getDragCoefficient());
+ }
props.put(ComponentPreset.LINE_COUNT, this.getLineCount());
if ( this.lineLength != null ) {
props.put(ComponentPreset.LINE_LENGTH, this.getLineLength());
diff --git a/core/src/net/sf/openrocket/rocketcomponent/BodyComponent.java b/core/src/net/sf/openrocket/rocketcomponent/BodyComponent.java
index 4e0c7b1a4..1ed38b185 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/BodyComponent.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/BodyComponent.java
@@ -17,7 +17,9 @@ import net.sf.openrocket.rocketcomponent.position.AxialMethod;
*/
public abstract class BodyComponent extends ExternalComponent {
-
+
+ private double InnerRadius;
+
/**
* Default constructor. Sets the relative position to POSITION_RELATIVE_AFTER,
* i.e. body components come after one another.
@@ -81,5 +83,7 @@ public abstract class BodyComponent extends ExternalComponent {
public boolean allowsChildren() {
return true;
}
-
+
+ public double getInnerRadius() {
+ return InnerRadius; }
}
diff --git a/core/src/net/sf/openrocket/rocketcomponent/MassObject.java b/core/src/net/sf/openrocket/rocketcomponent/MassObject.java
index 125d59279..4c2c30b0a 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/MassObject.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/MassObject.java
@@ -21,7 +21,8 @@ import net.sf.openrocket.util.MathUtil;
*/
public abstract class MassObject extends InternalComponent {
- private double radius;
+ protected double radius;
+ private boolean autoRadius = false;
private double radialPosition;
private double radialDirection;
@@ -66,12 +67,31 @@ public abstract class MassObject extends InternalComponent {
}
- public final double getRadius() {
+ public double getRadius() {
+ if (autoRadius) {
+ if (parent == null) {
+ return radius;
+ }
+ if (parent instanceof NoseCone) {
+ return ((NoseCone) parent).getAftRadius();
+ } else if (parent instanceof Transition) {
+ double foreRadius = ((Transition) parent).getForeRadius();
+ double aftRadius = ((Transition) parent).getAftRadius();
+ return (Math.max(foreRadius, aftRadius));
+ } else if (parent instanceof BodyComponent) {
+ return ((BodyComponent) parent).getInnerRadius();
+ } else if (parent instanceof RingComponent) {
+ return ((RingComponent) parent).getInnerRadius();
+ }
+ }
+ return radius;
+ }
+
+ public double getRadiusNoAuto() {
return radius;
}
-
- public final void setRadius(double radius) {
+ public void setRadius(double radius) {
radius = Math.max(radius, 0);
for (RocketComponent listener : configListeners) {
@@ -80,14 +100,32 @@ public abstract class MassObject extends InternalComponent {
}
}
- if (MathUtil.equals(this.radius, radius)) {
+ if (MathUtil.equals(this.radius, radius) && (!autoRadius))
return;
- }
+
+ this.autoRadius = false;
this.radius = radius;
fireComponentChangeEvent(ComponentChangeEvent.MASS_CHANGE);
}
-
-
+
+ public boolean isRadiusAutomatic() {
+ return autoRadius;
+ }
+
+ public void setRadiusAutomatic(boolean auto) {
+ for (RocketComponent listener : configListeners) {
+ if (listener instanceof Parachute) {
+ ((Parachute) listener).setRadiusAutomatic(auto);
+ }
+ }
+
+ if (autoRadius == auto)
+ return;
+
+ autoRadius = auto;
+
+ fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
+ }
public final double getRadialPosition() {
return radialPosition;
diff --git a/core/src/net/sf/openrocket/rocketcomponent/Parachute.java b/core/src/net/sf/openrocket/rocketcomponent/Parachute.java
index 55d634be7..75a634266 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/Parachute.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/Parachute.java
@@ -10,19 +10,19 @@ import net.sf.openrocket.util.MathUtil;
public class Parachute extends RecoveryDevice {
private static final Translator trans = Application.getTranslator();
- public static final double DEFAULT_CD = 0.8;
+ public static double DEFAULT_CD = 0.8;
private double diameter;
-
+ private final double InitialPackedLength = this.length;
+ private final double InitialPackedRadius = this.radius;
+
private Material lineMaterial;
private int lineCount = 6;
private double lineLength = 0.3;
-
-
+
public Parachute() {
this.diameter = 0.3;
this.lineMaterial = Application.getPreferences().getDefaultComponentMaterial(Parachute.class, Material.Type.LINE);
- this.lineLength = 0.3;
super.displayOrder_side = 11; // Order for displaying the component in the 2D side view
super.displayOrder_back = 9; // Order for displaying the component in the 2D back view
}
@@ -159,25 +159,107 @@ public class Parachute extends RecoveryDevice {
@Override
protected void loadFromPreset(ComponentPreset preset) {
- if( preset.has( ComponentPreset.DIAMETER )) {
- this.diameter = preset.get( ComponentPreset.DIAMETER );
+
+ // BEGIN Substitute parachute description for component name
+ if (preset.has(ComponentPreset.DESCRIPTION)) {
+ String temporaryName = preset.get(ComponentPreset.DESCRIPTION);
+ int size = temporaryName.length();
+ if (size > 0) {
+ this.name = preset.get(ComponentPreset.DESCRIPTION);
+ } else {
+ this.name = getComponentName();
+ }
+ } else {
+ this.name = getComponentName();
}
- if( preset.has( ComponentPreset.LINE_COUNT )) {
- this.lineCount = preset.get( ComponentPreset.LINE_COUNT );
+ // END Substitute parachute description for component name
+
+ if (preset.has(ComponentPreset.DIAMETER)) {
+ this.diameter = preset.get(ComponentPreset.DIAMETER);
}
- if( preset.has( ComponentPreset.LINE_LENGTH )) {
- this.lineLength = preset.get( ComponentPreset.LINE_LENGTH );
+
+ // BEGIN Implement parachute cd
+ if (preset.has(ComponentPreset.PARACHUTE_CD)) {
+ if (preset.get(ComponentPreset.PARACHUTE_CD) > 0) {
+ cdAutomatic = false;
+ cd = preset.get(ComponentPreset.PARACHUTE_CD);
+ }
+ else {
+ cdAutomatic = true;
+ cd = Parachute.DEFAULT_CD;
+ }
+ } else {
+ cdAutomatic = true;
+ cd = Parachute.DEFAULT_CD;
+ }
+ // END Implement parachute cd
+
+ // BEGIN Implement parachute length, diameter, and volume
+ //// BEGIN Implement parachute packed length
+ if (preset.has(ComponentPreset.PACKED_LENGTH)) {
+ this.PackedLength = preset.get(ComponentPreset.PACKED_LENGTH);
+ if (PackedLength > 0) {
+ length = PackedLength;
+ }
+ if (PackedLength <= 0) {
+ length = InitialPackedLength;
+ }
+ } else {
+ length = InitialPackedLength;
}
- if( preset.has( ComponentPreset.LINE_MATERIAL )) {
- this.lineMaterial = preset.get( ComponentPreset.LINE_MATERIAL );
+ //// END Implement parachute packed length
+ //// BEGIN Implement parachute packed diameter
+ if (preset.has(ComponentPreset.PACKED_DIAMETER)) {
+ this.PackedDiameter = preset.get(ComponentPreset.PACKED_DIAMETER);
+ if (PackedDiameter > 0) {
+ radius = PackedDiameter / 2;
+ }
+ if (PackedDiameter <= 0) {
+ radius = InitialPackedRadius;
+ }
+ } else {
+ radius = InitialPackedRadius;
+ }
+ //// END Implement parachute packed diameter
+ //// BEGIN Size parachute packed diameter within parent inner diameter
+ if (length > 0 && radius > 0) {
+ double parachuteVolume = (Math.PI * Math.pow(radius, 2) * length);
+ setRadiusAutomatic(true);
+ length = parachuteVolume / (Math.PI * Math.pow(getRadius(), 2));
+
+ }
+ //// END Size parachute packed diameter within parent inner diameter
+ // END Implement parachute length, diameter, and volume
+
+ // BEGIN Activate Override Mass Preset
+ if (preset.has(ComponentPreset.MASS)) {
+ this.overrideMass = (preset.get(ComponentPreset.MASS));
+ if (overrideMass > 0) {
+ massOverridden = true;
+ } else {
+ this.overrideMass = 0;
+ massOverridden = false;
+ }
+ } else {
+ this.overrideMass = 0;
+ massOverridden = false;
+ }
+ // END Activate Override Mass Preset
+
+ if (preset.has(ComponentPreset.LINE_COUNT)) {
+ this.lineCount = preset.get(ComponentPreset.LINE_COUNT);
+ }
+ if (preset.has(ComponentPreset.LINE_LENGTH)) {
+ this.lineLength = preset.get(ComponentPreset.LINE_LENGTH);
+ }
+ if (preset.has(ComponentPreset.LINE_MATERIAL)) {
+ this.lineMaterial = preset.get(ComponentPreset.LINE_MATERIAL);
}
super.loadFromPreset(preset);
}
-
@Override
public Type getPresetType() {
- return ComponentPreset.Type.PARACHUTE;
+ return Type.PARACHUTE;
}
-
}
diff --git a/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java b/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java
index ec3fe5542..e74fba077 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java
@@ -19,9 +19,13 @@ import net.sf.openrocket.util.MathUtil;
* @author Sampo Niskanen
*/
public abstract class RecoveryDevice extends MassObject implements FlightConfigurableComponent {
-
- private double cd = Parachute.DEFAULT_CD;
- private boolean cdAutomatic = true;
+ ////
+ protected double DragCoefficient;
+ protected double PackedDiameter;
+ protected double PackedLength;
+ ////
+ protected double cd = Parachute.DEFAULT_CD;
+ protected boolean cdAutomatic = true;
private Material.Surface material;
diff --git a/core/src/net/sf/openrocket/rocketcomponent/RocketComponent.java b/core/src/net/sf/openrocket/rocketcomponent/RocketComponent.java
index bcdca0897..af2e046c9 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/RocketComponent.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/RocketComponent.java
@@ -90,15 +90,15 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
* Defaults to (0,0,0)
*/
protected Coordinate position = new Coordinate();
-
+
// Color of the component, null means to use the default color
private Color color = null;
private LineStyle lineStyle = null;
// Override mass/CG
- private double overrideMass = 0;
- private boolean massOverridden = false;
+ protected double overrideMass = 0;
+ protected boolean massOverridden = false;
private double overrideCGX = 0;
private boolean cgOverridden = false;
private double overrideCD = 0;
@@ -108,7 +108,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
// User-given name of the component
- private String name = null;
+ protected String name = null;
// User-specified comment
private String comment = "";
diff --git a/core/src/net/sf/openrocket/rocketcomponent/Streamer.java b/core/src/net/sf/openrocket/rocketcomponent/Streamer.java
index caa7e990e..c7498a1be 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/Streamer.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/Streamer.java
@@ -58,7 +58,7 @@ public class Streamer extends RecoveryDevice {
if (MathUtil.equals(this.stripWidth, stripWidth))
return;
this.stripWidth = stripWidth;
- this.length = stripWidth;
+
clearPreset();
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
}
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java
index 4f510fc0f..d7177e998 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java
@@ -4,6 +4,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -105,7 +106,12 @@ public class MassComponentConfig extends RocketComponentConfig {
panel.add(new UnitSelector(od), "growx");
panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
-
+
+ ////// Automatic
+ JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
+ checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
+ panel.add(checkAutoPackedRadius, "skip, span 2, wrap 30lp");
+
//// Position
//// Position relative to:
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java
index fac72e6fa..dcbcf9ad2 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java
@@ -6,6 +6,7 @@ import java.awt.event.ActionListener;
import javax.swing.ComboBoxModel;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
@@ -30,6 +31,7 @@ import net.sf.openrocket.rocketcomponent.DeploymentConfiguration;
import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent;
import net.sf.openrocket.rocketcomponent.Parachute;
import net.sf.openrocket.rocketcomponent.RocketComponent;
+import net.sf.openrocket.rocketcomponent.Transition;
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
@@ -177,7 +179,7 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
//// Packed diameter:
panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packeddiam")));
- DoubleModel od = new DoubleModel(component, "Radius", 2, UnitGroup.UNITS_LENGTH, 0);
+ final DoubleModel od = new DoubleModel(component, "Radius", 2, UnitGroup.UNITS_LENGTH, 0);
// Diameter = 2*Radius
spin = new JSpinner(od.getSpinnerModel());
@@ -185,7 +187,12 @@ public class ParachuteConfig extends RecoveryDeviceConfig {
panel.add(spin, "growx");
panel.add(new UnitSelector(od), "growx");
- panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap 30lp");
+ panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
+
+ ////// Automatic
+ JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
+ checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
+ panel.add(checkAutoPackedRadius, "skip, span 2, wrap 30lp");
//// Deployment
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java
index 745ddb649..4403f0049 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java
@@ -112,8 +112,11 @@ public class ShockCordConfig extends RocketComponentConfig {
panel2.add(new UnitSelector(od), "growx");
panel2.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
-
+ ////// Automatic
+ JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
+ checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
+ panel2.add(checkAutoPackedRadius, "skip, span 2, wrap");
//// General and General properties
tabbedPane.insertTab(trans.get("ShockCordCfg.tab.General"), null, panel,
diff --git a/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java
index c16ea1638..c1ed1501e 100644
--- a/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java
+++ b/swing/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java
@@ -160,7 +160,7 @@ public class StreamerConfig extends RecoveryDeviceConfig {
"w 100lp, wrap");
- //// Spatial length:
+ //// Packed length:
panel.add(new JLabel(trans.get("StreamerCfg.lbl.Packedlength")));
m = new DoubleModel(component, "Length", UnitGroup.UNITS_LENGTH, 0);
@@ -185,8 +185,13 @@ public class StreamerConfig extends RecoveryDeviceConfig {
panel.add(spin, "growx");
panel.add(new UnitSelector(od), "growx");
- panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap 30lp");
-
+ panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)), "w 100lp, wrap");
+
+ ////// Automatic
+ JCheckBox checkAutoPackedRadius = new JCheckBox(od.getAutomaticAction());
+ checkAutoPackedRadius.setText(trans.get("TransitionCfg.checkbox.Automatic"));
+ panel.add(checkAutoPackedRadius, "skip, span 2, wrap 30lp");
+
//// Deployment
//// Deploys at: