From a39f5fa32891a3468b92b0dd64a51c9592851d1e Mon Sep 17 00:00:00 2001 From: annabunches Date: Thu, 22 Jul 2021 23:29:34 -0400 Subject: [PATCH] Add very early work on helicopter automation. --- helicopter/hover.ks | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 helicopter/hover.ks diff --git a/helicopter/hover.ks b/helicopter/hover.ks new file mode 100644 index 0000000..50ba662 --- /dev/null +++ b/helicopter/hover.ks @@ -0,0 +1,17 @@ +// This script assumes you have bound collective (aka deploy angle) to main throttle. + +SAS off. +local pitchPID is PIDLoop(0.01, 0.01, 0.01). +local rollPID is PIDLoop(0.01, 0.01, 0.01). +local collectivePID is PIDLoop(0.01, 0.01, 0.01). + +local yaw is SHIP:FACING: + +until SHIP:VELOCITY:SURFACE:MAG < 0.01 { + + + LOCK throttle to +} + +// Because helicopters can hover stably, once we achieve a hover we should be able to turn SAS on and call it good. +SAS on.