
KMinO
By:
Jontu on
Aug 12th, 2012 | syntax:
Lua | size: 1.11 KB | hits: 134 | expires: Never
--
-- Script modified from FlyMeToTheMun by Jontu
-- Original script by R4m0n
--
function KMinODriver(alt, malt)
print "Launching..."
mechjeb.launchTo(alt*1000, 0)
wait(mechjeb.free)
mechjeb.autoStageActivate()
print "TMI..."
mechjeb.transfer("Minmus", 200000)
wait(mechjeb.free)
print "Warping to SoI..."
mechjeb.warpToEvent("soi")
wait(mechjeb.free)
mechjeb.autoStageActivate()
print "Adjusting Pe"
mechjeb.changePe(malt*1000)
wait(mechjeb.free)
print "Warping to Pe..."
mechjeb.warpToEvent("pe", 30)
wait(mechjeb.free)
print "Circularizing orbit..."
mechjeb.circularize()
wait(mechjeb.free)
mechjeb.autoStageDeactivate()
print "Orbit Achieved"
m = mechjeb.getModule("OrbitOper")
m.enabled = false
end
function KMinO(alt, malt)
local co = coroutine.create(KMinODriver)
coroutine.resume(co, alt, malt)
end
print "Usage: KMinO(alt, malt)"
print "alt is Kerbin Orbit Altitude in km"
print "malt is Minmus Orbit Altitude in km"
print " "
print "Warning: Insure that you do not transect Mun."