]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGSimTurbine.h
Adds a basic FDM model for LaRCsim debugging purposes.
[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   
67 private:
68
69   typedef vector<FGCoefficient*> CoeffArray;
70   CoeffArray ThrustTables;
71
72   double MaxMilThrust;     // Maximum Rated Thrust, static @ S.L. (lbf)
73   double BypassRatio;      // Bypass Ratio
74   double TSFC;             // Thrust Specific Fuel Consumption (lbm/hr/lbf)
75   double ATSFC;            // Augmented TSFC (lbm/hr/lbf)
76   double IdleN1;           // Idle N1
77   double IdleN2;           // Idle N2
78   double MaxN1;            // N1 at 100% throttle
79   double MaxN2;            // N2 at 100% throttle
80   double IdleFF;           // Idle Fuel Flow (lbm/hr)
81   double delay;            // Inverse spool-up time from idle to 100% (seconds)
82   double dt;               // Simulator time slice
83   double N1_factor;        // factor to tie N1 and throttle
84   double N2_factor;        // factor to tie N2 and throttle
85   double ThrottleCmd;      // FCS-supplied throttle position
86   double throttle;         // virtual throttle position
87   int Augmented;           // = 1 if augmentation installed
88   int Injected;            // = 1 if water injection installed
89   int AugMethod;           // = 0 if using property /engine[n]/augmentation
90                            // = 1 if using last 1% of throttle movement
91
92   void SetDefaults(void);
93   bool Load(FGConfigFile *ENG_cfg);
94   void Debug(int from);
95
96 };
97 }
98 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 #endif
100