Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lock steering to srfprograde.//nose forward
- set tr1 to transferall("liquidfuel",ship:parts,ship:partstagged("fronttank")).
- set tr2 to transferall("oxidizer",ship:parts,ship:partstagged("fronttank")).
- set glide to 0.27.//the glide slope the plane will try to keep
- set ksc_longitude to -74.7.
- set ksc_latitude to -0.0486.
- lock targetheight to (ksc_longitude-ship:longitude)*constant:degtorad*kerbin:radius*glide+80.
- wait until altitude < 70000.
- print "Reentry starting, fuel forward, airbrakes active.".
- set tr1:active to true.
- set tr2:active to true.
- ag3 on.//airbrakes
- wait until altitude < 55000.
- print "Reaction wheels off, engines standby.".
- ag1 off.//reaction wheels and engine mode
- wait until groundspeed < 1000.
- print "Reentry successfull, navigating to space center.".
- ag3 off.//airbrakes off
- lock steering to heading(90+200*(ship:latitude-ksc_latitude)+ship:velocity:surface:y/10,-10+min(max((targetheight-altitude)/100,-5),5)).
- until alt:radar < 200 {
- print "Altitude should be: " + targetheight at (0,15).
- print "Altitude currently: " + altitude at (0,16).
- print "Latitude deviation: " + (ship:latitude-ksc_latitude) at (0,17).
- print "Northward velocity: " + ship:velocity:surface:y at (0,18).
- wait 1.
- }
- lock steering to heading(90,-verticalspeed/2-alt:radar/100).//FLARE to reduce vertical speed!
- gear on.
- wait until alt:radar < 15.
- lock steering to heading(90,3).
- brakes on.
- ag3 on.
- wait until groundspeed < 0.1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement