1 package net.sf.openrocket.file.rocksim.export;
3 import net.sf.openrocket.file.rocksim.RocksimCommonConstants;
4 import net.sf.openrocket.rocketcomponent.Streamer;
6 import javax.xml.bind.annotation.XmlAccessType;
7 import javax.xml.bind.annotation.XmlAccessorType;
8 import javax.xml.bind.annotation.XmlElement;
9 import javax.xml.bind.annotation.XmlRootElement;
12 * This class models a Rocksim XML element for a streamer.
14 @XmlRootElement(name = RocksimCommonConstants.STREAMER)
15 @XmlAccessorType(XmlAccessType.FIELD)
16 public class StreamerDTO extends BasePartDTO {
18 @XmlElement(name = RocksimCommonConstants.WIDTH)
19 private double width = 0d;
20 @XmlElement(name = RocksimCommonConstants.DRAG_COEFFICIENT)
21 private double dragCoefficient = 0.75d;
24 * The default constructor.
26 public StreamerDTO() {
30 * Copy constructor. This constructor fully populates this instance with values taken from the OR component.
32 * @param theORStreamer the OR streamer component
34 public StreamerDTO(Streamer theORStreamer) {
36 setWidth(theORStreamer.getStripWidth() * RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
37 setDragCoefficient(theORStreamer.getCD());
40 public double getWidth() {
44 public void setWidth(double theWidth) {
48 public double getDragCoefficient() {
49 return dragCoefficient;
52 public void setDragCoefficient(double theDragCoefficient) {
53 dragCoefficient = theDragCoefficient;