Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- mager42
- -- splaunch 1.0
- function PlaneLaunchDriver(attitude)
- if (attitude == nil) then
- attitude = 123 -- default attitude 123km
- end
- print "Power up Atmosferic Engines. Maunaly please."
- mechjeb.attitudeTo({10,6,0}, "SURFACE_NORTH")
- mechjeb.thrustActivate(100)
- -- at 666
- while vessel.altitudeASL < 666 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,7,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 1000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,8,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 1500 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,9,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 2000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,10,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 2500 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,11,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 3000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,12,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 3500 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,13,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 4000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,14,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 5000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,15,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 6000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,16,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 7000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,17,0}, "SURFACE_NORTH")
- while vessel.altitudeASL < 8000 do
- wait(3)
- end
- print "."
- mechjeb.attitudeTo({10,18,0}, "SURFACE_NORTH")
- -- at 9000
- while vessel.altitudeASL < 9000 do
- wait(3)
- end
- print "Big Ascent profile change"
- mechjeb.controlRelease()
- mechjeb.launchTo(attitude * 1000, 0)
- -- at 12000
- while vessel.altitudeASL < 12000 do
- wait(3)
- end
- print "Power up main Engines. Manualy please."
- mechjeb.stage()
- -- at 15000
- while vessel.altitudeASL < 15000 do
- wait(3)
- end
- print "Shut Down Atmosferic Engines. Manualy please."
- wait(mechjeb.free)
- mechjeb.thrustDeactivate()
- mechjeb.controlRelease()
- print "Orbit, hopefuly."
- end
- function Launch(attitude)
- local co = coroutine.create(PlaneLaunchDriver)
- coroutine.resume(co, attitude)
- end
- print "Usage: Launch(<attitude, default 123km>)"
- print "Set Ascent A. to start turn at 8km and end staging on stage with atmosferic engines"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement