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;
28 * Return a short name of this motor type.
29 * @return a short name of the motor type.
31 public String getName() {
36 * Return a long description of this motor type.
37 * @return a description of the motor type.
39 public String getDescription() {
44 public String toString() {
51 * Ejection charge delay value signifying a "plugged" motor with no ejection charge.
52 * The value is that of <code>Double.POSITIVE_INFINITY</code>.
54 public static final double PLUGGED = Double.POSITIVE_INFINITY;
58 * Below what portion of maximum thrust is the motor chosen to be off when
59 * calculating average thrust and burn time. NFPA 1125 defines the "official"
60 * burn time to be the time which the motor produces over 5% of its maximum thrust.
62 public static final double MARGINAL_THRUST = 0.05;
67 * Return the motor type.
69 * @return the motorType
71 public Type getMotorType();
75 * Return the designation of the motor.
77 * @return the designation
79 public String getDesignation();
82 * Return the designation of the motor, including a delay.
84 * @param delay the delay of the motor.
85 * @return designation with delay.
87 public String getDesignation(double delay);
91 * Return extra description for the motor. This may include for example
92 * comments on the source of the thrust curve. The returned <code>String</code>
93 * may include new-lines.
95 * @return the description
97 public String getDescription();
101 * Return the maximum diameter of the motor.
103 * @return the diameter
105 public double getDiameter();
108 * Return the length of the motor. This should be a "characteristic" length,
109 * and the exact definition may depend on the motor type. Typically this should
110 * be the length from the bottom of the motor to the end of the maximum diameter
111 * portion, ignoring any smaller ejection charge compartments.
115 public double getLength();
117 public String getDigest();
119 public MotorInstance getInstance();
122 public Coordinate getLaunchCG();
124 public Coordinate getEmptyCG();
128 * Return an estimate of the burn time of this motor, or NaN if an estimate is unavailable.
130 public double getBurnTimeEstimate();
133 * Return an estimate of the average thrust of this motor, or NaN if an estimate is unavailable.
135 public double getAverageThrustEstimate();
138 * Return an estimate of the maximum thrust of this motor, or NaN if an estimate is unavailable.
140 public double getMaxThrustEstimate();
143 * Return an estimate of the total impulse of this motor, or NaN if an estimate is unavailable.
145 public double getTotalImpulseEstimate();