Fix bugs in hover/landing code.
This commit is contained in:
parent
c3bfd4c650
commit
7f8fc751d4
|
@ -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.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user