Added UNITS_WINDSPEED so the preferred units for entering wind speed can be configured separately from rocket velocities.
This commit is contained in:
parent
4fa4217665
commit
7420f5c18b
@ -230,6 +230,7 @@ pref.dlg.tab.Miscellaneousoptions = Miscellaneous options
|
|||||||
pref.dlg.lbl.Positiontoinsert = Position to insert new body components:
|
pref.dlg.lbl.Positiontoinsert = Position to insert new body components:
|
||||||
pref.dlg.lbl.Confirmdeletion = Confirm deletion of simulations:
|
pref.dlg.lbl.Confirmdeletion = Confirm deletion of simulations:
|
||||||
pref.dlg.lbl.User-definedthrust = User-defined thrust curves:
|
pref.dlg.lbl.User-definedthrust = User-defined thrust curves:
|
||||||
|
pref.dlg.lbl.Windspeed = Windspeed
|
||||||
pref.dlg.Allthrustcurvefiles = All thrust curve files (*.eng; *.rse; *.zip; directories)
|
pref.dlg.Allthrustcurvefiles = All thrust curve files (*.eng; *.rse; *.zip; directories)
|
||||||
pref.dlg.RASPfiles = RASP motor files (*.eng)
|
pref.dlg.RASPfiles = RASP motor files (*.eng)
|
||||||
pref.dlg.RockSimfiles = RockSim engine files (*.rse)
|
pref.dlg.RockSimfiles = RockSim engine files (*.rse)
|
||||||
|
@ -388,7 +388,6 @@ public class PreferencesDialog extends JDialog {
|
|||||||
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_TEMPERATURE));
|
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_TEMPERATURE));
|
||||||
panel.add(combo, "sizegroup boxes, wrap");
|
panel.add(combo, "sizegroup boxes, wrap");
|
||||||
|
|
||||||
|
|
||||||
//// Moment of inertia:
|
//// Moment of inertia:
|
||||||
panel.add(new JLabel(trans.get("pref.dlg.lbl.Momentofinertia")));
|
panel.add(new JLabel(trans.get("pref.dlg.lbl.Momentofinertia")));
|
||||||
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_INERTIA));
|
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_INERTIA));
|
||||||
@ -403,10 +402,16 @@ public class PreferencesDialog extends JDialog {
|
|||||||
//// Stability:
|
//// Stability:
|
||||||
panel.add(new JLabel(trans.get("pref.dlg.lbl.Stability")));
|
panel.add(new JLabel(trans.get("pref.dlg.lbl.Stability")));
|
||||||
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_STABILITY));
|
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_STABILITY));
|
||||||
|
panel.add(combo, "sizegroup boxes");
|
||||||
|
|
||||||
|
//// Windspeed:
|
||||||
|
panel.add(new JLabel(trans.get("pref.dlg.lbl.Windspeed")));
|
||||||
|
combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_WINDSPEED));
|
||||||
panel.add(combo, "sizegroup boxes, wrap para");
|
panel.add(combo, "sizegroup boxes, wrap para");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//// Default metric button
|
//// Default metric button
|
||||||
JButton button = new JButton(trans.get("pref.dlg.but.defaultmetric"));
|
JButton button = new JButton(trans.get("pref.dlg.but.defaultmetric"));
|
||||||
button.addActionListener(new ActionListener() {
|
button.addActionListener(new ActionListener() {
|
||||||
|
@ -241,7 +241,7 @@ public class SimulationEditDialog extends JDialog {
|
|||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
sub.add(label);
|
sub.add(label);
|
||||||
|
|
||||||
m = new DoubleModel(conditions, "WindSpeedAverage", UnitGroup.UNITS_VELOCITY, 0);
|
m = new DoubleModel(conditions, "WindSpeedAverage", UnitGroup.UNITS_WINDSPEED, 0);
|
||||||
|
|
||||||
spin = new JSpinner(m.getSpinnerModel());
|
spin = new JSpinner(m.getSpinnerModel());
|
||||||
spin.setEditor(new SpinnerEditor(spin));
|
spin.setEditor(new SpinnerEditor(spin));
|
||||||
@ -266,7 +266,7 @@ public class SimulationEditDialog extends JDialog {
|
|||||||
label.setToolTipText(tip);
|
label.setToolTipText(tip);
|
||||||
sub.add(label);
|
sub.add(label);
|
||||||
|
|
||||||
m = new DoubleModel(conditions, "WindSpeedDeviation", UnitGroup.UNITS_VELOCITY, 0);
|
m = new DoubleModel(conditions, "WindSpeedDeviation", UnitGroup.UNITS_WINDSPEED, 0);
|
||||||
DoubleModel m2 = new DoubleModel(conditions, "WindSpeedAverage", 0.25,
|
DoubleModel m2 = new DoubleModel(conditions, "WindSpeedAverage", 0.25,
|
||||||
UnitGroup.UNITS_COEFFICIENT, 0);
|
UnitGroup.UNITS_COEFFICIENT, 0);
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ public class UnitGroup {
|
|||||||
*/
|
*/
|
||||||
public static final UnitGroup UNITS_STABILITY_CALIBERS;
|
public static final UnitGroup UNITS_STABILITY_CALIBERS;
|
||||||
public static final UnitGroup UNITS_VELOCITY;
|
public static final UnitGroup UNITS_VELOCITY;
|
||||||
|
public static final UnitGroup UNITS_WINDSPEED;
|
||||||
public static final UnitGroup UNITS_ACCELERATION;
|
public static final UnitGroup UNITS_ACCELERATION;
|
||||||
public static final UnitGroup UNITS_MASS;
|
public static final UnitGroup UNITS_MASS;
|
||||||
public static final UnitGroup UNITS_INERTIA;
|
public static final UnitGroup UNITS_INERTIA;
|
||||||
@ -128,6 +129,12 @@ public class UnitGroup {
|
|||||||
UNITS_VELOCITY.addUnit(new GeneralUnit(0.3048, "ft/s"));
|
UNITS_VELOCITY.addUnit(new GeneralUnit(0.3048, "ft/s"));
|
||||||
UNITS_VELOCITY.addUnit(new GeneralUnit(0.44704, "mph"));
|
UNITS_VELOCITY.addUnit(new GeneralUnit(0.44704, "mph"));
|
||||||
|
|
||||||
|
UNITS_WINDSPEED = new UnitGroup();
|
||||||
|
UNITS_WINDSPEED.addUnit(new GeneralUnit(1, "m/s"));
|
||||||
|
UNITS_WINDSPEED.addUnit(new GeneralUnit(1 / 3.6, "km/h"));
|
||||||
|
UNITS_WINDSPEED.addUnit(new GeneralUnit(0.3048, "ft/s"));
|
||||||
|
UNITS_WINDSPEED.addUnit(new GeneralUnit(0.44704, "mph"));
|
||||||
|
|
||||||
UNITS_ACCELERATION = new UnitGroup();
|
UNITS_ACCELERATION = new UnitGroup();
|
||||||
UNITS_ACCELERATION.addUnit(new GeneralUnit(1, "m/s" + SQUARED));
|
UNITS_ACCELERATION.addUnit(new GeneralUnit(1, "m/s" + SQUARED));
|
||||||
UNITS_ACCELERATION.addUnit(new GeneralUnit(0.3048, "ft/s" + SQUARED));
|
UNITS_ACCELERATION.addUnit(new GeneralUnit(0.3048, "ft/s" + SQUARED));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user