4 #include "Thruster.hpp"
8 class Jet : public Thruster {
12 virtual Jet* getJet() { return this; }
14 void setMaxThrust(float thrust, float afterburner=0);
15 void setVMax(float spd);
16 void setTSFC(float tsfc);
17 void setRPMs(float idleN1, float maxN1, float idleN2, float maxN2);
18 void setEGT(float takeoffEGT);
19 void setEPR(float takeoffEPR);
20 void setVectorAngle(float angle);
22 // The time it takes the engine to reach 90% thrust from idle
23 void setSpooling(float time);
25 // Sets the reheat control
26 void setReheat(float reheat);
28 // Sets the thrust vector control (0-1)
29 void setRotation(float rot);
31 // Thrust reverser control.
32 void setReverse(bool reverse) { _reverseThrust = reverse; }
34 // Thrust reverser effectiveness.
35 void setReverseThrust(float eff) { _reverseEff = eff; }
42 // Normalized "performance" number. Used for fuzzy numbers in FGFDM
43 float getPerfNorm() { return (_n1 - _n1Min) / (_n1Max - _n1Min); }
46 virtual bool isRunning();
47 virtual bool isCranking();
48 virtual void getThrust(float* out);
49 virtual void getTorque(float* out);
50 virtual void getGyro(float* out);
51 virtual float getFuelFlow();
52 virtual void integrate(float dt);
53 virtual void stabilize();
59 float _maxThrust; // Max dry thrust at sea level
60 float _abFactor; // Afterburner thrust multiplier
65 float _decay; // time constant for the exponential integration
66 float _vMax; // speed at which thrust is zero
67 float _epr0; // EPR at takeoff thrust
68 float _tsfc; // TSFC ((lb/hr)/lb) at takeoff thrust and zero airspeed
69 float _egt0; // EGT at takeoff thrust
70 float _n1Min; // N1 at ground idle
71 float _n1Max; // N1 at takeoff thrust
72 float _n2Min; // N2 at ground idle
73 float _n2Max; // N2 at takeoff thrust
74 float _reverseEff; // Thrust reverser effectiveness (fraction)
76 bool _running; // Is the engine running?
77 bool _cranking; // Is the engine cranking?
78 float _thrust; // Current thrust
79 float _epr; // Current EPR
80 float _n1; // Current UNCORRECTED N1 (percent)
81 float _n2; // Current UNCORRECTED N2 (percent)
82 float _fuelFlow; // Current UNCORRECTED fuel flow (kg/s)
83 float _egt; // Current UNCORRECTED EGT (kelvin)
85 float _tempCorrect; // Intake temp / std temp (273 K)
86 float _pressureCorrect; // Intake pressure / std pressure