]> git.mxchange.org Git - flightgear.git/commitdiff
- changed mixture cutoff from 50% to 30%, to allow for borderline
authordavid <david>
Mon, 14 Jan 2002 20:44:19 +0000 (20:44 +0000)
committerdavid <david>
Mon, 14 Jan 2002 20:44:19 +0000 (20:44 +0000)
  leaning at high altitude

- changed to report correct manifold pressure for altitude when engine
  is running

src/FDM/JSBSim/FGPiston.cpp

index d7f8d1c2bae3d6f4e6fe5e79e1f91e6ded946e7c..4cc055bf602eed77425910a4a239bec767cad7e1 100644 (file)
@@ -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;