SHOW:
|
|
- or go back to the newest paste.
| 1 | - | //run launch_to_orbit |
| 1 | + | |
| 2 | - | lock steering to prograde. |
| 2 | + | |
| 3 | - | print "Enabling solar before fairings". |
| 3 | + | |
| 4 | - | panels on. |
| 4 | + | |
| 5 | - | print "Faring deploy". |
| 5 | + | |
| 6 | - | stage. |
| 6 | + | |
| 7 | - | wait 5. |
| 7 | + | |
| 8 | - | print "Booster separation". |
| 8 | + | |
| 9 | - | stage . |
| 9 | + | |
| 10 | - | wait 1. |
| 10 | + | |
| 11 | - | stage . |
| 11 | + | |
| 12 | when geoposition:lng > 140 then set warp to 1. | |
| 13 | when geoposition:lng > 150 then set warp to 0. | |
| 14 | set warp to 3. | |
| 15 | } | |
| 16 | ||
| 17 | when geoposition:lng > 161.5 then {
| |
| 18 | print "Deorbit burn". | |
| 19 | lock throttle to 1. | |
| 20 | when periapsis < 30_000 then {
| |
| 21 | lock throttle to 0.25. | |
| 22 | when periapsis < 25_000 then {
| |
| 23 | lock throttle to 0. | |
| 24 | print "Deorbit burn completed. Preparing for reentry.". | |
| 25 | lock steering to lookDirUp(srfretrograde:forevector, sun:position). | |
| 26 | brakes on. | |
| 27 | ||
| 28 | wait 5. | |
| 29 | ||
| 30 | print "Warping to atmosphere.". | |
| 31 | set warp to 2. | |
| 32 | when altitude < (body:atm:height + 400) then {
| |
| 33 | print "Warping to thicker parts of the atmosphere.". | |
| 34 | set warp to 0. | |
| 35 | set warpmode to "physics". | |
| 36 | set warp to 3. | |
| 37 | when altitude < 25000 then | |
| 38 | {
| |
| 39 | print "Now in real time". | |
| 40 | set warp to 0. | |
| 41 | } | |
| 42 | } | |
| 43 | ||
| 44 | ||
| 45 | when geoposition:lng > -49.0 and geoposition:lng < -45 then {
| |
| 46 | print "Near KSC". | |
| 47 | if airspeed > 380 {
| |
| 48 | print "Still too fast, slowing down.". | |
| 49 | when airspeed < 385 then {
| |
| 50 | lock throttle to 0. | |
| 51 | } | |
| 52 | lock throttle to 1. | |
| 53 | } | |
| 54 | ||
| 55 | } | |
| 56 | when geoposition:lng > -48.4 and geoposition:lng < -45 then {
| |
| 57 | if geoposition:lng > -48.4 and geoposition:lng < -45 {
| |
| 58 | print "Over KSC". | |
| 59 | } else {
| |
| 60 | print "Lithobraking imminent... slowing down". | |
| 61 | } | |
| 62 | stage. | |
| 63 | when airspeed < 150 then {
| |
| 64 | lock steering to lookDirUp( up:forevector, ship:facing:topvector). | |
| 65 | gear on. | |
| 66 | } | |
| 67 | } | |
| 68 | } | |
| 69 | } | |
| 70 | } | |
| 71 | } else {
| |
| 72 | print "Something is not right. I am not a booster.". | |
| 73 | } |