Add command-line-run programs for satellites.

This commit is contained in:
2021-08-05 22:05:40 -04:00
parent 7488effd5c
commit d5e3a21e26
5 changed files with 65 additions and 1 deletions

View File

@ -11,7 +11,7 @@ function ExecNode {
local leadT is BurnTime(NEXTNODE:DELTAV:MAG / 2).
local t is BurnTime(NEXTNODE:DELTAV:MAG).
if willStage(NEXTNODE:DELTAV:MAG) {
if WillStage(NEXTNODE:DELTAV:MAG) {
print "WARNING: kOS will stage during this node execution. Safe cancellation requires reboot.".
when flameOut() then {
print "Flameout detected. Staging.".
@ -39,6 +39,12 @@ function ExecNode {
print "Node execution complete.".
}
function WillStage {
parameter dV.
if not HASNODE { return false. }
return dV > NEXTNODE:DELTAV:MAG.
}
// Calculate the time required to burn a given dV.
// Assumes a perfectly spherical Kerbal in a vacuum.
function BurnTime {