34 #ifndef FGPROPULSION_H 35 #define FGPROPULSION_H 44 #include "simgear/props/propertyObject.hxx" 46 #include "propulsion/FGEngine.h" 47 #include "math/FGMatrix33.h" 53 #define ID_PROPULSION "$Id: FGPropulsion.h,v 1.37 2017/02/25 14:23:19 bcoconni Exp $" 123 bool Run(
bool Holding);
125 bool InitModel(
void);
134 unsigned int GetNumEngines(
void)
const {
return (
unsigned int)Engines.size();}
141 if (index < Engines.size())
return Engines[index];
145 unsigned int GetNumTanks(
void)
const {
return (
unsigned int)Tanks.size();}
152 if (index < Tanks.size())
return Tanks[index];
167 std::string GetPropulsionStrings(
const std::string& delimiter)
const;
168 std::string GetPropulsionValues(
const std::string& delimiter)
const;
169 std::string GetPropulsionTankReport();
172 double GetForces(
int n)
const {
return vForces(n);}
174 double GetMoments(
int n)
const {
return vMoments(n);}
176 double Transfer(
int source,
int target,
double amount);
177 void DoRefuel(
double time_slice);
178 void DumpFuel(
double time_slice);
181 double GetTanksWeight(
void)
const;
183 SGPath FindFullPathName(
const SGPath& path)
const;
184 inline int GetActiveEngine(
void)
const {
return ActiveEngine;}
185 inline bool GetFuelFreeze(
void)
const {
return FuelFreeze;}
187 void SetMagnetos(
int setting);
188 void SetStarter(
int setting);
189 void SetCutoff(
int setting=0);
190 void SetActiveEngine(
int engine);
191 void SetFuelFreeze(
bool f);
192 const FGMatrix33& CalculateTankInertias(
void);
197 std::vector <FGEngine*> Engines;
198 std::vector <FGTank*> Tanks;
199 unsigned int numSelectedFuelTanks;
200 unsigned int numSelectedOxiTanks;
201 unsigned int numFuelTanks;
202 unsigned int numOxiTanks;
203 unsigned int numEngines;
204 unsigned int numTanks;
211 simgear::PropertyObject<bool> refuel;
212 simgear::PropertyObject<bool> dump;
214 simgear::PropertyObject<double> TotalFuelQuantity;
215 simgear::PropertyObject<double> TotalOxidizerQuantity;
219 bool HavePistonEngine;
220 bool HaveTurbineEngine;
221 bool HaveTurboPropEngine;
222 bool HaveRocketEngine;
223 bool HaveElectricEngine;
229 void Debug(
int from);
FGTank * GetTank(unsigned int index) const
Retrieves a tank object pointer from the list of tanks.
int GetnumSelectedOxiTanks(void) const
Returns the number of oxidizer tanks currently actively supplying oxidizer.
FGEngine * GetEngine(unsigned int index) const
Retrieves an engine object pointer from the list of engines.
~FGPropulsion()
Destructor.
bool Load(Element *el)
Loads the propulsion system (engine[s] and tank[s]).
Propulsion management class.
FGPropulsion(FGFDMExec *)
Constructor.
Base class for all scheduled JSBSim models.
This class implements a 3 element column vector.
int GetnumSelectedFuelTanks(void) const
Returns the number of fuel tanks currently actively supplying fuel.
bool GetSteadyState(void)
Loops the engines until thrust output steady (used for trimming)
Base class for all engines.
void InitRunning(int n)
Sets up the engines as running.
unsigned int GetNumTanks(void) const
Retrieves the number of tanks defined for the aircraft.
Handles matrix math operations.
Encapsulates the JSBSim simulation executive.
bool Run(bool Holding)
Executes the propulsion model.
unsigned int GetNumEngines(void) const
Retrieves the number of engines defined for the aircraft.