#include <FGEngine.h>
Inherits FGJSBBase, and FGXMLFileRead.
Inherited by FGElectric, FGPiston, FGRocket, FGTurbine, and FGTurboProp.
<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.
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 FGColumnVector3 & | GetBodyForces (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 FGColumnVector3 & | GetMoments (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) |
| FGThruster * | GetThruster (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 | |
| FGAircraft * | Aircraft |
| FGAtmosphere * | Atmosphere |
| FGAuxiliary * | Auxiliary |
| bool | Cranking |
| const int | EngineNumber |
| double | EnginePitch |
| double | EngineYaw |
| FGFCS * | FCS |
| FGFDMExec * | FDMExec |
| double | FuelExpended |
| double | FuelFlow_gph |
| double | FuelFlow_pph |
| double | FuelFlowRate |
| bool | FuelFreeze |
| double | MaxThrottle |
| double | MinThrottle |
| double | Mixture |
| string | Name |
| double | PctPower |
| FGPropagate * | Propagate |
| FGPropertyManager * | PropertyManager |
| FGPropulsion * | Propulsion |
| bool | Running |
| double | SLFuelFlowMax |
| vector< int > | SourceTanks |
| bool | Starter |
| bool | Starved |
| FGState * | State |
| double | Throttle |
| FGThruster * | Thruster |
| bool | TrimMode |
| EngineType | Type |
| double | X |
| double | Y |
| double | Z |
| 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.
Reimplemented in FGPiston, FGTurbine, and FGTurboProp.
Definition at line 201 of file FGEngine.cpp.
| virtual double Calculate | ( | void | ) | [inline, virtual] |
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.
1.5.5