From b08658ebe4fa90e02fd6a2cbafbc1c3103b5f943 Mon Sep 17 00:00:00 2001 From: H Craig Miller <68821492+hcraigmiller@users.noreply.github.com> Date: Fri, 16 Dec 2022 05:30:51 -0800 Subject: [PATCH] [#1890] Updates zero-body warning messaging (#1891) Update Zero-body messaging --- core/resources/l10n/messages.properties | 7 +++---- core/resources/l10n/messages_nl.properties | 3 +-- core/resources/l10n/messages_ru.properties | 3 +-- core/src/net/sf/openrocket/aerodynamics/Warning.java | 3 +-- .../sf/openrocket/aerodynamics/barrowman/FinSetCalc.java | 7 ++----- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index c63e110ca..d66aa5085 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -1859,10 +1859,9 @@ Warning.RECOVERY_HIGH_SPEED = Recovery device deployment at high speed Warning.NO_RECOVERY_DEVICE = No recovery device defined in the simulation. Warning.TUMBLE_UNDER_THRUST = Stage began to tumble under thrust. Warning.EVENT_AFTER_LANDING = Flight Event occurred after landing: -Warning.ZERO_LENGTH_BODY = Zero length bodies may not result in accurate simulations. -Warning.ZERO_RADIUS_BODY = Zero length bodies may not result in accurate simulations. -Warning.TUBE_SEPARATION = Space between tube fins may not result in accurate simulations. -Warning.TUBE_OVERLAP = Overlapping tube fins may not result in accurate simulations. +Warning.ZERO_VOLUME_BODY = Zero-volume bodies may not simulate accurately. +Warning.TUBE_SEPARATION = Space between tube fins may not simulate accurately. +Warning.TUBE_OVERLAP = Overlapping tube fins may not simulate accurately. Warning.EMPTY_BRANCH = Simulation branch contains no data Warning.SEPARATION_ORDER = Stages separated in an unreasonable order diff --git a/core/resources/l10n/messages_nl.properties b/core/resources/l10n/messages_nl.properties index d00fd2d53..2cbf92ceb 100644 --- a/core/resources/l10n/messages_nl.properties +++ b/core/resources/l10n/messages_nl.properties @@ -1700,8 +1700,7 @@ Warning.RECOVERY_LAUNCH_ROD = Terugvorderingsapparaat ingezet tijdens de lanceri Warning.RECOVERY_HIGH_SPEED = Terugvorderingsapparaat ingezet bij hoge snelheid Warning.TUMBLE_UNDER_THRUST = Trap begon te tuimelen onder stuwkracht. Warning.EVENT_AFTER_LANDING = Vlucht evenement opgetreden tijdens landing: -Warning.ZERO_LENGTH_BODY = Lichamen met een lengte van nul resulteren mogelijk niet in nauwkeurige simulaties. -Warning.ZERO_RADIUS_BODY = Lichamen met een lengte van nul resulteren mogelijk niet in nauwkeurige simulaties. +Warning.ZERO_VOLUME_BODY = Lichamen met een lengte van nul resulteren mogelijk niet in nauwkeurige simulaties. ! Scale dialog ScaleDialog.lbl.scaleRocket = Volledige raket diff --git a/core/resources/l10n/messages_ru.properties b/core/resources/l10n/messages_ru.properties index b9eee7e88..de6876838 100644 --- a/core/resources/l10n/messages_ru.properties +++ b/core/resources/l10n/messages_ru.properties @@ -1823,8 +1823,7 @@ Warning.RECOVERY_HIGH_SPEED = \u0421\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u Warning.NO_RECOVERY_DEVICE = \u0412 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u043D\u0435\u0442 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432 \u0441\u043F\u0430\u0441\u0435\u043D\u0438\u044F Warning.TUMBLE_UNDER_THRUST = \u0421\u0442\u0443\u043F\u0435\u043D\u044C \u043D\u0430\u0447\u0430\u043B\u0430 \u043A\u0443\u0432\u044B\u0440\u044C\u043A\u0430\u0442\u044C\u0441\u044F \u043F\u043E\u0434 \u0442\u044F\u0433\u043E\u0439. Warning.EVENT_AFTER_LANDING = \u041B\u0435\u0442\u043D\u043E\u0435 \u0441\u043E\u0431\u044B\u0442\u0438\u0435 \u0432\u043E\u0437\u043D\u0438\u043A\u043B\u043E \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u0437\u0435\u043C\u043B\u0435\u043D\u0438\u044F: -Warning.ZERO_LENGTH_BODY = \u0422\u0435\u043B\u0430 \u043D\u0443\u043B\u0435\u0432\u043E\u0439 \u0434\u043B\u0438\u043D\u044B \u043C\u043E\u0433\u0443\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u043D\u0435\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044F\u043C \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435. -Warning.ZERO_RADIUS_BODY = \u0422\u0435\u043B\u0430 \u043D\u0443\u043B\u0435\u0432\u043E\u0433\u043E \u0440\u0430\u0434\u0438\u0443\u0441\u0430 \u043C\u043E\u0433\u0443\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u043D\u0435\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044F\u043C \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435. +Warning.ZERO_VOLUME_BODY = \u0422\u0435\u043B\u0430 \u043D\u0443\u043B\u0435\u0432\u043E\u0439 \u0434\u043B\u0438\u043D\u044B \u043C\u043E\u0433\u0443\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u043D\u0435\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044F\u043C \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435. Warning.TUBE_SEPARATION = \u041F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u043C\u0435\u0436\u0434\u0443 \u0442\u0440\u0443\u0431\u0447\u0430\u0442\u044B\u043C\u0438 \u0441\u0442\u0430\u0431\u0438\u043B\u0438\u0437\u0430\u0442\u043E\u0440\u0430\u043C\u0438 \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u043D\u0435\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044F\u043C \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435. Warning.TUBE_OVERLAP = \u041F\u0435\u0440\u0435\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0435\u0441\u044F \u0442\u0440\u0443\u0431\u0447\u0430\u0442\u044B\u0435 \u0441\u0442\u0430\u0431\u0438\u043B\u0438\u0437\u0430\u0442\u043E\u0440\u044B \u043C\u043E\u0433\u0443\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u043D\u0435\u0442\u043E\u0447\u043D\u043E\u0441\u0442\u044F\u043C \u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0435. diff --git a/core/src/net/sf/openrocket/aerodynamics/Warning.java b/core/src/net/sf/openrocket/aerodynamics/Warning.java index ae7c94e35..c746650ea 100644 --- a/core/src/net/sf/openrocket/aerodynamics/Warning.java +++ b/core/src/net/sf/openrocket/aerodynamics/Warning.java @@ -390,8 +390,7 @@ public abstract class Warning { public static final Warning EVENT_AFTER_LANDING = new Other(trans.get("Warning.EVENT_AFTER_LANDING")); - public static final Warning ZERO_LENGTH_BODY = new Other(trans.get("Warning.ZERO_LENGTH_BODY")); - public static final Warning ZERO_RADIUS_BODY = new Other(trans.get("Warning.ZERO_RADIUS_BODY")); + public static final Warning ZERO_VOLUME_BODY = new Other(trans.get("Warning.ZERO_VOLUME_BODY")); public static final Warning TUBE_SEPARATION = new Other(trans.get("Warning.TUBE_SEPARATION")); public static final Warning TUBE_OVERLAP = new Other(trans.get("Warning.TUBE_OVERLAP")); diff --git a/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java b/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java index d73317a1e..1bafd4abc 100644 --- a/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java +++ b/core/src/net/sf/openrocket/aerodynamics/barrowman/FinSetCalc.java @@ -101,12 +101,9 @@ public class FinSetCalc extends RocketComponentCalc { return; } - if((EPSILON > bodyLength)) { + if ((bodyLength < EPSILON) || (bodyRadius < EPSILON)) { // Add warnings: Phantom Body - warnings.add(Warning.ZERO_LENGTH_BODY); - }else if((EPSILON > bodyRadius)){ - // Add warnings: Phantom Body - warnings.add(Warning.ZERO_RADIUS_BODY); + warnings.add(Warning.ZERO_VOLUME_BODY); }else if( (0 < bodyRadius) && (thickness > bodyRadius / 2)){ // Add warnings (radius/2 == diameter/4) warnings.add(Warning.THICK_FIN);