Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "waiting for Gateway.".
- wait until body = gateway.
- print "Gateway detected".
- for a in ship:modulesnamed("ModuleDeployableAntenna") a:DoAction("retract antenna", true).
- set x to 90.
- lock p to 5.
- lock steering to heading(x,p).
- when airspeed > 70 then lock p to min(90,max(10,(airspeed-100))).
- bays off.
- toggle ag9.
- fuelcells on.
- print "locking steering".
- set blades to ship:partsdubbedpattern("fanblade").
- set rotors to ship:modulesnamed("ModuleRoboticServoRotor").
- for rt in rotors rt:setfield("torque limit(%)", 100). brakes off.
- set bladeMods to list().
- For b in blades {
- set bmod to b:getmodule("ModuleControlSurface").
- bmod:setfield("deploy", true).
- bladeMods:add(bmod).
- }
- lock torque to throttle * 100.
- lock deploy to max(3,airspeed^0.7). //todo: calculate for 4.5 aoa
- set adjust to true.
- when true then {
- set deploycopy to deploy.
- set torquecopy to torque.
- For b in bladeMods b:setfield("deploy angle", deploycopy).
- for rt in rotors rt:setfield("torque limit(%)", torquecopy).
- return adjust.
- }
- lock throttle to (ship:electriccharge - 4000)/100.
- wait until verticalspeed > 5.
- gear off.
- when altitude > 50000 or (altitude > 40e3 and verticalspeed < 4) then { toggle ag3. lock throttle to 1. set p to 10. }
- when airspeed > 450 then set p to 30.
- when airspeed > 300 then { bays off. lock torque to 0. toggle ag8. toggle ag6. }
- when altitude > 90000 or (altitude > 40e3 and verticalspeed < 1) then { for nuc in ship:partsdubbedpattern("nuc") nuc:activate(). toggle ag5. }
- when altitude > 98000 then { set p to 35. }
- when altitude > 110e3 then { toggle ag7. }
- when apoapsis > 290000 then lock p to min(50,max(0,-7*verticalspeed)).
- when periapsis > body:atm:height + 10e3 then lock throttle to 0.
- when periapsis > body:atm:height then { print "Welcome to Gateway Orbit.". lock throttle to 0. }
Add Comment
Please, Sign In to add comment