]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGSimTurbine.h
Add the abillity to attach a propeller thruster to a turbine engine
[flightgear.git] / src / FDM / JSBSim / FGSimTurbine.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Header:       FGSimTurbine.h
4  Author:       David Culp
5  Date started: 03/11/2003
6
7  ------------- Copyright (C) 2003  David Culp (davidculp2@attbi.com)------------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
17  details.
18
19  You should have received a copy of the GNU General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA  02111-1307, USA.
22
23  Further information about the GNU General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26 HISTORY
27 --------------------------------------------------------------------------------
28 03/11/2003  DPC  Created
29
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 COMMENTS, REFERENCES,  and NOTES
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 SENTRY
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
37
38 #ifndef FGSIMTURBINE_H
39 #define FGSIMTURBINE_H
40
41 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 INCLUDES
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
44
45 #include <vector>
46 #include "FGEngine.h"
47 #include "FGConfigFile.h"
48 #include "FGCoefficient.h"
49
50 #define ID_SIMTURBINE "$Id$"
51
52 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 CLASS DECLARATION
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
55
56 namespace JSBSim {
57
58 class FGSimTurbine : public FGEngine
59 {
60 public:
61   FGSimTurbine(FGFDMExec* exec, FGConfigFile* Eng_cfg);
62   ~FGSimTurbine();
63
64   double Calculate(double);
65   double CalcFuelNeed(void);
66   double GetPowerAvailable(void);
67   
68 private:
69
70   typedef vector<FGCoefficient*> CoeffArray;
71   CoeffArray ThrustTables;
72
73   double MaxMilThrust;     // Maximum Rated Thrust, static @ S.L. (lbf)
74   double BypassRatio;      // Bypass Ratio
75   double TSFC;             // Thrust Specific Fuel Consumption (lbm/hr/lbf)
76   double ATSFC;            // Augmented TSFC (lbm/hr/lbf)
77   double IdleN1;           // Idle N1
78   double IdleN2;           // Idle N2
79   double MaxN1;            // N1 at 100% throttle
80   double MaxN2;            // N2 at 100% throttle
81   double IdleFF;           // Idle Fuel Flow (lbm/hr)
82   double delay;            // Inverse spool-up time from idle to 100% (seconds)
83   double dt;               // Simulator time slice
84   double N1_factor;        // factor to tie N1 and throttle
85   double N2_factor;        // factor to tie N2 and throttle
86   double ThrottleCmd;      // FCS-supplied throttle position
87   double throttle;         // virtual throttle position
88   int Augmented;           // = 1 if augmentation installed
89   int Injected;            // = 1 if water injection installed
90   int AugMethod;           // = 0 if using property /engine[n]/augmentation
91                            // = 1 if using last 1% of throttle movement
92
93   void SetDefaults(void);
94   bool Load(FGConfigFile *ENG_cfg);
95   void Debug(int from);
96
97 };
98 }
99 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 #endif
101