11 lines
380 B
Plaintext
11 lines
380 B
Plaintext
@LAZYGLOBAL OFF.
|
|
|
|
function orbital_velocity {
|
|
// Calculate the required velocity to acheive orbit at the provided altitude.
|
|
// https://en.wikipedia.org/wiki/Orbital_speed#Mean_orbital_speed
|
|
// http://www.orbiterwiki.org/wiki/Front_Cover_Equations
|
|
parameter altitude.
|
|
|
|
return SQRT(BODY:MU / (BODY:RADIUS + altitude)). // BODY:MU = CONSTANT:G * BODY:MASS
|
|
}
|