Difference between revisions of "Template:Body data/SOI"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+second parameter;)
m (!formula;)
Line 1: Line 1:
 
<includeonly>{{#if: {{BodyData|{{{1}}}|parent}}|{{#expr: ({{BodyData|{{{1}}}|periapsis}}+{{BodyData|{{{1}}}|apoapsis}})/2*({{BodyData|{{{1}}}|mass}}/{{BodyData|{{BodyData|{{{1}}}|parent}}|mass}})^(2/5)}}|{{{2|}}}}}</includeonly><noinclude>Returns the radius of the sphere of influence of a [[celestial body]] in meters. It uses the <tt>mass</tt> (m, m<sub>parent</sub>), <tt>apoapsis</tt> (a), <tt>periapsis</tt> (p) and <tt>parent</tt> (m<sub>parent</sub>) parameters with {{Tl|BodyData}} for the given body. Returns the second parameter, an empty string when not set, if the body has no parent object (like [[Kerbol]]).
 
<includeonly>{{#if: {{BodyData|{{{1}}}|parent}}|{{#expr: ({{BodyData|{{{1}}}|periapsis}}+{{BodyData|{{{1}}}|apoapsis}})/2*({{BodyData|{{{1}}}|mass}}/{{BodyData|{{BodyData|{{{1}}}|parent}}|mass}})^(2/5)}}|{{{2|}}}}}</includeonly><noinclude>Returns the radius of the sphere of influence of a [[celestial body]] in meters. It uses the <tt>mass</tt> (m, m<sub>parent</sub>), <tt>apoapsis</tt> (a), <tt>periapsis</tt> (p) and <tt>parent</tt> (m<sub>parent</sub>) parameters with {{Tl|BodyData}} for the given body. Returns the second parameter, an empty string when not set, if the body has no parent object (like [[Kerbol]]).
:<math>r_\text{SOI} = \frac{a \cdot p}{2} \cdot \left(\frac{m}{m_\text{parent}}\right)^\frac{2}{5}</math>
+
:<math>r_\text{SOI} = \frac{a + p}{2} \cdot \left(\frac{m}{m_\text{parent}}\right)^\frac{2}{5}</math>
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:BodyData Math Templates|SOI]]</noinclude>
 
[[Category:BodyData Math Templates|SOI]]</noinclude>

Revision as of 14:17, 13 September 2013

Returns the radius of the sphere of influence of a celestial body in meters. It uses the mass (m, mparent), apoapsis (a), periapsis (p) and parent (mparent) parameters with {{BodyData}} for the given body. Returns the second parameter, an empty string when not set, if the body has no parent object (like Kerbol).