Improve estimated burn duration equation readability.
This commit is contained in:
parent
5f4df3b138
commit
5fd4bfc3d7
1 changed files with 6 additions and 3 deletions
|
@ -10,17 +10,20 @@ function estimated_burn_duration {
|
|||
// Based on:
|
||||
// https://en.wikipedia.org/wiki/Tsiolkovsky_rocket_equation
|
||||
// https://space.stackexchange.com/questions/27375/how-do-i-calculate-a-rockets-burn-time-from-required-velocity
|
||||
// https://www.alternatewars.com/BBOW/Space/Rocket_Equations.htm
|
||||
//
|
||||
parameter burn.
|
||||
parameter isp is isp_sum().
|
||||
parameter maxthrust is SHIP:maxthrust.
|
||||
parameter thrust is SHIP:availablethrust.
|
||||
|
||||
if burn:istype("Node") {
|
||||
set burn to burn:deltav.
|
||||
}
|
||||
|
||||
local exhaust_velocity is isp * (CONSTANT:G * KERBIN:mass).
|
||||
return ((SHIP:mass * exhaust_velocity) / maxthrust) * (1 - CONSTANT:E^(-burn:mag/exhaust_velocity)).
|
||||
local deltav is burn:mag.
|
||||
local exhaust_velocity is isp * CONSTANT:g0.
|
||||
local wet_mass is SHIP:mass.
|
||||
return ((wet_mass * exhaust_velocity) / thrust) * (1 - CONSTANT:E^(-deltav/exhaust_velocity)).
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue