Add very early work on helicopter automation.
This commit is contained in:
17
helicopter/hover.ks
Normal file
17
helicopter/hover.ks
Normal 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.
|
Reference in New Issue
Block a user