1 package net.sf.openrocket.aerodynamics;
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;
11 * An interface for performing aerodynamic calculations on rockets.
13 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
15 public interface AerodynamicCalculator extends Monitorable {
18 * Calculate the CP of the specified configuration.
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
25 public Coordinate getCP(Configuration configuration, FlightConditions conditions, WarningSet warnings);
28 * Calculate the aerodynamic forces acting upon the rocket.
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.
35 public AerodynamicForces getAerodynamicForces(Configuration configuration,
36 FlightConditions conditions, WarningSet warnings);
39 * Calculate the aerodynamic forces acting upon the rocket with a component analysis.
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
48 public Map<RocketComponent, AerodynamicForces> getForceAnalysis(Configuration configuration,
49 FlightConditions conditions, WarningSet warnings);
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.
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.
60 public Coordinate getWorstCP(Configuration configuration, FlightConditions conditions,
64 * Return a new instance of this aerodynamic calculator type.
66 * @return a new, independent instance of this aerodynamic calculator type
68 public AerodynamicCalculator newInstance();