Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function startup {
- SET g TO KERBIN:MU / KERBIN:RADIUS^2.
- LOCK accvec TO SHIP:SENSORS:ACC - SHIP:SENSORS:GRAV.
- LOCK gforce TO accvec:MAG / g.
- SET gforce_setpoint TO 1.2.
- SET Kp TO 0.05.
- LOCK dthrott TO Kp * (gforce_setpoint - gforce).}
- startup().
- SET thrott TO 1.
- LOCK THROTTLE to thrott.
- set x to 7.32602*10^(-9)*ship:altitude^2 - 0.00168158*ship:altitude + 94.6117.
- LOCK STEERING TO HEADING(90,87).
- rcs on.wait 1.STAGE.
- when ship:altitude > 4000 then{
- set x to 7.32602*10^(-9)*ship:altitude^2 - 0.00168158*ship:altitude + 94.6117.
- LOCK STEERING TO HEADING(90,x).
- when ship:maxthrustat(0) < 1 then {STAGE. wait .5.}
- when SHIP:APOAPSIS >90000 then {LOCK THROTTLE TO 0.}
- }
- when ship:altitude > 50000 and ship:apoapsis < 90000 then{ lock throttle to .5. wait until ship:apoapsis > 90000. lock throttle to 0.}
- when ship:maxthrustat(0) < 1 then {STAGE.wait.5.}
- When Eta:apoapsis < 25 then {
- lock throttle to 75000 - ship:periapsis.
- when ship:maxthrustat(0) < 1 then {STAGE.wait.5.}
- when ship:apoapsis>95000 then {lock throttle to 0.
- when Eta:apoapsis < 25 then {
- set throttle to 75000 - ship:periapsis.}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement