1
0
Fork 0

David Luff: I've put Phil's temperature correction back in since I'm not

implicitly correcting for that yet.  The plane now makes it to 11000ft on
autopilot *slowly*.  I think I'll have to look at the prop parameters
next - altering the diameter and blade angle just slightly can have
quite an effect.  If you want to play then try changing the values
prop_diameter and blade_angle in FGNewEngine::init.  Keep blade
angle between 20 and 25 (since those are the only values for which
I've entered data and I interpolate between them) and ignore
FGProp1_Blade_Angle since that's an old variable that isn't used.  I
really ought to read all the engine and prop parameters from file to
avoid recompilation when tweaking !
This commit is contained in:
curt 2001-03-22 23:42:16 +00:00
parent 80ff1af457
commit 4162c808bd

View file

@ -359,14 +359,15 @@ void FGNewEngine::update() {
// Hack for testing - should output every 5 seconds
static int count1 = 0;
if(count1 == 0) {
cout << "P_atmos = " << p_amb << " T_atmos = " << T_amb << '\n';
cout << "Manifold pressure = " << Manifold_Pressure << " True_Manifold_Pressure = " << True_Manifold_Pressure << '\n';
cout << "p_amb_sea_level = " << p_amb_sea_level << '\n';
cout << "equivalence_ratio = " << equivalence_ratio << '\n';
cout << "combustion_efficiency = " << combustion_efficiency << '\n';
cout << "AFR = " << 14.7 / equivalence_ratio << '\n';
cout << "Mixture lever = " << Mixture_Lever_Pos << '\n';
cout << "n = " << RPM << " rpm\n";
// cout << "P_atmos = " << p_amb << " T_atmos = " << T_amb << '\n';
// cout << "Manifold pressure = " << Manifold_Pressure << " True_Manifold_Pressure = " << True_Manifold_Pressure << '\n';
// cout << "p_amb_sea_level = " << p_amb_sea_level << '\n';
// cout << "equivalence_ratio = " << equivalence_ratio << '\n';
// cout << "combustion_efficiency = " << combustion_efficiency << '\n';
// cout << "AFR = " << 14.7 / equivalence_ratio << '\n';
// cout << "Mixture lever = " << Mixture_Lever_Pos << '\n';
// cout << "n = " << RPM << " rpm\n";
cout << "T_amb = " << T_amb << '\n';
}
count1++;
if(count1 == 600)
@ -452,6 +453,14 @@ void FGNewEngine::update() {
// on the actual manifold pressure, which takes air pressure into account. However - this fails to
// take the temperature into account - this is TODO.
// Adjust power for temperature - this is temporary until the power is done as a function of mass flow rate induced
// Adjust for Temperature - Temperature above Standard decrease
// power by 7/120 % per degree F increase, and incease power for
// temps below at the same ratio
float T_amb_degF = (T_amb * 1.8) - 459.67;
float T_amb_sea_lev_degF = (288 * 1.8) - 459.67;
Percentage_Power = Percentage_Power + ((T_amb_sea_lev_degF - T_amb_degF) * 7 /120);
//DCL - now adjust power to compensate for mixture
Percentage_of_best_power_mixture_power = Power_Mixture_Correlation(equivalence_ratio);
Percentage_Power = Percentage_Power * Percentage_of_best_power_mixture_power / 100.0;