diff --git a/lib/stabilize_rocket.ks b/lib/stabilize_rocket.ks index 4df50e0..58e4ff6 100644 --- a/lib/stabilize_rocket.ks +++ b/lib/stabilize_rocket.ks @@ -51,8 +51,8 @@ function Hover { restoreControl(). } -function hoverVectorVac { - parameter top. +function hoverDirVac { + parameter top is SHIP:FACING:TOPVECTOR. if SHIP:VERTICALSPEED > 0 { return SHIP:UP. } @@ -60,12 +60,12 @@ function hoverVectorVac { } function alignForHover { - set top to SHIP:FACING:FOREVECTOR. + set top to SHIP:FACING:TOPVECTOR. if ReadSensor("PRES") = 0 { // if we're in a vacuum, align with retrograde for smoother horizontal control. lock STEERING to hoverDirVac(top). print "Aligning with retrograde.". - wait until done or VAng(SHIP:FACING:FOREVECTOR, hoverDirVac():FOREVECTOR) < 1. + wait until done or VAng(SHIP:FACING:FOREVECTOR, hoverDirVac(top):FOREVECTOR) < 1. if done { return. }