KaoSDlanor

KOS

Sep 30th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. lock maxaccel to ship:maxthrust/ship:mass.
  2. lock gravaccel to constant():G*ship:body:mass/(ship:altitude+ship:body:radius)^2.
  3.  
  4. set targethgt to 500.
  5. until 0 {
  6. set targaccel to -(ship:verticalspeed^2)/(2*targethgt-ship:altitude).
  7. if ship:altitude<targethgt {
  8. lock throttle to (targaccel+gravaccel)/maxaccel.
  9. } else {
  10. lock throttle to (targaccel-gravaccel)/maxaccel.
  11. }.
  12. wait 1.
  13. }.
Advertisement
Add Comment
Please, Sign In to add comment