//astronomy/io.github.cosinekitty.astronomy/Vector/toHorizontal
fun toHorizontal(refraction: Refraction): Spherical
Converts Cartesian coordinates to horizontal coordinates.
Given a horizontal Cartesian vector, returns horizontal azimuth and altitude. IMPORTANT: This function differs from Vector.toSpherical in two ways:
The returned object contains the azimuth in lon. It is measured in degrees clockwise from north: east = +90 degrees, west = +270 degrees.
The altitude is stored in lat.
The distance to the observed object is stored in dist, and is expressed in astronomical units (AU).
refraction | Refraction.None: no atmospheric refraction correction is performed. Refraction.Normal: correct altitude for atmospheric refraction. Refraction.JplHor: for JPL Horizons compatibility testing only; not recommended for normal use. |