diff --git a/lib/reentry.ks b/lib/reentry.ks index a716832..a77a8fd 100644 --- a/lib/reentry.ks +++ b/lib/reentry.ks @@ -10,6 +10,10 @@ function PerformReentry { SAS off. print "Reentry mode activated. Control permanently locked.". + + local normal is VCrs(SHIP:SRFPROGRADE:FOREVECTOR, SHIP:UP:FOREVECTOR). + lock STEERING to normal. + wait until Vang(SHIP:FACING:FOREVECTOR, normal) < 5. // stage until only stage 0 remains. until STAGE:NUMBER <= 1 { @@ -22,9 +26,8 @@ function PerformReentry { Antennas(false). } - when SHIP:ALTITUDE - SHIP:GEOPOSITION:TERRAINHEIGHT < 2500 then { - CHUTES on. - } + wait until SHIP:ALTITUDE - Max(SHIP:GEOPOSITION:TERRAINHEIGHT, 0) < 2500. + CHUTES on. wait until false. } diff --git a/prog/launchpad.ks b/prog/launchpad.ks index 17b8ea7..ba4a2b6 100644 --- a/prog/launchpad.ks +++ b/prog/launchpad.ks @@ -41,7 +41,7 @@ function preLaunch { InfoTone(). wait 2. - + local duration is options["Spool-up Time"]:TEXT:ToNumber(). lock THROTTLE to 0. stage.