Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.67 KB

geo-vector.md

File metadata and controls

27 lines (16 loc) · 1.67 KB

//astronomy/io.github.cosinekitty.astronomy/geoVector

geoVector

fun geoVector(body: Body, time: Time, aberration: Aberration): Vector

Calculates geocentric 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 Earth 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.

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

Unlike helioVector, this function always corrects for light travel time. This means the position of the body is "back-dated" by the amount of time it takes light to travel from that body to an observer on the Earth.

Also, the position can optionally be corrected for aberration, an effect causing the apparent direction of the body to be shifted due to transverse movement of the Earth with respect to the rays of light coming from that body.

Return

A geocentric position vector of the center of the given body.

Parameters

body A body for which to calculate a heliocentric position: the Sun, Moon, or any of the planets.
time The date and time for which to calculate the position.
aberration Aberration.Corrected to correct for aberration, or Aberration.None to leave uncorrected.