From d6931923f9d8414e486280909fded46073e39969 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 22 Feb 2017 16:50:10 +0100 Subject: [PATCH] Fix excessive power for the 172 see: https://github.com/c172p-team/c172p-detailed/commit/6bab47bfd0ad6a0587c1a916b863ba7181ba8543 --- Aircraft/c172p/Nasal/c172p.nas | 2 +- Aircraft/c172p/Nasal/engine.nas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Aircraft/c172p/Nasal/c172p.nas b/Aircraft/c172p/Nasal/c172p.nas index 43619eae5..ffcdce6c1 100644 --- a/Aircraft/c172p/Nasal/c172p.nas +++ b/Aircraft/c172p/Nasal/c172p.nas @@ -72,7 +72,7 @@ var autostart = func (msg=1) { # removing any ice from the carburetor setprop("/engines/active-engine/carb_ice", 0.0); setprop("/engines/active-engine/carb_icing_rate", 0.0); - setprop("/engines/active-engine/volumetric-efficiency-factor", 1.0); + setprop("/engines/active-engine/volumetric-efficiency-factor", 0.85); # Checking for minimal fuel level var fuel_level_left = getprop("/consumables/fuel/tank[0]/level-norm"); diff --git a/Aircraft/c172p/Nasal/engine.nas b/Aircraft/c172p/Nasal/engine.nas index 8921f837b..1cd59af71 100644 --- a/Aircraft/c172p/Nasal/engine.nas +++ b/Aircraft/c172p/Nasal/engine.nas @@ -180,7 +180,7 @@ var carb_icing_function = maketimer(1.0, func { carb_ice = std.max(0.0, std.min(carb_ice, 1.0)); # this property is used to lower the RPM of the engine as ice accumulates (more ice in the carburator == less power) - var vol_eff_factor = 1.0 - 2.218 * carb_ice; + var vol_eff_factor = std.max(0.0, 0.85 - 1.72 * carb_ice); setprop("/engines/active-engine/carb_ice", carb_ice); setprop("/engines/active-engine/carb_icing_rate", carb_icing_rate); @@ -191,7 +191,7 @@ var carb_icing_function = maketimer(1.0, func { else { setprop("/engines/active-engine/carb_ice", 0.0); setprop("/engines/active-engine/carb_icing_rate", 0.0); - setprop("/engines/active-engine/volumetric-efficiency-factor", 1.0); + setprop("/engines/active-engine/volumetric-efficiency-factor", 0.85); setprop("/engines/active-engine/oil_temp_factor", 0.0); }; });