2021-08-12 03:58:48 +00:00
|
|
|
// Automated reentry.
|
|
|
|
// Assumes stage 0 contains only parachutes.
|
|
|
|
// Primarily written for small science payload probes.
|
2021-08-11 09:04:10 +00:00
|
|
|
|
|
|
|
@lazyglobal off.
|
|
|
|
|
|
|
|
SAS off.
|
2021-08-12 03:58:48 +00:00
|
|
|
|
|
|
|
// stage until only stage 0 remains.
|
|
|
|
until STAGE:NUMBER <= 1 {
|
|
|
|
stage.
|
|
|
|
}
|
|
|
|
|
2021-08-11 09:04:10 +00:00
|
|
|
lock STEERING to SHIP:SRFRETROGRADE.
|
|
|
|
|
|
|
|
for p in SHIP:PARTS {
|
|
|
|
if p:MODULES:Find("ModuleRTAntenna") > -1 and p:GetModule("ModuleRTAntenna"):ALLEVENTNAMES:Find("Deactivate") > -1 {
|
|
|
|
p:GetModule("ModuleRTAntenna"):DoEvent("Deactivate").
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
when SHIP:ALTITUDE - SHIP:GEOPOSITION:TERRAINHEIGHT < 2500 then {
|
|
|
|
CHUTES on.
|
|
|
|
}
|
|
|
|
|
|
|
|
wait until false.
|