create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / aerodynamics / AerodynamicCalculator.java
1 package net.sf.openrocket.aerodynamics;
2
3 import java.util.Map;
4
5 import net.sf.openrocket.rocketcomponent.Configuration;
6 import net.sf.openrocket.rocketcomponent.RocketComponent;
7 import net.sf.openrocket.util.Coordinate;
8 import net.sf.openrocket.util.Monitorable;
9
10 /**
11  * An interface for performing aerodynamic calculations on rockets.
12  * 
13  * @author Sampo Niskanen <sampo.niskanen@iki.fi>
14  */
15 public interface AerodynamicCalculator extends Monitorable {
16         
17         /**
18          * Calculate the CP of the specified configuration.
19          * 
20          * @param configuration         the rocket configuration
21          * @param conditions            the flight conditions
22          * @param warnings                      the set in which to place warnings, or <code>null</code>
23          * @return                                      the CP position in absolute coordinates
24          */
25         public Coordinate getCP(Configuration configuration, FlightConditions conditions, WarningSet warnings);
26         
27         /**
28          * Calculate the aerodynamic forces acting upon the rocket.
29          * 
30          * @param configuration         the rocket configuration.
31          * @param conditions            the flight conditions.
32          * @param warnings                      the set in which to place warnings, or <code>null</code>.
33          * @return                                      the aerodynamic forces acting upon the rocket.
34          */
35         public AerodynamicForces getAerodynamicForces(Configuration configuration,
36                         FlightConditions conditions, WarningSet warnings);
37         
38         /**
39          * Calculate the aerodynamic forces acting upon the rocket with a component analysis.
40          * 
41          * @param configuration         the rocket configuration.
42          * @param conditions            the flight conditions.
43          * @param warnings                      the set in which to place warnings, or <code>null</code>.
44          * @return                                      a map from the rocket components to the aerodynamic force portions that component
45          *                                                      exerts.  The map contains an value for the base rocket, which is the total
46          *                                                      aerodynamic forces.
47          */
48         public Map<RocketComponent, AerodynamicForces> getForceAnalysis(Configuration configuration,
49                         FlightConditions conditions, WarningSet warnings);
50         
51         /**
52          * Calculate the worst CP occurring for any lateral wind angle.  The worst CP is returned and the theta angle
53          * that produces the worst CP is stored in the flight conditions.
54          * 
55          * @param configuration         the rocket configuration.
56          * @param conditions            the flight conditions.
57          * @param warnings                      the set in which to place warnings, or <code>null</code>.
58          * @return                                      the worst (foremost) CP position for any lateral wind angle.
59          */
60         public Coordinate getWorstCP(Configuration configuration, FlightConditions conditions,
61                         WarningSet warnings);
62         
63         /**
64          * Return a new instance of this aerodynamic calculator type.
65          * 
66          * @return      a new, independent instance of this aerodynamic calculator type
67          */
68         public AerodynamicCalculator newInstance();
69         
70 }