Stage during ascent, if needed.

This commit is contained in:
Anna Rose Wiggins 2021-08-06 01:36:26 -04:00
parent 9b0792b81a
commit 75a7dfec22
2 changed files with 12 additions and 2 deletions

View file

@ -21,6 +21,16 @@ function Launch {
wait 0.5.
}
// staging logic. Stage as many times as needed until we finish ascent.
// Once Apo target is attained just drop this trigger.
when FlameOut() or SHIP:ORBIT:APOAPSIS > APOAPSIS_TARGET then {
if SHIP:ORBIT:APOAPSIS > APOAPSIS_TARGET {
return false.
}
stage.
return true.
}
// Hold throttle to maintain 1.5 TWR.
// We do *not* use a PID Loop here because we can
// calculate the correct value discretely.