kOS/helicopter/hover.ks

18 lines
455 B
Plaintext

// 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.