fixed burn time calculations for multi stage burns
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
run "library/lib_vessel_utils".
|
||||
import("library/lib_vessel_utils").
|
||||
|
||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
||||
|
||||
print "impact " + CalculateTimeToImpact(300, 500, 9.8).
|
||||
print "Burn Duration" + CalculateBurnDuration(300, 350, 5000, 3000).
|
||||
print "Waiting for Engine start".
|
||||
WaitForEngineStart().
|
||||
|
||||
|
||||
function printStatge {
|
||||
parameter s is ship:stagenum.
|
||||
local curDv is ship:STAGEDELTAV(s):current.
|
||||
local isp is GetIspForStage(s).
|
||||
local smass is GetMassOfStage(s).
|
||||
local flow is GetMaxMassFlowForStage(s).
|
||||
local thrust is GetThrustOfStage(s).
|
||||
|
||||
print "------ Stage: " + s + " ------".
|
||||
print "Thrust: " + thrust + "kN Mass: " + round(smass, 3) + "t".
|
||||
print "DV: " + round(curDv, 2) + "m/s ISP: " + round(isp, 2) + "s Flow: " + round(flow, 4) + "Mg/s".
|
||||
print "Burn Duration: " + round(CalculateBurnDuration(curDv, isp, smass, flow), 2).
|
||||
}
|
||||
|
||||
// printStatge(ship:stagenum).
|
||||
// printStatge(ship:stagenum - 1).
|
||||
|
||||
print "Total Burn Time: " + CalculateMultiStageBurnDuration(ship:deltav:current).
|
||||
Reference in New Issue
Block a user