From 485c23161e5c6c921376d2729914301f0923d0cb Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 4 Apr 2023 00:04:02 +0200 Subject: [PATCH] Add warning when no motor --- .../sf/openrocket/file/rasaero/export/SimulationDTO.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/file/rasaero/export/SimulationDTO.java b/core/src/net/sf/openrocket/file/rasaero/export/SimulationDTO.java index f64ca9bd5..f898722ec 100644 --- a/core/src/net/sf/openrocket/file/rasaero/export/SimulationDTO.java +++ b/core/src/net/sf/openrocket/file/rasaero/export/SimulationDTO.java @@ -162,10 +162,17 @@ public class SimulationDTO { } int stageNr = rocket.getChildPosition(stage); + // Add friendly reminder to user + if (motor == null) { + warnings.add(String.format("Stage %s has no motor.
" + + "  --> When adding a motor in RASAero, don't forget to update the stage mass and CG.", + stage.getName())); + } + + // Add the simulation info for each stage FlightConfiguration CGCalcConfig = new FlightConfiguration(rocket); RigidBody calc; double ignitionDelay, totalCG, separationDelay; - switch (stageNr) { // Sustainer case 0: