]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGTurboProp.h
Merge branch 'next' into durk-atc
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGTurboProp.h
index 6ee080500f6e6950125dfc6ca6ace812e3729562..1c5f48ae9b04e440578b9ef53c1107e20e9d5848 100755 (executable)
@@ -27,6 +27,7 @@
 HISTORY
 --------------------------------------------------------------------------------
 05/14/2004  Created
+02/08/2011  T. Kreitler, added rotor support
 
 //JVK (mark)
 
@@ -43,10 +44,10 @@ INCLUDES
 
 #include <vector>
 #include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGTable.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGTable.h"
 
-#define ID_TURBOPROP "$Id$"
+#define ID_TURBOPROP "$Id: FGTurboProp.h,v 1.14 2011/03/10 01:35:25 dpculp Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -58,8 +59,33 @@ namespace JSBSim {
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-/** Turboprop engine model.
-
+/** Turboprop engine model.  For an example of this model in use see the file:
+    engine/engtm601.xml
+ <h3>Configuration parameters:</h3>
+<pre>
+milthrust   [LBS]
+idlen1      [%]
+maxn1       [%]
+betarangeend[%]
+    if ThrottleCmd < betarangeend/100.0 then engine power=idle, propeller pitch
+    is controled by ThrottleCmd (between MINPITCH and  REVERSEPITCH).
+    if ThrottleCmd > betarangeend/100.0 then engine power increases up to max reverse power
+reversemaxpower [%]
+    max engine power in reverse mode
+maxpower    [HP]
+psfc power specific fuel consumption [pph/HP] for N1=100%
+n1idle_max_delay [-] time constant for N1 change
+maxstartenginetime [sec]
+    after this time the automatic starting cycle is interrupted when the engine
+    doesn't start (0=automatic starting not present)
+startern1   [%]
+    when starting starter spin up engine to this spin
+ielumaxtorque [lb.ft]
+    if torque>ielumaxtorque limiters decrease the throttle
+    (ielu = Integrated Electronic Limiter Unit)
+itt_delay [-] time constant for ITT change
+    (ITT = Inter Turbine Temperature)
+</pre>
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -79,14 +105,13 @@ public:
 
   enum phaseType { tpOff, tpRun, tpSpinUp, tpStart, tpStall, tpSeize, tpTrim };
 
-  double Calculate(void);
+  void Calculate(void);
   double CalcFuelNeed(void);
 
-  inline double GetPowerAvailable(void) const {return (Eng_HP * hptoftlbssec);}
-  inline double GetPowerAvailable_HP(void) const {return (Eng_HP);}
-  inline double GetPropRPM(void) const {return (Prop_RPM);}
-  inline double GetThrottleCmd(void) const {return (ThrottleCmd);}
-  inline bool GetIeluIntervent(void) const { return Ielu_intervent; }
+  double GetPowerAvailable(void) const { return (HP * hptoftlbssec); }
+  double GetRPM(void) const { return (RPM); }
+  double GetIeluThrottle(void) const { return (Throttle); }
+  bool GetIeluIntervent(void) const { return Ielu_intervent; }
 
   double Seek(double* var, double target, double accel, double decel);
   double ExpSeek(double* var, double target, double accel, double decel);
@@ -121,9 +146,9 @@ public:
 
   inline void SetGeneratorPower(bool gp) { GeneratorPower=gp; }
   inline void SetCondition(bool c) { Condition=c; }
-
-  string GetEngineLabels(string delimeter);  // added from Turbine 0.9.6
-  string GetEngineValues(string delimeter);  // added from Turbine 0.9.6
+  int InitRunning(void);
+  std::string GetEngineLabels(const std::string& delimiter);
+  std::string GetEngineValues(const std::string& delimiter);
 
 private:
 
@@ -140,7 +165,7 @@ private:
   double dt;               ///< Simulator time slice
   double N1_factor;        ///< factor to tie N1 and throttle
   double N2_factor;        ///< factor to tie N2 and throttle
-  double ThrottleCmd;      ///< FCS-supplied throttle position
+  double Throttle;         ///< FCS-supplied throttle position
   double TAT;              ///< total air temperature (deg C)
   bool Stalled;            ///< true if engine is compressor-stalled
   bool Seized;             ///< true if inner spool is seized
@@ -163,26 +188,27 @@ private:
   double BetaRangeThrottleEnd; // coef (0-1) where is end of beta-range
   double ReverseMaxPower;      // coef (0-1) multiplies max throttle on reverse
 
-  double Idle_Max_Delay;       // time delay for exponencial
+  double Idle_Max_Delay;       // time delay for exponential
   double MaxPower;             // max engine power [HP]
-  double StarterN1;               // rotates of generator maked by starter [%]
-  double MaxStartingTime;           // maximal time for start [s] (-1 means not used)
-  double Prop_RPM;             // propeller RPM
+  double StarterN1;            // rotates of generator maked by starter [%]
+  double MaxStartingTime;      // maximal time for start [s] (-1 means not used)
+  double RPM;                  // shaft RPM
   double Velocity;
   double rho;
   double PSFC;                 // Power specific fuel comsumption [lb/(HP*hr)] at best efficiency
 
-  double Eng_HP;               // current engine power
+  double HP;                   // engine power output
 
-  double StartTime;               // engine strating time [s] (0 when start button pushed)
+  double StartTime;            // engine starting time [s] (0 when start button pushed)
 
-  double  ITT_Delay;            // time delay for exponencial grow of ITT
+  double  ITT_Delay;           // time delay for exponential growth of ITT
   double  Eng_ITT_degC;
   double  Eng_Temperature;     // temperature inside engine
 
   bool EngStarting;            // logicaly output - TRUE if engine is starting
   bool GeneratorPower;
   int Condition;
+  int thrusterType;            // the attached thruster
 
   double Off(void);
   double Run(void);
@@ -192,10 +218,9 @@ private:
   void SetDefaults(void);
   bool Load(FGFDMExec *exec, Element *el);
   void bindmodel(void);
-  void unbind(void);
   void Debug(int from);
 
-  FGTable* ITT_N1; // ITT temperature depending on throttle command
+  FGTable* ITT_N1;             // ITT temperature depending on throttle command
   FGTable* EnginePowerRPM_N1;
   FGTable* EnginePowerVC;
 };