1
0
Fork 0
flightgear/src/FDM/YASim/TurbineEngine.hpp
andy a3ba94c39e Initial checkin of a TurbineEngine implementation. This hasn't been
tested at all yet, but it doesn't seem to have broken anything so it
should be safe.  See the README in the base package for docs.
2004-05-01 00:26:33 +00:00

46 lines
1.1 KiB
C++

#ifndef _TURBINEENGINE_HPP
#define _TURBINEENGINE_HPP
#include "Engine.hpp"
namespace yasim {
class TurbineEngine : public Engine {
public:
virtual TurbineEngine* isTurbineEngine() { return this; }
TurbineEngine(float power, float omega, float alt, float flatRating);
void setN2Range(float min, float max) { _n2Min = min; _n2Max = max; }
void setFuelConsumption(float bsfc) { _bsfc = bsfc; }
virtual void calc(float pressure, float temp, float speed);
virtual void stabilize();
virtual void integrate(float dt);
virtual float getTorque() { return _torque; }
virtual float getFuelFlow() { return _fuelFlow; }
float getN2() { return _n2; }
private:
void setOutputFromN2();
float _maxTorque;
float _flatRating;
float _rho0;
float _bsfc; // SI units! kg/s per watt
float _n2Min;
float _n2Max;
float _n2Target;
float _torqueTarget;
float _fuelFlowTarget;
float _n2;
float _rho;
float _omega;
float _torque;
float _fuelFlow;
};
}; // namespace yasim
#endif // _TURBINEENGINE_HPP