Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.14 KB

to-vector-from-horizon.md

File metadata and controls

20 lines (12 loc) · 1.14 KB

//astronomy/io.github.cosinekitty.astronomy/Spherical/toVectorFromHorizon

toVectorFromHorizon

fun toVectorFromHorizon(time: Time, refraction: Refraction): Vector

Given apparent angular horizontal coordinates, calculate the unrefracted horizontal vector.

Assumes this contains apparent horizontal coordinates: lat holds the refracted altitude angle, lon holds the azimuth in degrees clockwise from north, and dist holds the distance from the observer to the object in AU.

Return

A vector in the horizontal system: x = north, y = west, and z = zenith (up).

Parameters

time The date and time of the observation. This is needed because the returned Vector requires a valid time value when passed to certain other functions.
refraction The refraction option used to model atmospheric lensing. See refractionAngle. This specifies how refraction is to be removed from the altitude stored in this.lat.