create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / aerodynamics / barrowman / RocketComponentCalc.java
1 package net.sf.openrocket.aerodynamics.barrowman;
2
3 import net.sf.openrocket.aerodynamics.AerodynamicForces;
4 import net.sf.openrocket.aerodynamics.FlightConditions;
5 import net.sf.openrocket.aerodynamics.WarningSet;
6 import net.sf.openrocket.rocketcomponent.RocketComponent;
7
8 public abstract class RocketComponentCalc {
9
10         public RocketComponentCalc(RocketComponent component) {
11
12         }
13         
14         /**
15          * Calculate the non-axial forces produced by the component (normal and side forces,
16          * pitch, yaw and roll moments and CP position).  The values are stored in the
17          * <code>AerodynamicForces</code> object.  Additionally the value of CNa is computed
18          * and stored if possible without large amount of extra calculation, otherwise
19          * NaN is stored.  The CP coordinate is stored in local coordinates and moments are
20          * computed around the local origin.
21          * 
22          * @param conditions    the flight conditions.
23          * @param forces                the object in which to store the values.
24          * @param warnings              set in which to store possible warnings.
25          */
26         public abstract void calculateNonaxialForces(FlightConditions conditions, 
27                         AerodynamicForces forces, WarningSet warnings);
28
29         
30         /**
31          * Calculates the pressure drag of the component.  This component does NOT include
32          * the effect of discontinuities in the rocket body.
33          * 
34          * @param conditions    the flight conditions.
35          * @param stagnationCD  the current stagnation drag coefficient
36          * @param baseCD                the current base drag coefficient
37          * @param warnings              set in which to store possible warnings
38          * @return                              the pressure drag of the component
39          */
40         public abstract double calculatePressureDragForce(FlightConditions conditions, 
41                         double stagnationCD, double baseCD, WarningSet warnings);
42 }