Simplify lots of code in the launch sequence.

This commit is contained in:
Anna Rose Wiggins 2021-07-19 21:29:27 -04:00
parent 401f51425f
commit 642e5b17c5
4 changed files with 33 additions and 47 deletions

View file

@ -6,6 +6,18 @@ function GetPitch {
return 90 - vectorangle(SHIP:UP:FOREVECTOR, v).
}
function GetAscentVector {
parameter minPitch.
// face prograde, but hold a solid eastern heading and don't
// rotate the ship
local newHeading is lookdirup(SHIP:SRFPROGRADE:FOREVECTOR,
heading(90, 0, 270):TOPVECTOR).
if GetPitch(newHeading:FOREVECTOR) < minPitch {
set newHeading to heading(90, minPitch, 270).
}
return newHeading.
}
function AddCircularizationNode {
parameter usePeriapsis is false.
local target is SHIP:ORBIT:APOAPSIS.