1 package net.sf.openrocket.motor;
3 import net.sf.openrocket.util.Coordinate;
5 public interface Motor {
8 * Enum of rocket motor types.
10 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
13 SINGLE("Single-use", "Single-use solid propellant motor"),
14 RELOAD("Reloadable", "Reloadable solid propellant motor"),
15 HYBRID("Hybrid", "Hybrid rocket motor engine"),
16 UNKNOWN("Unknown", "Unknown motor type");
18 private final String name;
19 private final String description;
21 Type(String name, String description) {
23 this.description = description;
27 * Return a short name of this motor type.
28 * @return a short name of the motor type.
30 public String getName() {
35 * Return a long description of this motor type.
36 * @return a description of the motor type.
38 public String getDescription() {
43 public String toString() {
50 * Ejection charge delay value signifying a "plugged" motor with no ejection charge.
51 * The value is that of <code>Double.POSITIVE_INFINITY</code>.
53 public static final double PLUGGED = Double.POSITIVE_INFINITY;
57 * Below what portion of maximum thrust is the motor chosen to be off when
58 * calculating average thrust and burn time. NFPA 1125 defines the "official"
59 * burn time to be the time which the motor produces over 5% of its maximum thrust.
61 public static final double MARGINAL_THRUST = 0.05;
66 * Return the motor type.
68 * @return the motorType
70 public Type getMotorType();
74 * Return the designation of the motor.
76 * @return the designation
78 public String getDesignation();
81 * Return the designation of the motor, including a delay.
83 * @param delay the delay of the motor.
84 * @return designation with delay.
86 public String getDesignation(double delay);
90 * Return extra description for the motor. This may include for example
91 * comments on the source of the thrust curve. The returned <code>String</code>
92 * may include new-lines.
94 * @return the description
96 public String getDescription();
100 * Return the maximum diameter of the motor.
102 * @return the diameter
104 public double getDiameter();
107 * Return the length of the motor. This should be a "characteristic" length,
108 * and the exact definition may depend on the motor type. Typically this should
109 * be the length from the bottom of the motor to the end of the maximum diameter
110 * portion, ignoring any smaller ejection charge compartments.
114 public double getLength();
117 public MotorInstance getInstance();
120 public Coordinate getLaunchCG();
121 public Coordinate getEmptyCG();
124 public double getBurnTimeEstimate();
125 public double getAverageThrustEstimate();
126 public double getMaxThrustEstimate();
127 public double getTotalImpulseEstimate();
129 public double[] getTimePoints();
130 public double[] getThrustPoints();
131 public Coordinate[] getCGPoints();