#Kerbal Space Program Autopilot

23 messages · Page 1 of 1 (latest)

twin turtle
#

I am proud to present: My first ever successful orbital automatic launch system, so far, only tested with the Kerbal X rocket, but you guys are free to try it with your own.
If there are any kOS coders in here, feel free to give me some tips!!!

print "Boot success".

lock targetPitch to 88.963 - 1.03287 *alt:radar^0.39.
set targetDirection to 90.
set power to 1.
set TargetApoapsis to 85000.
set targetPeriapsis to 70000.

from {local countdown is 3.} until countdown = 0 STEP {set countdown to countdown -1.} do {
    print (countdown).
    wait 1.
}

print "launch".
lock throttle to power.
stage.
lock steering to up.
wait 5.
print "steering nominal...".


set oldThrust to ship:AVAILABLETHRUST.
when AVAILABLETHRUST < (oldThrust) then {
    stage.
    print "stage success".
    lock throttle to power.
    wait 1.
    set oldThrust to ship:AVAILABLETHRUST.
    preserve.
}

wait until ship:altitude > 50.
lock steering to heading(targetDirection, targetPitch).

wait until ship:altitude >= 18500.
lock throttle to 0.5.

function Shutd0wn1{
    wait until ship:apoapsis >= TargetApoapsis.
    set power to 0.
    lock throttle to power.
}

Shutd0wn1().

lock steering to prograde.

wait until ship:altitude >= 84500.
lock throttle to 1.

wait until TargetPeriapsis <= ship:periapsis.
lock throttle to 0.
wait 1.
print "Capsule is in orbit".
wait 10.
stage.
wait 5.
toggle AG1.```

Note that there is no way to get back to the earth after reaching orbit with this script, i have not made a return system... YET
jade valve
#

theres an easy way to reach earth after this script runs

#

point the nose down and hope for the best

stable otter
#

ngl I misread this as "kernel space" and got super excited and asked rhetorically "linux or unix" and yet this is also cool af

twin turtle
stable otter
jade valve
stable otter
#

that's actually their landing strategy tbh

jade valve
#

fuck, nvm

#

you got a point

twin turtle
stable otter
#

so this Kerbal Space thing, is this like a fun game of automata programming?

#

my only point of reference is like assembly wars and bot/worm battles in wargame servers.

jade valve
twin turtle
#

I can choose and customize my computers power and connectivity to the space center

#

And I need to build it myself

jade valve
#

ok wtf thats D E E P into nerd territory

#

already love it

stable otter
twin turtle
stable otter
# jade valve "assembly wars"...???

eh, not to derail but some dorky thing where you battle other participants for compute resources using assembler tricks and not really useful life skills