Stage during ascent, if needed.
This commit is contained in:
parent
9b0792b81a
commit
75a7dfec22
|
@ -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.
|
||||
|
|
|
@ -13,7 +13,7 @@ function ExecNode {
|
|||
|
||||
if WillStage(NEXTNODE:DELTAV:MAG) {
|
||||
print "WARNING: kOS will stage during this node execution. Safe cancellation requires reboot.".
|
||||
when flameOut() then {
|
||||
when FlameOut() then {
|
||||
print "Flameout detected. Staging.".
|
||||
stage.
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ function stageMass {
|
|||
return m.
|
||||
}
|
||||
|
||||
function flameOut {
|
||||
function FlameOut {
|
||||
local ens is List().
|
||||
list engines in ens.
|
||||
for en in ens {
|
||||
|
|
Loading…
Reference in New Issue
Block a user