kOS/lib/reentry.ks

31 lines
576 B
Plaintext
Raw Normal View History

// Automated reentry.
// Assumes stage 0 contains only parachutes.
// Primarily written for small science payload probes.
RunOncePath("lib/systems").
function PerformReentry {
parameter retractAntennae is true.
SAS off.
print "Reentry mode activated. Control permanently locked.".
// stage until only stage 0 remains.
until STAGE:NUMBER <= 1 {
stage.
}
lock STEERING to SHIP:SRFRETROGRADE.
if retractAntennae {
Antennas(false).
}
when SHIP:ALTITUDE - SHIP:GEOPOSITION:TERRAINHEIGHT < 2500 then {
CHUTES on.
}
wait until false.
}