Get full automation to orbit functioning.

This commit is contained in:
Anna Rose Wiggins 2021-07-20 02:38:29 -04:00
parent 2cceb5c0c1
commit 45cd517a2a
6 changed files with 55 additions and 31 deletions

View file

@ -15,7 +15,7 @@ RCS off.
SAS off.
// Countdowns are cute.
print "Initiating automated launch sequence".
print "Initiating automated launch sequence.".
from { local x is 5. } until x = 0 step { set x to x - 1. } do {
print "..." + x.
wait 0.5.
@ -32,11 +32,11 @@ lock STEERING to heading(90,90,270).
stage.
wait until SHIP:ALTITUDE > 200.
print "Vectoring away from launchpad".
print "Vectoring away from launchpad.".
lock STEERING to heading(90, INITIAL_PITCH, 270).
wait until SHIP:ALTITUDE > GRAVITY_TURN_START.
print "Pitching for gravity turn".
print "Pitching for gravity turn.".
// Pitch over...
lock STEERING to heading(90, GRAVITY_PITCH, 270).
// Wait until we have rotated to (approximately) that pitch...
@ -62,14 +62,12 @@ lock THROTTLE to 0.0.
set SHIP:CONTROL:PILOTMAINTHROTTLE to 0.
wait 0.001. // make sure these control updates get applied
print "Target apoapsis acquired. Creating maneuver node".
print "Target apoapsis acquired. Creating maneuver node.".
AddCircularizationNode().
print "Releasing controls. Circularization maneuver added. Good luck, Kerman!".
runpath("/execnode").
print "Orbit acquired. Releasing controls. Good luck, Kerman.".
unlock THROTTLE.
unlock STEERING.
SAS on.
wait 5.
// todo - automatically execute the node
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Close Terminal").