]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGTurbine.h
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGTurbine.h
index 4c63dc6028c1e7d94da6557e16b97c5c4ddffeea..67816c1912245ef303c665048353be4eae66ebf5 100644 (file)
@@ -40,12 +40,9 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#include <vector>
 #include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGFunction.h>
 
-#define ID_TURBINE "$Id$"
+#define ID_TURBINE "$Id: FGTurbine.h,v 1.22 2011/08/04 13:45:42 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -53,6 +50,9 @@ FORWARD DECLARATIONS
 
 namespace JSBSim {
 
+class Element;
+class FGFunction;
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -93,6 +93,8 @@ CLASS DOCUMENTATION
   <atsfc> {number} </atsfc>
   <idlen1> {number} </idlen1>
   <idlen2> {number} </idlen2>
+  <n1spinup> {number} </n1spinup>
+  <n2spinup> {number} </n2spinup>
   <maxn1> {number} </maxn1>
   <maxn2> {number} </maxn2>
   <augmented> {0 | 1} </augmented>
@@ -113,6 +115,8 @@ CLASS DOCUMENTATION
   atsfc       - Afterburning TSFC, lbm/hr/lbf
   idlen1      - Fan rotor rpm (% of max) at idle
   idlen2      - Core rotor rpm (% of max) at idle
+  n1spinup    - Fan rotor rpm starter acceleration (default 1.0)
+  n2spinup    - Core rotor rpm starter acceleration (default 3.0)
   maxn1       - Fan rotor rpm (% of max) at full throttle 
   maxn2       - Core rotor rpm (% of max) at full throttle
   augmented
@@ -146,7 +150,7 @@ CLASS DOCUMENTATION
     /engine/direct.xml
 </pre>
     @author David P. Culp
-    @version "$Id$"
+    @version "$Id: FGTurbine.h,v 1.22 2011/08/04 13:45:42 jberndt Exp $"
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -160,13 +164,13 @@ public:
       @param Executive pointer to executive structure
       @param el pointer to the XML element representing the turbine engine
       @param engine_number engine number  */
-  FGTurbine(FGFDMExec* Executive, Element *el, int engine_number);
+  FGTurbine(FGFDMExec* Executive, Element *el, int engine_number, struct Inputs& input);
   /// Destructor
   ~FGTurbine();
 
   enum phaseType { tpOff, tpRun, tpSpinUp, tpStart, tpStall, tpSeize, tpTrim };
 
-  double Calculate(void);
+  void Calculate(void);
   double CalcFuelNeed(void);
   double GetPowerAvailable(void);
   /** A lag filter.
@@ -209,8 +213,8 @@ public:
   int InitRunning(void);
   void ResetToIC(void);
 
-  string GetEngineLabels(string delimeter);
-  string GetEngineValues(string delimeter);
+  std::string GetEngineLabels(const std::string& delimiter);
+  std::string GetEngineValues(const std::string& delimiter);
 
 private:
 
@@ -224,14 +228,14 @@ private:
   double IdleN2;           ///< Idle N2
   double N1;               ///< N1
   double N2;               ///< N2
+  double N2norm;           ///< N2 normalized (0=idle, 1=max)
   double MaxN1;            ///< N1 at 100% throttle
   double MaxN2;            ///< N2 at 100% throttle
   double IdleFF;           ///< Idle Fuel Flow (lbm/hr)
   double delay;            ///< Inverse spool-up time from idle to 100% (seconds)
-  double dt;               ///< Simulator time slice
   double N1_factor;        ///< factor to tie N1 and throttle
   double N2_factor;        ///< factor to tie N2 and throttle
-  double ThrottlePos;      ///< FCS-supplied throttle position
+  double ThrottlePos;      ///< FCS-supplied throttle position - modified for local use!
   double AugmentCmd;       ///< modulated afterburner command (0.0 to 1.0)
   double TAT;              ///< total air temperature (deg C)
   double N1_spinup;        ///< N1 spin up rate from starter (per second)