From 09123dd0ceddf7f88b58a3bafce837cc466d2a6d Mon Sep 17 00:00:00 2001 From: Joe Pfeiffer Date: Mon, 4 Jun 2018 12:37:40 -0600 Subject: [PATCH 01/10] Set current configuration before creating simulation createSimulationForConfiguration() assumed addConfiguration() and copyConfiguration() would set the new configuration as selected, but they didn't resulting in simulation based on old configuration, not new one. Fixed. addConfiguration() and copyConfiguration() had enough common code that consolidating them and createSimulationForConfiguration() seemed like a good idea. Let FlightConfiguration.copy() create new ID for consistency with constructor. --- .../rocketcomponent/FlightConfiguration.java | 7 +- .../FlightConfigurationPanel.java | 72 +++++++++---------- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java index 651e24296..b1a394e31 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java @@ -463,10 +463,11 @@ public class FlightConfiguration implements FlightConfigurableParameter Date: Sat, 9 Jun 2018 20:15:16 -0400 Subject: [PATCH 02/10] [fix] both Create Stage buttons now create stages with the same name - reads the value of `Stage.Stage` from 'core/resources/l10n/messages.properties' - currently "Stage" --- swing/src/net/sf/openrocket/gui/main/RocketActions.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/main/RocketActions.java b/swing/src/net/sf/openrocket/gui/main/RocketActions.java index baeab86b1..828c8ceae 100644 --- a/swing/src/net/sf/openrocket/gui/main/RocketActions.java +++ b/swing/src/net/sf/openrocket/gui/main/RocketActions.java @@ -619,8 +619,7 @@ public class RocketActions { ComponentConfigDialog.hideDialog(); RocketComponent stage = new AxialStage(); - //// Booster stage - stage.setName(trans.get("RocketActions.ActBoosterstage")); + //// Add stage document.addUndoPosition("Add stage"); rocket.addChild(stage); From 73db54ae7bb9d0f15d78e12081f767348c5abcfd Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 9 Jun 2018 20:22:32 -0400 Subject: [PATCH 03/10] [fix] removes obsolete l10n string 'RocketActions.ActBoosterstage' from 'core/resources/l10n/message.properties' --- core/resources/l10n/messages.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index b3fe35573..41ac03c32 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -37,7 +37,6 @@ RocketActions.EditAct.Edit = Edit RocketActions.EditAct.ttip.Edit = Edit the selected component. RocketActions.NewStageAct.Newstage = New stage RocketActions.NewStageAct.ttip.Newstage = Add a new stage to the rocket design. -RocketActions.ActBoosterstage = Booster stage RocketActions.MoveUpAct.Moveup = Move up RocketActions.MoveUpAct.ttip.Moveup = Move this component upwards. RocketActions.MoveDownAct.Movedown = Move down From 14414d62794dbb6064b7a3bca39a2015bd2c1ff7 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 16 Jun 2018 19:51:40 -0400 Subject: [PATCH 04/10] [fix] removed duplicate property keys --- core/resources/l10n/messages.properties | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index b3fe35573..4891fe8ff 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -335,7 +335,7 @@ generalprefs.lbl.languageEffect = The language will change the next time you sta ! Simulation edit dialog simedtdlg.but.runsimulation = Run simulation simedtdlg.but.resettodefault = Reset to default -simedtdlg.but.savedefault = Save as default +simedtdlg.but.savedefault = Save as default simedtdlg.but.add = Add simedtdlg.but.remove = Remove simedtdlg.title.Editsim = Edit simulation @@ -823,9 +823,6 @@ RocketCfg.lbl.Comments = Comments: RocketCfg.lbl.Revisionhistory = Revision history: RocketCfg.lbl.Material = Material: -! ShockCordConfig -ShockCordCfg.lbl.Shockcordlength = Shock cord length: - ! RocketComponentConfig RocketCompCfg.lbl.Componentname = Component name: RocketCompCfg.ttip.Thecomponentname = The component name. @@ -1037,13 +1034,11 @@ NoseConeCfg.tab.ttip.Shoulder = Shoulder properties ! ParachuteConfig ParachuteCfg.lbl.Canopy = Canopy: ParachuteCfg.lbl.Diameter = Diameter: -ParachuteCfg.lbl.Material = Material: ParachuteCfg.combo.MaterialModel = The component material affects the weight of the component. ParachuteCfg.lbl.longA1 = Drag coefficient CD: ParachuteCfg.lbl.longB1 = The drag coefficient relative to the total area of the parachute.
ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate. ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8. -ParachuteCfg.but.Reset = Reset ParachuteCfg.lbl.Shroudlines = Shroud lines: ParachuteCfg.lbl.Numberoflines = Number of lines: ParachuteCfg.lbl.Linelength = Line length: @@ -1571,7 +1566,7 @@ FlightEvent.Type.GROUND_HIT = Ground hit FlightEvent.Type.SIMULATION_END = Simulation end FlightEvent.Type.ALTITUDE = Altitude change FlightEvent.Type.TUMBLE = Tumbling -FlightEvent.Type.EXCEPTION = Exception +FlightEvent.Type.EXCEPTION = Exception ! ThrustCurveMotorColumns TCurveMotorCol.MANUFACTURER = Manufacturer From 32c612fb910a4709083c30a56e334c3ca749d712 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 9 Jun 2018 20:40:35 -0400 Subject: [PATCH 05/10] [upgrade] Updated ant build.xml to use java 1.8 --- core/build.xml | 2 +- swing/build.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/build.xml b/core/build.xml index f04b037eb..27a1b4ecc 100644 --- a/core/build.xml +++ b/core/build.xml @@ -55,7 +55,7 @@ Compiling main classes - + diff --git a/swing/build.xml b/swing/build.xml index d6c4f9d10..f31835fcc 100644 --- a/swing/build.xml +++ b/swing/build.xml @@ -71,7 +71,7 @@ Compiling main classes - + From 82d5f871f0770101ae42d439d437e3070ac237c8 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 9 Jun 2018 20:41:19 -0400 Subject: [PATCH 06/10] [upgrade] Updated Eclipse buildfiles to use Java 1.8 --- core/.settings/org.eclipse.jdt.core.prefs | 6 +++--- swing/.settings/org.eclipse.jdt.core.prefs | 6 +++--- swing/resources/datafiles/presets/system.ser | Bin 386370 -> 386370 bytes 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/.settings/org.eclipse.jdt.core.prefs b/core/.settings/org.eclipse.jdt.core.prefs index 7008edd88..7fb07d275 100644 --- a/core/.settings/org.eclipse.jdt.core.prefs +++ b/core/.settings/org.eclipse.jdt.core.prefs @@ -1,9 +1,9 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.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.localVariable=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.unusedWarningToken=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.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 diff --git a/swing/.settings/org.eclipse.jdt.core.prefs b/swing/.settings/org.eclipse.jdt.core.prefs index 790bdcb1e..92ecaad14 100644 --- a/swing/.settings/org.eclipse.jdt.core.prefs +++ b/swing/.settings/org.eclipse.jdt.core.prefs @@ -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.codegen.inlineJsrBytecode=enabled 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.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.localVariable=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.unusedWarningToken=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 diff --git a/swing/resources/datafiles/presets/system.ser b/swing/resources/datafiles/presets/system.ser index 5342b5a8df1b060e817de48fa3032c2bef85e159..33648114cadcbbf9a13720ed07e6b336e8074da7 100644 GIT binary patch delta 1652 zcmZXU+e=hI9LMp@Oq#GOZlPG=S&1bmPqMpKOKPQAly)&GD5=Pop1Ma5LC}S6^bgEa zsYPI6YU|~fsO_d$u@rW(L^839V3{tIC80#KGiT13Wgoxa-(^0(-^@8Zk<6Y*=7q~i zt=iri6b*IL+B;e{oUPF`P0D--)@c(-F$pZ{5dm+5X3+E9+B}%Ot4;AJWu71OdhLgh zEZGmm_q9n;%c8o~)DKr1o1Wk+@lGNGih^j97^bct>2&lRazd~bZL~ZC zJb+3q>4RGxXuTy3aCFJ!Pou~OS01BcE9!&UFe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HI)OgCWbZpWcm^^N^GC3QHFDUfj^oMfO`5IvsCdXn`IDL$rtI#D46; z3q;5crIv4_TNk>rH`u;j6& From 1e7e26b624827a1ce243fbe63aa6459cccc8258d Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 9 Jun 2018 21:04:53 -0400 Subject: [PATCH 07/10] [upgrade] Upgrade travis configuration to Java 1.8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8fef4513..896490ce5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,6 @@ addons: packages: - ant-optional jdk: - - openjdk7 + - openjdk8 script: - "ant -buildfile build.xml clean check jar unittest" From 6add0b396cb4a14488d53e5020cc7549f949bda4 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sun, 8 Jul 2018 11:32:51 -0400 Subject: [PATCH 08/10] [fixes #428] minor patch to fix behavior of toggling the details pane in the debug log window --- .../gui/dialogs/DebugLogDialog.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java index a6863e369..6ee7a95bc 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java @@ -169,13 +169,7 @@ public class DebugLogDialog extends JDialog { @Override public void actionPerformed(ActionEvent e) { boolean isActive = ((JCheckBox)e.getSource()).isSelected(); - log.info(" toggled to: "+isActive ); - bottomPanel.setEnabled(isActive); - if(isActive) { - split.setDividerLocation(0.5); - }else { - split.setDividerLocation(1.0); - } + enableDetailsPanel( isActive); } }); @@ -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); + } + } /** From 39d961df5694fc0ab6860b73447cd7a2798ce27e Mon Sep 17 00:00:00 2001 From: Joe Pfeiffer Date: Mon, 6 Aug 2018 17:11:12 -0600 Subject: [PATCH 09/10] Don't report timestep on thrust log line. First it was probably meant to be simulation time, not time step, and second it's already reported elsewhere Report altitude and event type at each simulation step --- .../sf/openrocket/simulation/BasicEventSimulationEngine.java | 5 +++-- .../net/sf/openrocket/simulation/RK4SimulationStepper.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index 7e48062e5..9416899c0 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -128,7 +128,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { if (nextEvent != null) { maxStepTime = MathUtil.max(nextEvent.getTime() - currentStatus.getSimulationTime(), 0.001); } - log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime()); + log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime() + " altitude " + oldAlt); currentStepper.step(currentStatus, maxStepTime); } SimulationListenerHelper.firePostStep(currentStatus); @@ -319,6 +319,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { } // Handle event + log.trace("Handling event " + event); switch (event.getType()) { case LAUNCH: { @@ -486,7 +487,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { break; case ALTITUDE: - log.trace("BasicEventSimulationEngine: Handling event " + event); + // nothing special needs to be done for this event break; case TUMBLE: diff --git a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java index ced30ce51..38f0eb7db 100644 --- a/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java +++ b/core/src/net/sf/openrocket/simulation/RK4SimulationStepper.java @@ -182,7 +182,7 @@ public class RK4SimulationStepper extends AbstractSimulationStepper { double thrustEstimate = store.thrustForce; store.thrustForce = calculateAverageThrust(status, store.timestep, store.longitudinalAcceleration, 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); // Log if difference over 1%, recompute if over 10% if (thrustDiff > 0.01 * thrustEstimate) { From 7d2e4757e846d525bcd0f11d9c2685d7ced5d5ba Mon Sep 17 00:00:00 2001 From: Joe Pfeiffer Date: Mon, 6 Aug 2018 17:21:24 -0600 Subject: [PATCH 10/10] Also eliminate redundant "BasicEventSimulationEngine" in log lines --- .../sf/openrocket/simulation/BasicEventSimulationEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java index 9416899c0..f9bb927ca 100644 --- a/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java +++ b/core/src/net/sf/openrocket/simulation/BasicEventSimulationEngine.java @@ -128,7 +128,7 @@ public class BasicEventSimulationEngine implements SimulationEngine { if (nextEvent != null) { maxStepTime = MathUtil.max(nextEvent.getTime() - currentStatus.getSimulationTime(), 0.001); } - log.trace("BasicEventSimulationEngine: Taking simulation step at t=" + currentStatus.getSimulationTime() + " altitude " + oldAlt); + log.trace("Taking simulation step at t=" + currentStatus.getSimulationTime() + " altitude " + oldAlt); currentStepper.step(currentStatus, maxStepTime); } SimulationListenerHelper.firePostStep(currentStatus);