Add very early work on helicopter automation.

This commit is contained in:
Anna Rose 2021-07-22 23:29:34 -04:00
parent 084b8e839d
commit a39f5fa328

17
helicopter/hover.ks Normal file
View File

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