~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/FDM/JSBSim/models/propulsion/FGEngine.h

  • Committer: Bazaar Package Importer
  • Author(s): Ove Kaaven
  • Date: 2011-01-30 15:46:35 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110130154635-rlynmg9n5hzxq5xe
Tags: 2.0.0-3
* Recommend fgfs-aircraft-base and fgfs-models-base.
  Closes. #610276.
* Added note about scenery SharedModels.tgz to README.Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 Author:       Jon S. Berndt
5
5
 Date started: 01/21/99
6
6
 
7
 
 ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
 
7
 ------------- Copyright (C) 1999  Jon S. Berndt (jon@jsbsim.org) -------------
8
8
 
9
9
 This program is free software; you can redistribute it and/or modify it under
10
10
 the terms of the GNU Lesser General Public License as published by the Free Software
43
43
INCLUDES
44
44
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
45
45
 
46
 
#include <FGJSBBase.h>
47
 
#include "FGThruster.h"
48
 
#include <input_output/FGPropertyManager.h>
49
 
#include <input_output/FGXMLFileRead.h>
 
46
#include "FGJSBBase.h"
 
47
#include "input_output/FGXMLFileRead.h"
 
48
#include "math/FGColumnVector3.h"
50
49
#include <vector>
51
50
#include <string>
52
51
 
56
55
 
57
56
#define ID_ENGINE "$Id$"
58
57
 
59
 
using std::string;
60
 
using std::vector;
61
 
 
62
58
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63
59
FORWARD DECLARATIONS
64
60
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
75
71
class FGAuxiliary;
76
72
class FGThruster;
77
73
class Element;
 
74
class FGPropertyManager;
78
75
 
79
76
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80
77
CLASS DOCUMENTATION
116
113
@endcode
117
114
<pre>
118
115
    NOTES:
119
 
        Engines feed from all tanks equally.
120
 
 
 
116
        
121
117
        Not all thruster types can be matched with a given engine type.  See the class
122
118
        documentation for engine and thruster classes.
123
119
</pre>     
150
146
  virtual double getFuelFlow_gph () const {return FuelFlow_gph;}
151
147
  virtual double getFuelFlow_pph () const {return FuelFlow_pph;}
152
148
  virtual double GetFuelFlowRate(void) const {return FuelFlowRate;}
153
 
  virtual double GetThrust(void) const { return Thrust; }
154
149
  virtual bool   GetStarved(void) { return Starved; }
155
150
  virtual bool   GetRunning(void) const { return Running; }
156
151
  virtual bool   GetCranking(void) { return Cranking; }
160
155
 
161
156
  virtual void SetRunning(bool bb) { Running=bb; }
162
157
  virtual void SetName(string name) { Name = name; }
163
 
  virtual void AddFeedTank(int tkID);
 
158
  virtual void AddFeedTank(int tkID, int priority);
164
159
  virtual void SetFuelFreeze(bool f) { FuelFreeze = f; }
165
160
 
166
161
  virtual void SetStarter(bool s) { Starter = s; }
188
183
  bool LoadThruster(Element *el);
189
184
  FGThruster* GetThruster(void) {return Thruster;}
190
185
 
191
 
  virtual string GetEngineLabels(string delimeter) = 0;
192
 
  virtual string GetEngineValues(string delimeter) = 0;
 
186
  virtual std::string GetEngineLabels(const std::string& delimiter) = 0;
 
187
  virtual std::string GetEngineValues(const std::string& delimiter) = 0;
193
188
 
194
189
protected:
195
190
  /** Reduces the fuel in the active tanks by the amount required.
206
201
  virtual double CalcFuelNeed(void);
207
202
 
208
203
  FGPropertyManager* PropertyManager;
209
 
  string Name;
 
204
  std::string Name;
210
205
  const int   EngineNumber;
211
206
  EngineType Type;
212
207
  double X, Y, Z;
216
211
  double MaxThrottle;
217
212
  double MinThrottle;
218
213
 
219
 
  double Thrust;
220
214
  double Throttle;
221
215
  double Mixture;
222
216
  double FuelExpended;
231
225
 
232
226
  double FuelFlow_gph;
233
227
  double FuelFlow_pph;
 
228
  double FuelDensity;
234
229
 
235
230
  FGFDMExec*      FDMExec;
236
231
  FGState*        State;
242
237
  FGAuxiliary*    Auxiliary;
243
238
  FGThruster*     Thruster;
244
239
 
245
 
  vector <int> SourceTanks;
 
240
  std::vector <int> SourceTanks;
246
241
  void Debug(int from);
247
242
};
248
243
}
249
 
#include <FGState.h>
250
 
#include <FGFDMExec.h>
251
 
#include <models/FGAtmosphere.h>
252
 
#include <models/FGFCS.h>
253
 
#include <models/FGAircraft.h>
254
 
#include <models/FGPropagate.h>
255
 
#include <models/FGPropulsion.h>
256
 
#include <models/FGAuxiliary.h>
257
 
#include <models/propulsion/FGThruster.h>
258
 
#include <input_output/FGXMLElement.h>
259
244
 
260
245
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
261
246
#endif