mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-16 11:28:18 -05:00
Use consistent wording for these two orientation systems: EQJ = J2000 mean equator ECL = J2000 mean ecliptic
1.3 KiB
1.3 KiB
//astronomy/io.github.cosinekitty.astronomy/baryState
baryState
fun baryState(body: Body, time: Time): StateVector
Calculates barycentric position and velocity vectors for the given body.
Given a body and a time, calculates the barycentric position and velocity vectors for the center of that body at that time. The vectors are expressed in J2000 mean equator coordinates (EQJ).
Return
The barycentric position and velocity vectors of the body.
Parameters
| body | The celestial body whose barycentric state vector is to be calculated. Supported values are Body.Sun, Body.Moon, Body.EMB, Body.SSB, and all planets: Body.Mercury, Body.Venus, Body.Earth, Body.Mars, Body.Jupiter, Body.Saturn, Body.Uranus, Body.Neptune, Body.Pluto. |
| time | The date and time for which to calculate position and velocity. |