#include STL_IOSTREAM
#include STL_FSTREAM
-#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(ofstream);
-#endif
class FGNewEngine {
float Throttle_Lever_Pos; // 0 = Closed, 100 = Fully Open
float Propeller_Lever_Pos; // 0 = Full Course 100 = Full Fine
float Mixture_Lever_Pos; // 0 = Idle Cut Off 100 = Full Rich
+ int mag_pos; // 0=off, 1=left, 2=right, 3=both.
+ bool starter;
//misc
float IAS;
float Fuel_Flow_gals_hr; // USgals/hour
float Torque_lbft; // lb-ft
float Torque_SI; // Nm
- float CHT_degK; // Cylinder head temperature deg K
+ float CHT; // Cylinder head temperature deg K
float CHT_degF; // Ditto in deg Fahrenheit
float Mixture;
float Oil_Pressure; // PSI
float Calculate_Delta_T_Exhaust(void);
// Calculate cylinder head temperature
- float FGNewEngine::Calc_CHT(float CHT);
+ void Calc_CHT(void);
- void FGNewEngine::Calc_EGT(void);
+ // Calculate exhaust gas temperature
+ void Calc_EGT(void);
// Calculate fuel flow in gals/hr
- void FGNewEngine::Calc_Fuel_Flow_Gals_Hr(void);
+ void Calc_Fuel_Flow_Gals_Hr(void);
// Calculate current percentage power
- void FGNewEngine::Calc_Percentage_Power(bool mag_left, bool mag_right);
+ void Calc_Percentage_Power(bool mag_left, bool mag_right);
// Calculate Oil Temperature
float Calc_Oil_Temp (float oil_temp);
float Calc_Oil_Press (float Oil_Temp, float Engine_RPM);
// Propeller calculations.
- void FGNewEngine::Do_Prop_Calcs(void);
+ void Do_Prop_Calcs(void);
public:
inline void set_Mixture_Lever_Pos( float value ) {
Mixture_Lever_Pos = value;
}
+ // set the magneto switch position
+ inline void set_Magneto_Switch_Pos( int value ) {
+ mag_pos = value;
+ }
+ inline void setStarterFlag( bool flag ) {
+ starter = flag;
+ }
// set ambient pressure - takes pounds per square foot
inline void set_p_amb( float value ) {
p_amb = value * 47.88026;
inline float get_prop_thrust_lbs() const { return (prop_thrust * 0.2248); }
inline float get_fuel_flow_gals_hr() const { return (Fuel_Flow_gals_hr); }
inline float get_oil_temp() const { return ((current_oil_temp * 1.8) - 459.67); }
+ inline bool getRunningFlag() const { return running; }
+ inline bool getCrankingFlag() const { return cranking; }
+ inline bool getStarterFlag() const { return starter; }
};