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".
This commit is contained in:
hcraigmiller 2022-05-28 22:16:04 -07:00
parent b8a4cf6ad5
commit 066e2c8a3b

View File

@ -28,7 +28,7 @@ public class ParachuteDTO extends BaseComponentDTO {
@XmlElement(name = "PackedLength") @XmlElement(name = "PackedLength")
private AnnotatedLengthDTO PackedLength; private AnnotatedLengthDTO PackedLength;
@XmlElement(name = "DragCoefficient") @XmlElement(name = "DragCoefficient")
private AnnotatedLengthDTO DragCoefficient; private AnnotatedLengthDTO dragCoefficient;
@XmlElement(name = "LineCount") @XmlElement(name = "LineCount")
private Integer lineCount; private Integer lineCount;
@XmlElement(name = "LineLength") @XmlElement(name = "LineLength")
@ -87,13 +87,13 @@ public class ParachuteDTO extends BaseComponentDTO {
} }
public double getDragCoefficient() { public double getDragCoefficient() {
return DragCoefficient.getValue(); return dragCoefficient.getValue();
} }
public void setDragCoefficient(AnnotatedLengthDTO DragCoefficient) { 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() { public Integer getLineCount() {
return lineCount; return lineCount;
@ -173,7 +173,7 @@ public class ParachuteDTO extends BaseComponentDTO {
if ( this.PackedLength != null ) { if ( this.PackedLength != null ) {
props.put(ComponentPreset.PACKED_LENGTH, this.getPackedLength()); 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.PARACHUTE_CD, this.getDragCoefficient());
} }
props.put(ComponentPreset.LINE_COUNT, this.getLineCount()); props.put(ComponentPreset.LINE_COUNT, this.getLineCount());