49 #include "math/FGModelFunctions.h"
50 #include "math/FGColumnVector3.h"
61 class FGPropertyManager;
108 double PressureRatio;
113 double TotalPressure;
124 std::vector <double> ThrottleCmd;
125 std::vector <double> MixtureCmd;
126 std::vector <double> ThrottlePos;
127 std::vector <double> MixturePos;
128 std::vector <double> PropAdvance;
129 std::vector <bool> PropFeather;
136 enum EngineType {etUnknown, etRocket, etPiston, etTurbine, etTurboprop, etElectric};
138 EngineType GetType(
void)
const {
return Type; }
139 virtual const std::string& GetName(
void)
const {
return Name; }
142 virtual double GetThrottleMin(
void)
const {
return MinThrottle; }
143 virtual double GetThrottleMax(
void)
const {
return MaxThrottle; }
144 virtual bool GetStarter(
void)
const {
return Starter; }
146 virtual double getFuelFlow_gph ()
const {
return FuelFlow_gph;}
147 virtual double getFuelFlow_pph ()
const {
return FuelFlow_pph;}
148 virtual double GetFuelFlowRate(
void)
const {
return FuelFlowRate;}
149 virtual double GetFuelFlowRateGPH(
void)
const {
return FuelFlowRate*3600/FuelDensity;}
150 virtual double GetFuelUsedLbs(
void)
const {
return FuelUsedLbs;}
151 virtual bool GetStarved(
void)
const {
return Starved; }
152 virtual bool GetRunning(
void)
const {
return Running; }
153 virtual bool GetCranking(
void)
const {
return Cranking; }
155 virtual void SetStarved(
bool tt) { Starved = tt; }
156 virtual void SetStarved(
void) { Starved =
true; }
158 virtual void SetRunning(
bool bb) { Running=bb; }
159 virtual void SetName(
const std::string& name) { Name = name; }
160 virtual void SetFuelFreeze(
bool f) { FuelFreeze = f; }
161 virtual void SetFuelDensity(
double d) { FuelDensity = d; }
163 virtual void SetStarter(
bool s) { Starter = s; }
165 virtual int InitRunning(
void){
return 1; }
173 virtual double GetThrust(
void)
const;
181 virtual double CalcOxidizerNeed(
void) {
return 0.0;}
183 virtual double GetPowerAvailable(
void) {
return 0.0;};
185 virtual const FGColumnVector3& GetBodyForces(
void);
186 virtual const FGColumnVector3& GetMoments(
void);
188 void LoadThruster(FGFDMExec* exec, Element *el);
189 FGThruster* GetThruster(
void)
const {
return Thruster;}
191 unsigned int GetSourceTank(
unsigned int i)
const;
192 size_t GetNumSourceTanks()
const {
return SourceTanks.size();}
194 virtual std::string GetEngineLabels(
const std::string& delimiter) = 0;
195 virtual std::string GetEngineValues(
const std::string& delimiter) = 0;
198 void LoadThrusterInputs();
203 const int EngineNumber;
205 double SLFuelFlowMax;
223 FGThruster* Thruster;
225 std::vector <int> SourceTanks;
227 bool Load(FGFDMExec *exec, Element *el);
228 void Debug(
int from);
This class implements a 3 element column vector.
Base class for all engines.
virtual void ResetToIC(void)
Resets the Engine parameters to the initial conditions.
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.
The model functions class provides the capability for loading, storing, and executing arbitrary funct...