Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set cam to addons:camera:flightcamera.
- set camflag to false.
- wait 1.
- set camflag to true.
- set cam:mode to "orbital".
- lock cx to 0.
- set cy to -25.
- Set cz to 0.
- Set cd to cam:distance.
- on time:seconds { set cam:position to (-target:position:normalized*cd)*r(cx,cy,cz). return camflag and target:distance > 200.}
- lock dv to Round(800 * 9.81 * ln(ship:mass / (ship:mass - (ship:liquidfuel * 0.005))), 5).
- lock relvel to ship:velocity:orbit - target:velocity:orbit.
- lock tarSpeed to min(target:distance / ((relvel:mag + 10)/(maxthrust/mass)), relvel:mag).
- lock tarVel to target:position:normalized * tarSpeed.
- lock steering to tarVel - relvel.
- lock throttle to choose (steering:mag / (ship:availablethrust/ship:mass))/2 if steering:mag > 0.01 and vang(steering,ship:facing:vector) < 2.5 else 0.
- set sgp to 0.
- set sggo to true.
- set sgf to 8.
- set sgpr to 4.
- function sgd {
- parameter l. parameter d.
- If l:length > sgpr set sgpr to l:length.
- print (l:padleft(sgpr) + ": " +round(d,2)):padright(terminal:width) at (0, sgp).
- set sgp to sgp + 1.
- }.
- set sggo to false. wait 1. set sggo to true.
- On round(kuniverse:realtime * sgf) {
- set sgp to 0.
- sgd("Tarspeed", tarspeed).
- sgd("dv", dv).
- sgd("Distance", target:distance).
- sgd("relvel", relvel:mag).
- Print "":padright(terminal:width) at (0,sgp).
- Set sgp to sgp + 1.
- Print "":padright(terminal:width) at (0,sgp).
- return sggo.
- }
Add Comment
Please, Sign In to add comment