Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lock maxaccel to ship:maxthrust/ship:mass.
- lock gravaccel to constant():G*ship:body:mass/(ship:altitude+ship:body:radius)^2.
- set targethgt to 500.
- until 0 {
- set targaccel to -(ship:verticalspeed^2)/(2*targethgt-ship:altitude).
- if ship:altitude<targethgt {
- lock throttle to (targaccel+gravaccel)/maxaccel.
- } else {
- lock throttle to (targaccel-gravaccel)/maxaccel.
- }.
- wait 1.
- }.
Advertisement
Add Comment
Please, Sign In to add comment