------------- Copyright (C) 2004 (javky@email.cz)----------
This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
+ the terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
- You should have received a copy of the GNU General Public License along with
+ You should have received a copy of the GNU Lesser General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
- Further information about the GNU General Public License can also be found on
+ Further information about the GNU Lesser General Public License can also be found on
the world wide web at http://www.gnu.org.
HISTORY
#include <vector>
#include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGTable.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGTable.h"
-#define ID_TURBOPROP "$Id$"
+#define ID_TURBOPROP "$Id: FGTurboProp.h,v 1.12 2010/08/21 18:08:37 jberndt Exp $"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-/** Turboprop engine model.
-
+/** Turboprop engine model. For an example of this model in use see the file:
+ engine/engtm601.xml
+ <h3>Configuration parameters:</h3>
+<pre>
+milthrust [LBS]
+idlen1 [%]
+maxn1 [%]
+betarangeend[%]
+ if ThrottleCmd < betarangeend/100.0 then engine power=idle, propeller pitch
+ is controled by ThrottleCmd (between MINPITCH and REVERSEPITCH).
+ if ThrottleCmd > betarangeend/100.0 then engine power increases up to max reverse power
+reversemaxpower [%]
+ max engine power in reverse mode
+maxpower [HP]
+psfc power specific fuel consumption [pph/HP] for N1=100%
+n1idle_max_delay [-] time constant for N1 change
+maxstartenginetime [sec]
+ after this time the automatic starting cycle is interrupted when the engine
+ doesn't start (0=automatic starting not present)
+startern1 [%]
+ when starting starter spin up engine to this spin
+ielumaxtorque [lb.ft]
+ if torque>ielumaxtorque limiters decrease the throttle
+ (ielu = Integrated Electronic Limiter Unit)
+itt_delay [-] time constant for ITT change
+ (ITT = Inter Turbine Temperature)
+</pre>
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
enum phaseType { tpOff, tpRun, tpSpinUp, tpStart, tpStall, tpSeize, tpTrim };
- double Calculate(void);
+ void Calculate(void);
double CalcFuelNeed(void);
inline double GetPowerAvailable(void) const {return (Eng_HP * hptoftlbssec);}
inline void SetGeneratorPower(bool gp) { GeneratorPower=gp; }
inline void SetCondition(bool c) { Condition=c; }
-
- string GetEngineLabels(string delimeter); // added from Turbine 0.9.6
- string GetEngineValues(string delimeter); // added from Turbine 0.9.6
+ int InitRunning(void);
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
private:
double N2_factor; ///< factor to tie N2 and throttle
double ThrottleCmd; ///< FCS-supplied throttle position
double TAT; ///< total air temperature (deg C)
+ double PowerAvailable;
bool Stalled; ///< true if engine is compressor-stalled
bool Seized; ///< true if inner spool is seized
bool Overtemp; ///< true if EGT exceeds limits
double Idle_Max_Delay; // time delay for exponencial
double MaxPower; // max engine power [HP]
- double StarterN1; // rotates of generator maked by starter [%]
- double MaxStartingTime; // maximal time for start [s] (-1 means not used)
+ double StarterN1; // rotates of generator maked by starter [%]
+ double MaxStartingTime; // maximal time for start [s] (-1 means not used)
double Prop_RPM; // propeller RPM
double Velocity;
double rho;
double Eng_HP; // current engine power
- double StartTime; // engine strating time [s] (0 when start button pushed)
+ double StartTime; // engine strating time [s] (0 when start button pushed)
- double ITT_Delay; // time delay for exponencial grow of ITT
+ double ITT_Delay; // time delay for exponencial grow of ITT
double Eng_ITT_degC;
double Eng_Temperature; // temperature inside engine
void SetDefaults(void);
bool Load(FGFDMExec *exec, Element *el);
void bindmodel(void);
- void unbind(void);
void Debug(int from);
- FGTable* ITT_N1; // ITT temperature depending on throttle command
+ FGTable* ITT_N1; // ITT temperature depending on throttle command
FGTable* EnginePowerRPM_N1;
FGTable* EnginePowerVC;
};