49 #include "math/FGModelFunctions.h" 50 #include "math/FGColumnVector3.h" 56 #define ID_ENGINE "$Id: FGEngine.h,v 1.47 2015/09/27 10:16:57 bcoconni Exp $" 67 class FGPropertyManager;
126 double PressureRatio;
131 double TotalPressure;
142 std::vector <double> ThrottleCmd;
143 std::vector <double> MixtureCmd;
144 std::vector <double> ThrottlePos;
145 std::vector <double> MixturePos;
146 std::vector <double> PropAdvance;
147 std::vector <bool> PropFeather;
154 enum EngineType {etUnknown, etRocket, etPiston, etTurbine, etTurboprop, etElectric};
156 EngineType GetType(
void)
const {
return Type; }
157 virtual const std::string& GetName(
void)
const {
return Name; }
160 virtual double GetThrottleMin(
void)
const {
return MinThrottle; }
161 virtual double GetThrottleMax(
void)
const {
return MaxThrottle; }
162 virtual bool GetStarter(
void)
const {
return Starter; }
164 virtual double getFuelFlow_gph ()
const {
return FuelFlow_gph;}
165 virtual double getFuelFlow_pph ()
const {
return FuelFlow_pph;}
166 virtual double GetFuelFlowRate(
void)
const {
return FuelFlowRate;}
167 virtual double GetFuelFlowRateGPH(
void)
const {
return FuelFlowRate*3600/FuelDensity;}
168 virtual double GetFuelUsedLbs(
void)
const {
return FuelUsedLbs;}
169 virtual bool GetStarved(
void)
const {
return Starved; }
170 virtual bool GetRunning(
void)
const {
return Running; }
171 virtual bool GetCranking(
void)
const {
return Cranking; }
173 virtual void SetStarved(
bool tt) { Starved = tt; }
174 virtual void SetStarved(
void) { Starved =
true; }
176 virtual void SetRunning(
bool bb) { Running=bb; }
177 virtual void SetName(
const std::string& name) { Name = name; }
178 virtual void SetFuelFreeze(
bool f) { FuelFreeze = f; }
179 virtual void SetFuelDensity(
double d) { FuelDensity = d; }
181 virtual void SetStarter(
bool s) { Starter = s; }
183 virtual int InitRunning(
void){
return 1; }
191 virtual double GetThrust(
void)
const;
202 virtual double CalcOxidizerNeed(
void) {
return 0.0;}
204 virtual double GetPowerAvailable(
void) {
return 0.0;};
210 FGThruster* GetThruster(
void)
const {
return Thruster;}
212 unsigned int GetSourceTank(
unsigned int i)
const;
213 size_t GetNumSourceTanks()
const {
return SourceTanks.size();}
215 virtual std::string GetEngineLabels(
const std::string& delimiter) = 0;
216 virtual std::string GetEngineValues(
const std::string& delimiter) = 0;
219 void LoadThrusterInputs();
224 const int EngineNumber;
229 double SLFuelFlowMax;
249 std::vector <int> SourceTanks;
252 void Debug(
int from);
Base class for specific thrusting devices such as propellers, nozzles, etc.
virtual double CalcFuelNeed(void)
The fuel need is calculated based on power levels and flow rate for that power level.
virtual void Calculate(void)=0
Calculates the thrust of the engine, and other engine functions.
This class implements a 3 element column vector.
Base class for all engines.
virtual void SetPlacement(const FGColumnVector3 &location, const FGColumnVector3 &orientation)
Sets engine placement information.
Encapsulates the JSBSim simulation executive.
virtual void ResetToIC(void)
Resets the Engine parameters to the initial conditions.
The model functions class provides the capability for loading, storing, and executing arbitrary funct...