47 #include "FGJSBBase.h" 48 #include "math/FGColumnVector3.h" 49 #include "math/FGFunction.h" 56 #define ID_TANK "$Id: FGTank.h,v 1.32 2017/02/21 21:07:04 bcoconni Exp $" 65 class FGPropertyManager;
213 enum TankType {ttUNKNOWN, ttFUEL, ttOXIDIZER};
214 enum GrainType {gtUNKNOWN, gtCYLINDRICAL, gtENDBURNING, gtFUNCTION};
222 double Drain(
double used);
230 double Calculate(
double dt,
double TempC);
282 double GetIxx(
void)
const {
return Ixx;}
283 double GetIyy(
void)
const {
return Iyy;}
284 double GetIzz(
void)
const {
return Izz;}
286 inline double GetLocationX(
void)
const {
return vXYZ(eX); }
287 inline double GetLocationY(
void)
const {
return vXYZ(eY); }
288 inline double GetLocationZ(
void)
const {
return vXYZ(eZ); }
289 inline void SetLocationX(
double x) { vXYZ(eX) = x; }
290 inline void SetLocationY(
double y) { vXYZ(eY) = y; }
291 inline void SetLocationZ(
double z) { vXYZ(eZ) = z; }
293 double GetStandpipe(
void)
const {
return Standpipe;}
295 int GetPriority(
void)
const {
return Priority;}
296 void SetPriority(
int p) { Priority = p; Selected = p>0 ?
true:
false; }
298 double GetDensity(
void)
const {
return Density;}
299 void SetDensity(
double d) { Density = d; }
301 double GetExternalFlow(
void)
const {
return ExternalFlow;}
302 void SetExternalFlow(
double f) { ExternalFlow = f; }
305 double GetXYZ(
int idx)
const;
307 const GrainType GetGrainType(
void)
const {
return grainType;}
309 double Fill(
double amount);
310 void SetContents(
double amount);
311 void SetContentsGallons(
double gallons);
312 void SetTemperature(
double temp) { Temperature = temp; }
313 void SetStandpipe(
double amount) { Standpipe = amount; }
314 void SetSelected(
bool sel) { sel==
true ? SetPriority(1):SetPriority(0); }
321 std::string strGType;
339 double InertiaFactor;
341 double Contents, InitialContents;
343 double Temperature, InitialTemperature;
344 double Standpipe, InitialStandpipe;
347 int Priority, InitialPriority;
349 void CalculateInertias(
void);
351 void Debug(
int from);
bool GetSelected(void) const
If the tank is set to supply fuel, this function returns true.
FGTank(FGFDMExec *exec, Element *el, int tank_number)
Constructor.
static double CelsiusToFahrenheit(double celsius)
Converts from degrees Celsius to degrees Fahrenheit.
double GetTemperature_degC(void) const
Gets the temperature of the fuel.
double GetContentsGallons(void) const
Gets the contents of the tank.
double GetTemperature(void) const
Gets the temperature of the fuel.
double Calculate(double dt, double TempC)
Performs local, tanks-specific calculations, such as fuel temperature.
double GetContents(void) const
Gets the contents of the tank.
Represents a mathematical function.
double GetCapacity(void) const
Gets the capacity of the tank.
int GetType(void) const
Retrieves the type of tank: Fuel or Oxidizer.
This class implements a 3 element column vector.
double ProcessFuelName(const std::string &name)
Returns the density of a named fuel type.
double GetCapacityGallons(void) const
Gets the capacity of the tank.
Encapsulates the JSBSim simulation executive.
double GetPctFull(void) const
Gets the tank fill level.
double Drain(double used)
Removes fuel from the tank.
void ResetToIC(void)
Resets the tank parameters to the initial conditions.