Initial import
This commit is contained in:
53
boot/kh-4.ks
Normal file
53
boot/kh-4.ks
Normal file
@@ -0,0 +1,53 @@
|
||||
@lazyglobal off.
|
||||
wait until ship:unpacked.
|
||||
rcs off.
|
||||
|
||||
runoncepath("0:/lib/common.ks").
|
||||
runoncepath("0:/lib/stage/thor.ks").
|
||||
runoncepath("0:/lib/stage/agena.ks").
|
||||
|
||||
local target_inclination is 90.
|
||||
local target_alt is 200_000.
|
||||
|
||||
local hdg is launch_azimuth(target_inclination, target_alt).
|
||||
|
||||
thor:launch(hdg, target_alt, 8).
|
||||
stage.
|
||||
agena:orbit(hdg).
|
||||
agena:power_down().
|
||||
print "Waiting for film or batteries to run out".
|
||||
|
||||
wait 1.
|
||||
set warpmode to "rails".
|
||||
set warp to 4.
|
||||
|
||||
local cam is ship:partsdubbed("RO-ImprovedFilmCamera")[0]:getmodule("Experiment").
|
||||
until false {
|
||||
if agena:low_power() {
|
||||
break.
|
||||
}
|
||||
if cam:depleted {
|
||||
break.
|
||||
}
|
||||
wait 1.
|
||||
}
|
||||
|
||||
set warp to 0.
|
||||
wait until kuniverse:timewarp:issettled.
|
||||
print "Transferring data to return capsule".
|
||||
ship:rootpart:getmodule("HardDrive"):transferHere.
|
||||
|
||||
print "Aligning for return".
|
||||
agena:power_up().
|
||||
rcs on.
|
||||
lock steering to ship:retrograde.
|
||||
wait 20.
|
||||
wait until steering_locked(0.1).
|
||||
|
||||
print "Deorbit!".
|
||||
stage.
|
||||
|
||||
// Stage parachute
|
||||
wait until ship:altitude < 25000.
|
||||
print "Parachute deploy".
|
||||
stage.
|
||||
Reference in New Issue
Block a user