From 066e2c8a3b1c6784727349f413f1ca53f7d548d0 Mon Sep 17 00:00:00 2001 From: hcraigmiller <68821492+hcraigmiller@users.noreply.github.com> Date: Sat, 28 May 2022 22:16:04 -0700 Subject: [PATCH] Corrected Parachute CD preset error Corrected error in preset which used packed length instead of the drag coefficient, and renamed/refactored variable "DragCoefficient" to "dragCoefficient". --- .../src/net/sf/openrocket/preset/xml/ParachuteDTO.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java b/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java index e7137fe99..6ebd20e86 100644 --- a/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java +++ b/core/src/net/sf/openrocket/preset/xml/ParachuteDTO.java @@ -28,7 +28,7 @@ public class ParachuteDTO extends BaseComponentDTO { @XmlElement(name = "PackedLength") private AnnotatedLengthDTO PackedLength; @XmlElement(name = "DragCoefficient") - private AnnotatedLengthDTO DragCoefficient; + private AnnotatedLengthDTO dragCoefficient; @XmlElement(name = "LineCount") private Integer lineCount; @XmlElement(name = "LineLength") @@ -87,13 +87,13 @@ public class ParachuteDTO extends BaseComponentDTO { } public double getDragCoefficient() { - return DragCoefficient.getValue(); + return dragCoefficient.getValue(); } public void setDragCoefficient(AnnotatedLengthDTO DragCoefficient) { - this.DragCoefficient = DragCoefficient; + this.dragCoefficient = DragCoefficient; } - public void setDragCoefficient(double DragCoefficient) { this.DragCoefficient = new AnnotatedLengthDTO(DragCoefficient); } + public void setDragCoefficient(double DragCoefficient) { this.dragCoefficient = new AnnotatedLengthDTO(DragCoefficient); } public Integer getLineCount() { return lineCount; @@ -173,7 +173,7 @@ public class ParachuteDTO extends BaseComponentDTO { if ( this.PackedLength != null ) { props.put(ComponentPreset.PACKED_LENGTH, this.getPackedLength()); } - if ( this.PackedLength != null ) { + if ( this.dragCoefficient != null ) { props.put(ComponentPreset.PARACHUTE_CD, this.getDragCoefficient()); } props.put(ComponentPreset.LINE_COUNT, this.getLineCount());