From 19256e288b759787a4181d19e5af3233f83e54fa Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Mon, 5 Apr 2021 16:32:06 +0200 Subject: [PATCH] Adjust flight level at which helicopter energy consumption increases We have an island at ~350 height and want to fly there, so let's bump the consumption limit to 400. --- patches/02_adjust-helicopter-consumption-height.patch | 11 +++++++++++ patches/series | 1 + 2 files changed, 12 insertions(+) create mode 100644 patches/02_adjust-helicopter-consumption-height.patch diff --git a/patches/02_adjust-helicopter-consumption-height.patch b/patches/02_adjust-helicopter-consumption-height.patch new file mode 100644 index 0000000..7ffc04b --- /dev/null +++ b/patches/02_adjust-helicopter-consumption-height.patch @@ -0,0 +1,11 @@ +--- a/helicopter/heli_control.lua ++++ b/helicopter/heli_control.lua +@@ -157,7 +157,7 @@ function helicopter.heli_control(self, d + local altitude_consumption_variable = 0 + + -- if gaining altitude, it consumes more power +- local y_pos_reference = position.y - 200 --after altitude 200 the power need will increase ++ local y_pos_reference = position.y - 400 --after altitude 200 the power need will increase + if y_pos_reference > 0 then altitude_consumption_variable = ((y_pos_reference/1000)^2) end + + local consumed_power = (power/1500) + altitude_consumption_variable diff --git a/patches/series b/patches/series index 30a73c8..39155b5 100644 --- a/patches/series +++ b/patches/series @@ -1 +1,2 @@ 01_columnia-acacia-tree-from-default.patch +02_adjust-helicopter-consumption-height.patch