From 0b3c4ec7b15663a289b9c3dcad9e85341779b1d9 Mon Sep 17 00:00:00 2001 From: Ray Clark Date: Sun, 2 Oct 2022 19:40:01 +1100 Subject: [PATCH 1/2] Added blank WarningSet to fix error --- .../openrocket/simulation/listeners/example/DampingMoment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java b/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java index 0665766e6..326a1843f 100644 --- a/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java +++ b/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java @@ -6,6 +6,7 @@ import java.util.Map; import net.sf.openrocket.aerodynamics.AerodynamicCalculator; import net.sf.openrocket.aerodynamics.AerodynamicForces; import net.sf.openrocket.aerodynamics.FlightConditions; +import net.sf.openrocket.aerodynamics.WarningSet; import net.sf.openrocket.motor.MotorConfiguration; import net.sf.openrocket.rocketcomponent.FlightConfiguration; import net.sf.openrocket.rocketcomponent.RocketComponent; @@ -85,7 +86,7 @@ public class DampingMoment extends AbstractSimulationListener { AerodynamicCalculator aerocalc = status.getSimulationConditions().getAerodynamicCalculator(); // Must go through each component ... - Map forces = aerocalc.getForceAnalysis(status.getConfiguration(), flightConditions, null); + Map forces = aerocalc.getForceAnalysis(status.getConfiguration(), flightConditions, new WarningSet()); for (Map.Entry entry : forces.entrySet()) { RocketComponent comp = entry.getKey(); From c86569bd1b0e6ae6f949e4b5b2768d866321f844 Mon Sep 17 00:00:00 2001 From: Ray Clark Date: Mon, 3 Oct 2022 11:06:33 +1100 Subject: [PATCH 2/2] Forward simulation warning set --- .../openrocket/simulation/listeners/example/DampingMoment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java b/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java index 326a1843f..6d5839e07 100644 --- a/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java +++ b/core/src/net/sf/openrocket/simulation/listeners/example/DampingMoment.java @@ -86,7 +86,7 @@ public class DampingMoment extends AbstractSimulationListener { AerodynamicCalculator aerocalc = status.getSimulationConditions().getAerodynamicCalculator(); // Must go through each component ... - Map forces = aerocalc.getForceAnalysis(status.getConfiguration(), flightConditions, new WarningSet()); + Map forces = aerocalc.getForceAnalysis(status.getConfiguration(), flightConditions, status.getWarnings()); for (Map.Entry entry : forces.entrySet()) { RocketComponent comp = entry.getKey();