Siddhanta Parity API Documentation - v1.3.0
    Preparing search index...
    • Converts Cartesian coordinates to horizontal coordinates.

      Given a horizontal Cartesian vector, returns horizontal azimuth and altitude.

      IMPORTANT: This function differs from SphereFromVector in two ways:

      • SphereFromVector returns a lon value that represents azimuth defined counterclockwise from north (e.g., west = +90), but this function represents a clockwise rotation (e.g., east = +90). The difference is because SphereFromVector is intended to preserve the vector "right-hand rule", while this function defines azimuth in a more traditional way as used in navigation and cartography.
      • This function optionally corrects for atmospheric refraction, while SphereFromVector does not.

      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).

      Parameters

      • vector: Vector

        Cartesian vector to be converted to horizontal coordinates.

      • refraction: string

        "normal": correct altitude for atmospheric refraction (recommended). "jplhor": for JPL Horizons compatibility testing only; not recommended for normal use. null: no atmospheric refraction correction is performed.

      Returns Spherical