From b10a164a62db3e2b4f8f78e2acc248fd906eb5bf Mon Sep 17 00:00:00 2001 From: Colin Geniet Date: Mon, 16 Mar 2020 08:48:45 +0100 Subject: [PATCH] Icing: Add scaling factor to frost-level Significantly increase scaling factor of /environment/aircraft-effects/frost-level, so that frost effects are visible. --- A320-main.xml | 2 +- Nasal/Systems/icing.nas | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/A320-main.xml b/A320-main.xml index 0174f383..6342d3b2 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -45,7 +45,7 @@ 0.0 /controls/deice/windowprobeheat 0.5 - /environment/aircraft-effects/frost-level + /environment/aircraft-effects/frost-inch Fuselage diff --git a/Nasal/Systems/icing.nas b/Nasal/Systems/icing.nas index 0ad2dc6d..e0bd7ac5 100644 --- a/Nasal/Systems/icing.nas +++ b/Nasal/Systems/icing.nas @@ -43,6 +43,11 @@ var environment = { visibLclWx: props.globals.getNode("environment/visibility-m"), }; +var effects = { + frost_inch: props.globals.getNode("environment/aircraft-effects/frost-inch", 1), + frost_norm: props.globals.getNode("environment/aircraft-effects/frost-level"), +}; + # Icing factor computation. var maxSpread = 0; @@ -166,6 +171,8 @@ var icingModel = func { foreach(iceable; iceables) { iceable.update(factor, melt_factor); } + + effects.frost_norm.setDoubleValue(effects.frost_inch.getValue() * 50); if (WingHasBeenTurnedOff and !wowl and !wowr and GroundModeFinished) { setprop("controls/deice/wing", 1);