create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / motor / MotorInstance.java
1 package net.sf.openrocket.motor;
2
3 import net.sf.openrocket.models.atmosphere.AtmosphericConditions;
4 import net.sf.openrocket.util.Coordinate;
5 import net.sf.openrocket.util.Monitorable;
6
7 public interface MotorInstance extends Cloneable, Monitorable {
8
9         /**
10          * Step the motor instance forward in time.
11          * 
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.
15          */
16         public void step(double time, double acceleration, AtmosphericConditions cond);
17
18
19         /**
20          * Return the time to which this motor has been stepped.
21          * @return      the current step time.
22          */
23         public double getTime();
24         
25         /**
26          * Return the average thrust during the last step.
27          */
28         public double getThrust();
29         
30         /**
31          * Return the average CG location during the last step.
32          */
33         public Coordinate getCG();
34         
35         /**
36          * Return the average longitudinal moment of inertia during the last step.
37          * This is the actual inertia, not the unit inertia!
38          */
39         public double getLongitudinalInertia();
40         
41         /**
42          * Return the average rotational moment of inertia during the last step.
43          * This is the actual inertia, not the unit inertia!
44          */
45         public double getRotationalInertia();
46
47         /**
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.
50          */
51         public boolean isActive();
52
53         
54         /**
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.
57          */
58         public MotorInstance clone();
59
60
61         public Motor getParentMotor();
62         
63 }