Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ImaRocket().
- lock x to 90.
- lock p to 90.
- lock steering to heading(x,p).
- set steeringmanager:rollcontrolanglerange to 180.
- displayDV().
- brakes off.
- ImtheRedBaron().
- lock x to 90. lock p to 0.
- lock steering to heading(x,p).
- lock calchead to body:geopositionof(ship:facing:vector):heading.
- lock throttle to (10-groundspeed)/3.
- wait until calchead > 88 and calchead < 92.
- info("launching").
- ImaRocketPlane().
- ImtheRedBaron(false).
- lock rpmtarget to 460.
- lock throttle to 1.
- lock p to 30. rcs on. setangle(30).
- when alt:radar > 50 then {
- info("flight").
- setangle(90).
- for vec in vectors set vec:gimbal:limit to 10.
- gear off.
- lock p to max(25,min(80,90-(apoapsis/45e3)*90)).
- steeringmanager:resetpids().
- rcs off.
- }.
- lock steering to heading(x,p).
- when airspeed > 275 then { info("props off"). props off. }
- when altitude > 14e3 or ship:oxidizer < 100 then {info("nukes"). startup(nukes).}
- //when apoapsis > body:atm:height-30e3 then lock steering to prograde.
- when apoapsis > 125e3 then {
- info("warp to circularize").
- lock throttle to 0.
- set warp to 1. wait 1. warpto(time:seconds + eta:apoapsis - 60).
- lock desiredVel to vxcl(up:vector,velocity:orbit):normalized * sqrt(body:MU/(body:Radius + altitude)).
- lock dV to desiredVel - velocity:orbit.
- lock steering to lookdirup(dV, ship:facing:topvector).
- when true then {
- if vang(facing:vector,dV) > 2 lock throttle to 0. else lock throttle to dv:mag / 2.
- if dv:mag > 0.03 return true. else {print "complete". lock throttle to 0. }}
- }
- when ship:liquidfuel < 0.1 then {
- set remaining to sqrt(body:mu / (ship:obt:apoapsis + body:radius)) - velocity:orbit:mag.
- print remaining.
- set ship:name to remaining:tostring().
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement