From: david Date: Mon, 14 Jan 2002 20:44:19 +0000 (+0000) Subject: - changed mixture cutoff from 50% to 30%, to allow for borderline X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=80130682fb96a350d7137436ccc7f61b8e5e660e;p=flightgear.git - changed mixture cutoff from 50% to 30%, to allow for borderline leaning at high altitude - changed to report correct manifold pressure for altitude when engine is running --- diff --git a/src/FDM/JSBSim/FGPiston.cpp b/src/FDM/JSBSim/FGPiston.cpp index d7f8d1c2b..4cc055bf6 100644 --- a/src/FDM/JSBSim/FGPiston.cpp +++ b/src/FDM/JSBSim/FGPiston.cpp @@ -156,7 +156,7 @@ double FGPiston::Calculate(double PowerRequired) IAS = Auxiliary->GetVcalibratedKTS(); - if (Mixture >= 0.5) { + if (Mixture >= 0.3) { doEngineStartup(); doManifoldPressure(); doAirFlow(); @@ -299,6 +299,9 @@ void FGPiston::doManifoldPressure(void) /** * Calculate the air flow through the engine. * + * At this point, ManifoldPressure_inHg still represents the sea-level + * MP, not adjusted for altitude. + * * Inputs: p_amb, R_air, T_amb, ManifoldPressure_inHg, Displacement, * RPM, volumetric_efficiency * @@ -348,8 +351,8 @@ void FGPiston::doFuelFlow(void) void FGPiston::doEnginePower(void) { - double True_ManifoldPressure_inHg = ManifoldPressure_inHg * p_amb / p_amb_sea_level; - double ManXRPM = True_ManifoldPressure_inHg * RPM; + ManifoldPressure_inHg *= p_amb / p_amb_sea_level; + double ManXRPM = ManifoldPressure_inHg * RPM; // FIXME: this needs to be generalized Percentage_Power = (6e-9 * ManXRPM * ManXRPM) + (8e-4 * ManXRPM) - 1.0; double T_amb_degF = (T_amb * 1.8) - 459.67;