FGEngine Class Reference

#include <FGEngine.h>

Inherits FGJSBBase, and FGXMLFileRead.

Inherited by FGElectric, FGPiston, FGRocket, FGTurbine, and FGTurboProp.

List of all members.


Detailed Description

This base class contains methods and members common to all engines, such as logic to drain fuel from the appropriate tank, etc.

Configuration File Format:

        <engine file="{string}">
            <location unit="{IN | M}">
                <x> {number} </x>
                <y> {number} </y>
                <z> {number} </z>
            </location>
            <!-- optional orientation definition -->
            <orient unit="{RAD | DEG}">
                <roll>  {number} </roll>
                <pitch> {number} </pitch>
                <yaw> {number} </yaw>
            </orient>
            <feed> {integer} </feed>
            ... optional more feed tank index numbers ... 
            <thruster file="{string}">
                <location unit="{IN | M}">
                    <x> {number} </x>
                    <y> {number} </y>
                    <z> {number} </z>
                </location>
                <orient unit="{RAD | DEG}">
                    <roll> {number} </roll>
                    <pitch> {number} </pitch>
                    <yaw> {number} </yaw>
                </orient>
            </thruster>
        </engine>
    NOTES:
	Engines feed from all tanks equally.

	Not all thruster types can be matched with a given engine type.  See the class
	documentation for engine and thruster classes.
Author:
Jon S. Berndt
Version:
Id
FGEngine.h,v 1.14 2008/12/30 12:19:26 jberndt Exp

Definition at line 132 of file FGEngine.h.


Public Types

enum  EngineType {
  etUnknown, etRocket, etPiston, etTurbine,
  etTurboprop, etElectric
}

Public Member Functions

virtual void AddFeedTank (int tkID)
virtual double Calculate (void)
 Calculates the thrust of the engine, and other engine functions.
 FGEngine (FGFDMExec *exec, Element *el, int engine_number)
virtual FGColumnVector3GetBodyForces (void)
virtual bool GetCranking (void)
virtual string GetEngineLabels (string delimeter)=0
virtual string GetEngineValues (string delimeter)=0
virtual double getFuelFlow_gph () const
virtual double getFuelFlow_pph () const
virtual double GetFuelFlowRate (void) const
virtual double GetMixture (void)
virtual FGColumnVector3GetMoments (void)
virtual string GetName (void)
virtual double GetPowerAvailable (void)
virtual bool GetRunning (void) const
virtual bool GetStarter (void)
virtual bool GetStarved (void)
virtual double GetThrottle (void)
virtual double GetThrottleMax (void)
virtual double GetThrottleMin (void)
FGThrusterGetThruster (void)
virtual bool GetTrimMode (void)
EngineType GetType (void)
virtual int InitRunning (void)
bool LoadThruster (Element *el)
void ResetToIC (void)
 Resets the Engine parameters to the initial conditions.
virtual void SetFuelFreeze (bool f)
virtual void SetName (string name)
virtual void SetPlacement (FGColumnVector3 &location, FGColumnVector3 &orientation)
 Sets engine placement information.
virtual void SetRunning (bool bb)
virtual void SetStarter (bool s)
virtual void SetStarved (void)
virtual void SetStarved (bool tt)
virtual void SetTrimMode (bool state)

Protected Member Functions

virtual double CalcFuelNeed (void)
 The fuel need is calculated based on power levels and flow rate for that power level.
virtual void ConsumeFuel (void)
 Reduces the fuel in the active tanks by the amount required.
void Debug (int from)

Protected Attributes

FGAircraftAircraft
FGAtmosphereAtmosphere
FGAuxiliaryAuxiliary
bool Cranking
const int EngineNumber
double EnginePitch
double EngineYaw
FGFCSFCS
FGFDMExecFDMExec
double FuelExpended
double FuelFlow_gph
double FuelFlow_pph
double FuelFlowRate
bool FuelFreeze
double MaxThrottle
double MinThrottle
double Mixture
string Name
double PctPower
FGPropagatePropagate
FGPropertyManagerPropertyManager
FGPropulsionPropulsion
bool Running
double SLFuelFlowMax
vector< int > SourceTanks
bool Starter
bool Starved
FGStateState
double Throttle
FGThrusterThruster
bool TrimMode
EngineType Type
double X
double Y
double Z

Member Function Documentation

double CalcFuelNeed ( void   )  [protected, virtual]

It is also turned from a rate into an actual amount (pounds) by multiplying it by the delta T and the rate.

Returns:
Total fuel requirement for this engine in pounds.

Reimplemented in FGPiston, FGTurbine, and FGTurboProp.

Definition at line 201 of file FGEngine.cpp.

virtual double Calculate ( void   )  [inline, virtual]

Returns:
Thrust in pounds

Reimplemented in FGElectric, FGPiston, FGRocket, FGTurbine, and FGTurboProp.

Definition at line 174 of file FGEngine.h.

void ConsumeFuel ( void   )  [protected, virtual]

This function should be called from within the derived class' Calculate() function before any other calculations are done. This base class method removes fuel from the fuel tanks as appropriate, and sets the starved flag if necessary.

Definition at line 162 of file FGEngine.cpp.


The documentation for this class was generated from the following files:

Generated on Tue May 26 00:55:09 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5