Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not defined targetalt set targetalt to body:atm:height.
- set rt to time:seconds + eta:periapsis.
- lock altthen to body:altitudeof(positionat(ship,rt)).
- set wiggle to 500.
- set step to orbit:period / 2.
- set iterations to 0.
- until abs(altthen -targetAlt) < wiggle {
- if altthen < targetAlt { set rt to rt - step. set step to step / 2. wait 0. set iterations to iterations + 1. }
- if altthen > targetAlt { set rt to rt + step. set step to step / 2. wait 0. set iterations to iterations + 1. }
- }
- lock rteta to rt-time:seconds.
- print "rt is timestamp of " + round(altthen) + " m, and rteta is the eta.".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement