Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.65 KB

backdate-position.md

File metadata and controls

28 lines (17 loc) · 1.65 KB

//astronomy/io.github.cosinekitty.astronomy/backdatePosition

backdatePosition

fun backdatePosition(time: Time, observerBody: Body, targetBody: Body, aberration: Aberration): Vector

Solve for light travel time correction of apparent position.

When observing a distant object, for example Jupiter as seen from Earth, the amount of time it takes for light to travel from the object to the observer can significantly affect the object's apparent position.

This function solves the light travel time correction for the apparent relative position vector of a target body as seen by an observer body at a given observation time.

For geocentric calculations, #geoVector also includes light travel time correction, but the time t embedded in its returned vector refers to the observation time, not the backdated time that light left the observed body. Thus backdatePosition provides direct access to the light departure time for callers that need it.

For a more generalized light travel correction solver, see correctLightTravel.

Return

The position vector at the solved backdated time. Its t field holds the time that light left the observed body to arrive at the observer at the observation time.

Parameters

time The time of observation.
observerBody The body to be used as the observation location.
targetBody The body to be observed.
aberration Aberration.Corrected to correct for aberration, or Aberration.None to leave uncorrected.