From 858fb41824cd8887beaff3579e40c28e45bc13a0 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 8 Dec 2018 17:38:14 +0000 Subject: [PATCH] Add drag due to landing lights. --- Nasal/libraries.nas | 12 ++++++++++++ Systems/a320-aerodynamics.xml | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index 1c821ad5..02ee028e 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -561,6 +561,18 @@ var lightsLoop = maketimer(0.2, func { setprop("/controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs } } + + if (getprop("controls/lighting/landing-lights[1]") >= 0.5) { + setprop("/fdm/jsbsim/rubbish/landL", 1); + } else { + setprop("/fdm/jsbsim/rubbish/landL", 0); + } + + if (getprop("controls/lighting/landing-lights[2]") >= 0.5) { + setprop("/fdm/jsbsim/rubbish/landR", 1); + } else { + setprop("/fdm/jsbsim/rubbish/landR", 0); + } }); var lTray = func { diff --git a/Systems/a320-aerodynamics.xml b/Systems/a320-aerodynamics.xml index e5bec7ba..d801c4e7 100644 --- a/Systems/a320-aerodynamics.xml +++ b/Systems/a320-aerodynamics.xml @@ -10,6 +10,8 @@ ice/wing + rubbish/landL + rubbish/landR @@ -356,6 +358,26 @@ + + + Drag due to left landing light + + aero/qbar-psf + metrics/Sw-sqft + rubbish/landL + 0.025 + + + + + Drag due to right landing light + + aero/qbar-psf + metrics/Sw-sqft + rubbish/landR + 0.025 + +