 |
JSBSim Flight Dynamics Model
1.1.11 (13 Feb 2022)
An Open Source Flight Dynamics and Control Software Library in C++
|
47 #include "FGJSBBase.h"
48 #include "math/FGColumnVector3.h"
57 class FGPropertyManager;
215 enum TankType {ttUNKNOWN, ttFUEL, ttOXIDIZER};
216 enum GrainType {gtUNKNOWN, gtCYLINDRICAL, gtENDBURNING, gtFUNCTION};
224 double Drain(
double used);
232 double Calculate(
double dt,
double TempC);
296 double GetIxx(
void)
const {
return Ixx;}
297 double GetIyy(
void)
const {
return Iyy;}
298 double GetIzz(
void)
const {
return Izz;}
300 inline double GetLocationX(
void)
const {
return vXYZ(eX); }
301 inline double GetLocationY(
void)
const {
return vXYZ(eY); }
302 inline double GetLocationZ(
void)
const {
return vXYZ(eZ); }
303 inline void SetLocationX(
double x) { vXYZ(eX) = x; }
304 inline void SetLocationY(
double y) { vXYZ(eY) = y; }
305 inline void SetLocationZ(
double z) { vXYZ(eZ) = z; }
307 double GetStandpipe(
void)
const {
return Standpipe;}
309 int GetPriority(
void)
const {
return Priority;}
310 void SetPriority(
int p) { Priority = p; Selected = p>0 ?
true:
false; }
319 double GetExternalFlow(
void)
const {
return ExternalFlow;}
320 void SetExternalFlow(
double f) { ExternalFlow = f; }
322 FGColumnVector3 GetXYZ(
void)
const;
323 double GetXYZ(
int idx)
const;
325 GrainType GetGrainType(
void)
const {
return grainType;}
327 double Fill(
double amount);
328 void SetContents(
double amount);
329 void SetContentsGallons(
double gallons);
330 void SetTemperature(
double temp) { Temperature = temp; }
331 void SetStandpipe(
double amount) { Standpipe = amount; }
332 void SetSelected(
bool sel) { sel==
true ? SetPriority(1):SetPriority(0); }
339 std::string strGType;
343 FGColumnVector3 vXYZ;
344 FGColumnVector3 vXYZ_drain;
345 FGFunction* function_ixx;
346 FGFunction* function_iyy;
347 FGFunction* function_izz;
348 double Capacity, UnusableVol;
357 double InertiaFactor;
359 double Contents, InitialContents;
361 double Temperature, InitialTemperature;
362 double Standpipe, InitialStandpipe;
365 int Priority, InitialPriority;
367 void CalculateInertias(
void);
368 void bind(FGPropertyManager* PropertyManager);
369 void Debug(
int from);
Encapsulates the JSBSim simulation executive.
double GetTemperature(void) const
Gets the temperature of the fuel.
void SetUnusableVolume(double volume)
Sets the volume of unusable fuel in the tank.
double GetContents(void) const
Gets the contents of the tank.
int GetType(void) const
Retrieves the type of tank: Fuel or Oxidizer.
double Calculate(double dt, double TempC)
Performs local, tanks-specific calculations, such as fuel temperature.
double GetUnusable(void) const
Returns the amount of unusable fuel in the tank.
double GetCapacity(void) const
Gets the capacity of the tank.
double GetCapacityGallons(void) const
Gets the capacity of the tank.
double ProcessFuelName(const std::string &name)
Returns the density of a named fuel type.
double GetPctFull(void) const
Gets the tank fill level.
double Drain(double used)
Removes fuel from the tank.
void SetDensity(double d)
Sets the fuel density.
bool GetSelected(void) const
If the tank is set to supply fuel, this function returns true.
void ResetToIC(void)
Resets the tank parameters to the initial conditions.
double GetUnusableVolume(void) const
Returns the unusable volume of fuel in the tank.
FGTank(FGFDMExec *exec, Element *el, int tank_number)
Constructor.
static constexpr double CelsiusToFahrenheit(double celsius)
Converts from degrees Celsius to degrees Fahrenheit.
double GetDensity(void) const
Returns the fuel density.
double GetTemperature_degC(void) const
Gets the temperature of the fuel.
double GetContentsGallons(void) const
Gets the contents of the tank.