Interface RefsysAPI

All Known Implementing Classes:
RefsysModule

public interface RefsysAPI
API definition for the reference system module, RefsysModule.

The reference system module contains calls and methods to deal with reference system changes and other useful utilities related to orientation.

  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    cartesian_to_equatorial(double x, double y, double z)
    Convert internal cartesian coordinates to equatorial [ra, dec, distance] coordinates.
    double[]
    ecliptic_to_cartesian(double l, double b, double r)
    Convert ecliptic coordinates to the internal cartesian coordinate system.
    double[]
    ecliptic_to_equatorial(double[] ecl)
    Convert ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
    double[]
    equatorial_cartesian_to_internal(double[] eq, double factor)
    Convert regular Cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial North Pole (dec=90) to internal Cartesian coordinates in internal units.
    double[]
    equatorial_to_cartesian(double ra, double dec, double r)
    Convert equatorial coordinates to the internal cartesian coordinate system.
    double[]
    Convert equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.
    double[]
    Convert equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.
    double[]
    galactic_to_cartesian(double l, double b, double r)
    Convert galactic coordinates to the internal cartesian coordinate system.
    double[]
    galactic_to_equatorial(double[] gal)
    Convert galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
    double[]
    Returns the column-major matrix representing the given reference system transformation.
  • Method Details

    • get_transform_matrix

      double[] get_transform_matrix(String name)
      Returns the column-major matrix representing the given reference system transformation.
      Parameters:
      name -

      The name of the reference system transformation:

      • 'equatorialtoecliptic', 'eqtoecl'
      • 'ecliptictoequatorial', 'ecltoeq'
      • 'galactictoequatorial', 'galtoeq'
      • 'equatorialtogalactic', 'eqtogal'
      • 'ecliptictogalactic', 'ecltogal
      • 'galactictoecliptic', 'galtoecl
      Returns:
      The transformation matrix in column-major order.
    • galactic_to_cartesian

      double[] galactic_to_cartesian(double l, double b, double r)
      Convert galactic coordinates to the internal cartesian coordinate system.
      Parameters:
      l - The galactic longitude in degrees.
      b - The galactic latitude in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • ecliptic_to_cartesian

      double[] ecliptic_to_cartesian(double l, double b, double r)
      Convert ecliptic coordinates to the internal cartesian coordinate system.
      Parameters:
      l - The ecliptic longitude in degrees.
      b - The ecliptic latitude in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • equatorial_to_cartesian

      double[] equatorial_to_cartesian(double ra, double dec, double r)
      Convert equatorial coordinates to the internal cartesian coordinate system.
      Parameters:
      ra - The right ascension in degrees.
      dec - The declination in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • cartesian_to_equatorial

      double[] cartesian_to_equatorial(double x, double y, double z)
      Convert internal cartesian coordinates to equatorial [ra, dec, distance] coordinates.
      Parameters:
      x - The x component, in any distance units.
      y - The y component, in any distance units.
      z - The z component, in any distance units.
      Returns:
      An array of doubles containing [ra, dec, distance] with ra and dec in degrees and distance in the same distance units as the input position.
    • equatorial_cartesian_to_internal

      double[] equatorial_cartesian_to_internal(double[] eq, double factor)
      Convert regular Cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial North Pole (dec=90) to internal Cartesian coordinates in internal units.
      Parameters:
      eq - Equatorial cartesian coordinates (X->[ra=0,dec=0], Y->[ra=90,dec=0], Z->[ra=0,dec=90]).
      factor - Factor used to bring the input coordinate units to Kilometers, so that eq * factor = Km.
      Returns:
      Internal coordinates ready to be fed in other scripting functions.
    • equatorial_to_galactic

      double[] equatorial_to_galactic(double[] eq)
      Convert equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.
      Parameters:
      eq - Vector with [x, y, z] equatorial cartesian coordinates.
      Returns:
      Vector with [x, y, z] galactic cartesian coordinates.
    • equatorial_to_ecliptic

      double[] equatorial_to_ecliptic(double[] eq)
      Convert equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.
      Parameters:
      eq - Vector with [x, y, z] equatorial cartesian coordinates.
      Returns:
      Vector with [x, y, z] ecliptic cartesian coordinates.
    • galactic_to_equatorial

      double[] galactic_to_equatorial(double[] gal)
      Convert galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
      Parameters:
      gal - Vector with [x, y, z] galactic cartesian coordinates.
      Returns:
      Vector with [x, y, z] equatorial cartesian coordinates.
    • ecliptic_to_equatorial

      double[] ecliptic_to_equatorial(double[] ecl)
      Convert ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
      Parameters:
      ecl - Vector with [x, y, z] ecliptic cartesian coordinates.
      Returns:
      Vector with [x, y, z] equatorial cartesian coordinates.