@lazyglobal off. wait until ship:unpacked. rcs off. lock throttle to 0. runoncepath("0:/lib/common.ks"). runoncepath("0:/lib/moonmath.ks"). runoncepath("0:/lib/stage/atlas.ks"). on abort { unlock steering. sas on. wait 5. stage. wait until stage:ready. stage. rcs on. set sasmode to "retrograde". ship:rootpart:getmodule("kOSProcessor"):deactivate. } // Any automatic abort triggers go where when false then { abort on. } local orbit_time is 26*60*60. local target_alt is 225_000. atlas:launch(90, target_alt, 7.5). stage. panels on. wait 1. rcs on. local dir is sun:direction. lock steering to dir. wait 1. wait until steering_locked(). set warpmode to "rails". set warp to 1. // Human can time-warp faster here if they want wait orbit_time. set warp to 0. wait 1. wait until kuniverse:timewarp:issettled. local retro is ship:retrograde. lock steering to retro. wait 1. wait until steering_locked(). stage. wait 20. stage. set warpmode to "rails". set warp to 2. wait until ship:altitude < 140_000. lock steering to ship:retrograde. wait until ship:altitude < 35_000. stage.