Improve re-entry code so that it works properly over water.

This commit is contained in:
Anna Rose 2021-08-29 17:27:34 -04:00
parent 2601db8fd4
commit dd3d741cff
2 changed files with 7 additions and 4 deletions

View File

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

View File

@ -41,7 +41,7 @@ function preLaunch {
InfoTone().
wait 2.
local duration is options["Spool-up Time"]:TEXT:ToNumber().
lock THROTTLE to 0.
stage.