Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.23 KB

helio-vector.md

File metadata and controls

24 lines (14 loc) · 1.23 KB

//astronomy/io.github.cosinekitty.astronomy/helioVector

helioVector

fun helioVector(body: Body, time: Time): Vector

Calculates heliocentric Cartesian coordinates of a body in the J2000 equatorial system.

This function calculates the position of the given celestial body as a vector, using the center of the Sun as the origin. The result is expressed as a Cartesian vector in the J2000 equatorial system: the coordinates are based on the mean equator of the Earth at noon UTC on 1 January 2000.

The position is not corrected for light travel time or aberration. This is different from the behavior of geoVector.

If given an invalid value for body, this function will throw an InvalidBodyException.

Return

The heliocentric position vector of the center of the given body.

Parameters

body A body for which to calculate a heliocentric position: the Sun, Moon, EMB, SSB, or any of the planets. Also allowed to be a user-defined star created by defineStar.
time The date and time for which to calculate the position.