]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropeller.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGPropeller.h
index ff65142e3131b2200354c57d9aca474e78455e50..f6ed849afed5d28eb250849c6db9fa6f524a6568 100644 (file)
@@ -62,8 +62,8 @@ CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Propeller modeling class.
-    FGPropeller models a propeller given the tabular data for Ct, Cp, and
-    efficiency indexed by advance ratio "J". The data for the propeller is
+    FGPropeller models a propeller given the tabular data for Ct and Cp
+    indexed by advance ratio "J". The data for the propeller is
     stored in a config file named "prop_name.xml". The propeller config file
     is referenced from the main aircraft config file in the "Propulsion" section.
     See the constructor for FGPropeller to see what is read in and what should
@@ -81,6 +81,10 @@ CLASS DOCUMENTATION
     @see FGEngine
     @see FGThruster
     @see FGTable
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGPropeller.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Header File </a>
+    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGPropeller.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+         Source File </a>
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -106,18 +110,25 @@ public:
       @param rpm the rotational velocity of the propeller */
   void SetRPM(double rpm) {RPM = rpm;}
 
+  /// Returns true of this propeller is variable pitch
+  bool IsVPitch(void) {return MaxPitch != MinPitch;}
+
   /** This commands the pitch of the blade to change to the value supplied.
       This call is meant to be issued either from the cockpit or by the flight
       control system (perhaps to maintain constant RPM for a constant-speed
       propeller). This value will be limited to be within whatever is specified
       in the config file for Max and Min pitch. It is also one of the lookup
-      indices to the power, thrust, and efficiency tables for variable-pitch
-      propellers.
+      indices to the power and thrust tables for variable-pitch propellers.
       @param pitch the pitch of the blade in degrees. */
   void SetPitch(double pitch) {Pitch = pitch;}
-  
+
+  /// Sets the P-Factor constant
   void SetPFactor(double pf) {P_Factor = pf;}
-  
+
+  /** Sets the rotation sense of the propeller.
+      @param s this value should be +/- 1 ONLY. +1 indicates clockwise rotation as
+               viewed by someone standing behind the engine looking forward into
+               the direction of flight. */
   void SetSense(double s) { Sense = s;}
 
   /// Retrieves the pitch of the propeller in degrees.
@@ -130,7 +141,7 @@ public:
   double GetIxx(void)           { return Ixx;           }
   
   /// Retrieves the Torque in foot-pounds (Don't you love the English system?)
-  double GetTorque(void)        { return Torque;        }
+  double GetTorque(void)        { return vTorque(eX);    }
   
   /** Retrieves the power required (or "absorbed") by the propeller -
       i.e. the power required to keep spinning the propeller at the current
@@ -145,8 +156,9 @@ public:
       @param PowerAvailable this is the excess power provided by the engine to
       accelerate the prop. It could be negative, dictating that the propeller
       would be slowed.
-                 @return the thrust in pounds */
+      @return the thrust in pounds */
   double Calculate(double PowerAvailable);
+  FGColumnVector3 GetPFactor(void);
 
 private:
   int   numBlades;
@@ -155,14 +167,16 @@ private:
   double Diameter;
   double MaxPitch;
   double MinPitch;
+  double MinRPM;
+  double MaxRPM;
   double P_Factor;
   double Sense;
   double Pitch;
-  double Torque;
-  FGTable *Efficiency;
+  double ExcessTorque;
+  FGColumnVector3 vTorque;
   FGTable *cThrust;
   FGTable *cPower;
-  void Debug(void);
+  void Debug(int from);
 };
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%