//astronomy/io.github.cosinekitty.astronomy/helioState
fun helioState(body: Body, time: Time): StateVector
Calculates heliocentric position and velocity vectors for the given body.
Given a body and a time, calculates the position and velocity vectors for the center of that body at that time, relative to the center of the Sun. The vectors are expressed in J2000 mean equator coordinates (EQJ). If you need the position vector only, it is more efficient to call helioVector. The Sun's center is a non-inertial frame of reference. In other words, the Sun experiences acceleration due to gravitational forces, mostly from the larger planets (Jupiter, Saturn, Uranus, and Neptune). If you want to calculate momentum, kinetic energy, or other quantities that require a non-accelerating frame of reference, consider using baryState instead.
A state vector that contains heliocentric position and velocity vectors. The positions are expressed in AU. The velocities are expressed in AU/day.
body | The celestial body whose heliocentric 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. Also allowed to be a user-defined star created by defineStar. |
time | The date and time for which to calculate position and velocity. |