]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGPropeller.h
Merge branch 'next' of git://gitorious.org/fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGPropeller.h
index a2ddc9f419fc4223bd4612d9cd48fa49e849e8f4..94fb454ec903ebe3f7e99e0094cd961ba8ee7b47 100644 (file)
@@ -39,13 +39,13 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGThruster.h"
-#include <math/FGTable.h>
+#include "math/FGTable.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_PROPELLER "$Id$"
+#define ID_PROPELLER "$Id: FGPropeller.h,v 1.18 2011/06/06 22:39:52 jentron Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -62,6 +62,7 @@ CLASS DOCUMENTATION
 
 <h3>Configuration File Format:</h3>
 @code
+<sense> {1 | -1} </sense> 
 <propeller name="{string}">
   <ixx> {number} </ixx>
   <diameter unit="IN"> {number} </diameter>
@@ -71,8 +72,8 @@ CLASS DOCUMENTATION
   <maxpitch> {number} </maxpitch>
   <minrpm> {number} </minrpm>
   <maxrpm> {number} </maxrpm>
+  <constspeed> {number} </constspeed>
   <reversepitch> {number} </reversepitch>
-  <sense> {1 | -1} </sense>
   <p_factor> {number} </p_factor>
   <ct_factor> {number} </ct_factor>
   <cp_factor> {number} </cp_factor>
@@ -89,6 +90,19 @@ CLASS DOCUMENTATION
     </tableData>
   </table>
 
+  <table name="CT_MACH" type="internal">
+    <tableData>
+      {numbers}
+    </tableData>
+  </table>
+
+  <table name="CP_MACH" type="internal">
+    <tableData>
+      {numbers}
+    </tableData>
+  </table>
+
+
 </propeller>
 @endcode
 
@@ -102,16 +116,21 @@ CLASS DOCUMENTATION
     \<maxpitch>      - Maximum blade pitch angle.
     \<minrpm>        - Minimum rpm target for constant speed propeller.
     \<maxrpm>        - Maximum rpm target for constant speed propeller.
+    \<constspeed>    - 1 = constant speed mode, 0 = manual pitch mode. 
     \<reversepitch>  - Blade pitch angle for reverse.
     \<sense>         - Direction of rotation (1=clockwise as viewed from cockpit,
-                        -1=anti-clockwise as viewed from cockpit).
+                        -1=anti-clockwise as viewed from cockpit). Sense is
+                       specified in the parent tag of the propeller.
     \<p_factor>      - P factor.
     \<ct_factor>     - A multiplier for the coefficients of thrust.
     \<cp_factor>     - A multiplier for the coefficients of power.
 </pre>
 
     Two tables are needed. One for coefficient of thrust (Ct) and one for
-    coefficient of power (Cp).  
+    coefficient of power (Cp).
+
+    Two tables are optional. They apply a factor to Ct and Cp based on the
+    helical tip Mach.  
     <br>
 
     Several references were helpful, here:<ul>
@@ -123,7 +142,7 @@ CLASS DOCUMENTATION
     <li>Various NACA Technical Notes and Reports</li>
     </ul>
     @author Jon S. Berndt
-    @version $Id$
+    @version $Id: FGPropeller.h,v 1.18 2011/06/06 22:39:52 jentron Exp $
     @see FGEngine
     @see FGThruster
 */
@@ -169,6 +188,9 @@ public:
   /// Sets the P-Factor constant
   void SetPFactor(double pf) {P_Factor = pf;}
 
+  /// Sets propeller into constant speed mode, or manual pitch mode
+  void SetConstantSpeed(int mode) {ConstantSpeed = mode;} 
+
   /// Sets coefficient of thrust multiplier
   void SetCtFactor(double ctf) {CtFactor = ctf;}
 
@@ -204,6 +226,11 @@ public:
   /// Retrieves propeller power table
   FGTable* GetCPowerTable(void)  const { return cPower; }
 
+  /// Retrieves propeller thrust Mach effects factor
+  FGTable* GetCtMachTable(void) const { return CtMach; }
+  /// Retrieves propeller power Mach effects factor
+  FGTable* GetCpMachTable(void) const { return CpMach; }
+
   /// Retrieves the Torque in foot-pounds (Don't you love the English system?)
   double GetTorque(void)        { return vTorque(eX);    }
 
@@ -221,7 +248,7 @@ public:
       accelerate the prop. It could be negative, dictating that the propeller
       would be slowed.
       @return the thrust in pounds */
-  double Calculate(double PowerAvailable);
+  double Calculate(double EnginePower);
   FGColumnVector3 GetPFactor(void);
   string GetThrusterLabels(int id, string delimeter);
   string GetThrusterValues(int id, string delimeter);
@@ -233,6 +260,10 @@ public:
   void   SetFeather (bool f) { Feathered = f; }
   bool   GetFeather (void) { return Feathered; }
   double GetThrustCoefficient(void) const {return ThrustCoeff;}
+  double GetHelicalTipMach(void) const {return HelicalTipMach;}
+  int    GetConstantSpeed(void) const {return ConstantSpeed;}
+  void   SetInducedVelocity(double Vi) {Vinduced = Vi;}
+  double GetInducedVelocity(void) const {return Vinduced;}
 
 private:
   int   numBlades;
@@ -251,14 +282,19 @@ private:
   double ExcessTorque;
   double D4;
   double D5;
+  double HelicalTipMach;
+  double Vinduced;
   FGColumnVector3 vTorque;
   FGTable *cThrust;
   FGTable *cPower;
+  FGTable *CtMach;
+  FGTable *CpMach;
   double CtFactor;
   double CpFactor;
+  int    ConstantSpeed;
   void Debug(int from);
   double ReversePitch; // Pitch, when fully reversed
-  bool   Reversed;              // true, when propeller is reversed
+  bool   Reversed;     // true, when propeller is reversed
   double Reverse_coef; // 0 - 1 defines AdvancePitch (0=MIN_PITCH 1=REVERSE_PITCH)
   bool   Feathered;    // true, if feather command
 };