1 package net.sf.openrocket.motor;
3 import net.sf.openrocket.models.atmosphere.AtmosphericConditions;
4 import net.sf.openrocket.util.Coordinate;
5 import net.sf.openrocket.util.Monitorable;
7 public interface MotorInstance extends Cloneable, Monitorable {
10 * Step the motor instance forward in time.
12 * @param time the time to step to, from motor ignition.
13 * @param acceleration the average acceleration during the step.
14 * @param cond the average atmospheric conditions during the step.
16 public void step(double time, double acceleration, AtmosphericConditions cond);
20 * Return the time to which this motor has been stepped.
21 * @return the current step time.
23 public double getTime();
26 * Return the average thrust during the last step.
28 public double getThrust();
31 * Return the average CG location during the last step.
33 public Coordinate getCG();
36 * Return the average longitudal moment of inertia during the last step.
37 * This is the actual inertia, not the unit inertia!
39 public double getLongitudalInertia();
42 * Return the average rotational moment of inertia during the last step.
43 * This is the actual inertia, not the unit inertia!
45 public double getRotationalInertia();
48 * Return whether this motor still produces thrust. If this method returns false
49 * the motor has burnt out, and will not produce any significant thrust anymore.
51 public boolean isActive();
55 * Create a new instance of this motor instance. The state of the motor is
56 * identical to this instance and can be used independently from this one.
58 public MotorInstance clone();