34 #ifndef FGPROPULSION_H
35 #define FGPROPULSION_H
45 #include "propulsion/FGEngine.h"
46 #include "math/FGMatrix33.h"
115 bool Run(
bool Holding)
override;
117 bool InitModel(
void)
override;
123 bool Load(
Element* el)
override;
133 assert(index < Engines.size());
134 return Engines[index];
145 assert(index < Tanks.size());
150 bool GetSteadyState(
void);
153 void InitRunning(
int n);
155 std::string GetPropulsionStrings(
const std::string& delimiter)
const;
156 std::string GetPropulsionValues(
const std::string& delimiter)
const;
157 std::string GetPropulsionTankReport();
160 double GetForces(
int n)
const {
return vForces(n);}
161 const FGColumnVector3& GetMoments(
void)
const {
return vMoments;}
162 double GetMoments(
int n)
const {
return vMoments(n);}
164 double Transfer(
int source,
int target,
double amount);
165 void DoRefuel(
double time_slice);
166 void DumpFuel(
double time_slice);
168 const FGColumnVector3& GetTanksMoment(
void);
169 double GetTanksWeight(
void)
const;
171 SGPath FindFullPathName(
const SGPath& path)
const override;
172 inline int GetActiveEngine(
void)
const {
return ActiveEngine;}
173 inline bool GetFuelFreeze(
void)
const {
return FuelFreeze;}
175 void SetMagnetos(
int setting);
176 void SetStarter(
int setting);
177 int GetStarter(
void)
const;
178 void SetCutoff(
int setting=0);
179 int GetCutoff(
void)
const;
180 void SetActiveEngine(
int engine);
181 void SetFuelFreeze(
bool f);
182 const FGMatrix33& CalculateTankInertias(
void);
184 struct FGEngine::Inputs in;
187 std::vector<std::shared_ptr<FGEngine>> Engines;
188 std::vector<std::shared_ptr<FGTank>> Tanks;
190 FGColumnVector3 vForces;
191 FGColumnVector3 vMoments;
192 FGColumnVector3 vTankXYZ;
193 FGColumnVector3 vXYZtank_arm;
198 double TotalFuelQuantity;
199 double TotalOxidizerQuantity;
202 void ConsumeFuel(FGEngine* engine);
207 void Debug(
int from)
override;
This class implements a 3 element column vector.
Encapsulates the JSBSim simulation executive.
Base class for all scheduled JSBSim models.
Propulsion management class.
auto GetEngine(unsigned int index) const
Retrieves an engine object pointer from the list of engines.
size_t GetNumEngines(void) const
Retrieves the number of engines defined for the aircraft.
auto GetTank(unsigned int index) const
Retrieves a tank object pointer from the list of tanks.
size_t GetNumTanks(void) const
Retrieves the number of tanks defined for the aircraft.