31 lines
576 B
Plaintext
31 lines
576 B
Plaintext
// 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.
|
|
}
|