Loading...
Searching...
No Matches
system.c File Reference

Various transformations between different coordinate systems used in astronomy, such as equatorial, ecliptic, Galactic, or local horizontal coordinate systems. More...

## Functions

int | ecl2equ (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, double elon, double elat, double *restrict ra, double *restrict dec)
| Convert ecliptic longitude and latitude to right ascension and declination.
short | ecl2equ_vec (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, const double *in, double *out)
| Converts an ecliptic position vector to an equatorial position vector.
short | equ2ecl (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, double ra, double dec, double *restrict elon, double *restrict elat)
| Convert right ascension and declination to ecliptic longitude and latitude.
short | equ2ecl_vec (double jd_tt, enum novas_equator_type coord_sys, enum novas_accuracy accuracy, const double *in, double *out)
| Converts an equatorial position vector to an ecliptic position vector.
int | equ2gal (double ra, double dec, double *restrict glon, double *restrict glat)
| Converts ICRS right ascension and declination to galactic longitude and latitude.
int | equ2hor (double jd_ut1, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const on_surface *restrict location, double ra, double dec, enum novas_refraction_model ref_option, double *restrict zd, double *restrict az, double *restrict rar, double *restrict decr)
int | gal2equ (double glon, double glat, double *restrict ra, double *restrict dec)
| Converts galactic longitude and latitude to ICRS right ascension and declination.
int | hor_to_itrs (const on_surface *restrict location, double az, double za, double *restrict itrs)
| Converts astrometric (unrefracted) azimuth and zenith angles at the specified observer location to a unit position vector in the Earth-fixed ITRS frame.
int | itrs_to_hor (const on_surface *restrict location, const double *restrict itrs, double *restrict az, double *restrict za)
| Converts a position vector in the Earth-fixed ITRS frame to astrometric (unrefracted) azimuth and zenith angles at the specified observer location.
int | novas_e2h_offset (double dra, double ddec, double pa, double *restrict daz, double *restrict del)
| Converts coordinate offsets, from the local equatorial system to local horizontal offsets.
int | novas_enu_to_itrs (const double *enu, double lon, double lat, double *itrf)
| Converts an East-North-Up (ENU) vector at the specified site to an ITRS vector.
double | novas_epa (double ha, double dec, double lat)
| Returns the Parallactic Angle (PA) calculated for an RA/Dec location of the sky at a given sidereal time.
int | novas_h2e_offset (double daz, double del, double pa, double *restrict dra, double *restrict ddec)
| Converts coordinate offsets, from the local horizontal system to local equatorial offsets.
double | novas_hpa (double az, double el, double lat)
| Returns the Parallactic Angle (PA) calculated for a horizontal Az/El location of the sky.
int | novas_itrs_to_enu (const double *itrf, double lon, double lat, double *enu)
| Converts an ITRS position vector to a local East-North-Up (ENU) vector at the specified site.
int | novas_los_to_xyz (const double *los, double lon, double lat, double *xyz)
| Converts a 3D line-of-sight vector (δφ, δθ, δr) to a rectangular equatorial (δx, δy, δz) vector.
int | novas_uvw_to_xyz (const double *uvw, double ha, double dec, double *xyz)
| Converts equatorial u,v,w projected (absolute or relative) coordinates to rectangular telescope x,y,z coordinates (in PEF) to for a specified line of sight.
int | novas_xyz_to_los (const double *xyz, double lon, double lat, double *los)
| Converts a 3D rectangular equatorial (δx, δy, δz) vector to a polar (δφ, δθ, δr) vector along a line-of-sight.
int | novas_xyz_to_uvw (const double *xyz, double ha, double dec, double *uvw)
| Converts rectangular telescope x,y,z (absolute or relative) coordinates (in PEF) to an equatorial u,v,w projection for a specified line of sight.

## Detailed Description

Various transformations between different coordinate systems used in astronomy, such as equatorial, ecliptic, Galactic, or local horizontal coordinate systems.

This module also provides functions otherwise relating to the observer locations.

For Earth-based geodetic locations, the module provides a set of functions to convert between various (local) coordinate systems. For example, calculating parallactic angles (a.k.a. vertical position angle or VPA), for converting between horizontal and equatorial offsets, and various functions for converting equatorial vectors to a line-of-sight, or u, v, w coordinate bases, and vice-versa.

Date
  Created on Mar 5, 2025

Author
  Attila Kovacs and G. Kaplan

See also
  frames.c, transform.c

## Function Documentation

## ecl2equ()

int ecl2equ | ( | double | jd_tt,
|  | enum novas_equator_type | coord_sys,
|  | enum novas_accuracy | accuracy,
|  | double | elon,
|  | double | elat,
|  | double *restrict | ra,
|  | double *restrict | dec )

Convert ecliptic longitude and latitude to right ascension and declination.

To convert GCRS ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at'jd_tt'.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2])
  | coord_sys | The astrometric reference system of the coordinates. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates.
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | elon | [deg] Ecliptic longitude in degrees, referred to the specified ecliptic and equinox of date.
  | elat | [deg] Ecliptic latitude in degrees, referred to the specified ecliptic and equinox of date.
  [out] | ra | [h] Right ascension in hours, referred to specified equator and equinox of date.
  [out] | dec | [deg] Declination in degrees, referred to specified equator and equinox of date.

Returns
  0 if successful, or else 1 if the value of 'coord_sys' is invalid.

Since
  1.0

Author
  Attila Kovacs

See also
  ecl2equ_vec(), equ2ecl()

References ecl2equ_vec().

Referenced by supernovas::Ecliptic::to_equatorial().

## ecl2equ_vec()

short ecl2equ_vec | ( | double | jd_tt,
|  | enum novas_equator_type | coord_sys,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Converts an ecliptic position vector to an equatorial position vector.

To convert ecliptic coordinates (mean ecliptic and equinox of J2000.0) to GCRS RA and dec to, set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2])
  | coord_sys | The astrometric reference system type of the coordinates
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Position vector, referred to the specified ecliptic and equinox of date.
  [out] | out | Position vector, referred to the specified equator and equinox of date. It can be the same vector as the input.

Returns
  0 if successful, -1 if either vector argument is NULL or the accuracy is invalid, or else 1 if the value of 'coord_sys' is invalid.

See also
  ecl2equ(), equ2ecl_vec()

References e_tilt(), frame_tie(), J2000_TO_ICRS, mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_GCRS_EQUATOR, NOVAS_MEAN_EQUATOR, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUATOR.

Referenced by ecl2equ(), and novas_moon_elp_posvel_fp().

## equ2ecl()

short equ2ecl | ( | double | jd_tt,
|  | enum novas_equator_type | coord_sys,
|  | enum novas_accuracy | accuracy,
|  | double | ra,
|  | double | dec,
|  | double *restrict | elon,
|  | double *restrict | elat )

Convert right ascension and declination to ecliptic longitude and latitude.

To convert GCRS RA and dec to ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2])
  | coord_sys | The astrometric reference system of the coordinates. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates.
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | ra | [h] Right ascension in hours, referred to the specified equator and equinox of date.
  | dec | [deg] Declination in degrees, referred to the specified equator and equinox of date.
  [out] | elon | [deg] Ecliptic longitude in degrees, referred to specified ecliptic and equinox of date.
  [out] | elat | [deg] Ecliptic latitude in degrees, referred to specified ecliptic and equinox of date.

Returns
  0 if successful, or else 1 if the value of 'coord_sys' is invalid.

See also
  equ2ecl_vec(), ecl2equ()

References equ2ecl_vec().

Referenced by supernovas::Equatorial::to_ecliptic().

## equ2ecl_vec()

short equ2ecl_vec | ( | double | jd_tt,
|  | enum novas_equator_type | coord_sys,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Converts an equatorial position vector to an ecliptic position vector.

To convert ICRS RA and dec to ecliptic coordinates (mean ecliptic and equinox of J2000.0), set 'coord_sys' to NOVAS_GCRS_EQUATOR(2); in this case the value of 'jd_tt' can be set to anything, since J2000.0 is assumed. Otherwise, all input coordinates are dynamical at 'jd_tt'.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_GCRS_EQUATOR[2])
  | coord_sys | The astrometric reference system type of the coordinates.
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Position vector, referred to the specified equator and equinox of date.
  [out] | out | Position vector, referred to the specified ecliptic and equinox of date. It can be the same vector as the input. If 'coord_sys' is NOVAS_GCRS_EQUATOR(2), the input GCRS coordinates are converted to J2000 ecliptic coordinates.

Returns
  0 if successful, -1 if either vector argument is NULL or the accuracy is invalid, or else 1 if the value of 'coord_sys' is invalid.

See also
  equ2ecl(), ecl2equ_vec()

References e_tilt(), frame_tie(), ICRS_TO_J2000, mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_GCRS_EQUATOR, NOVAS_MEAN_EQUATOR, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUATOR.

Referenced by equ2ecl().

## equ2gal()

int equ2gal | ( | double | ra,
|  | double | dec,
|  | double *restrict | glon,
|  | double *restrict | glat )

Converts ICRS right ascension and declination to galactic longitude and latitude.

REFERENCES:

1. J.-C. Liu, Z. Zhu, and H. Zhang, A&A, 526, A16 (2011), Eq. 18
2. Hipparcos and Tycho Catalogues, Vol. 1, Section 1.5.3.

Parameters

  | ra | [h] ICRS right ascension in hours.
  | dec | [deg] ICRS declination in degrees.
  [out] | glon | [deg] Galactic longitude in degrees.
  [out] | glat | [deg] Galactic latitude in degrees.

Returns
  0 if successful, or -1 if either of the output pointer arguments are NULL.

See also
  gal2equ()

Referenced by supernovas::Equatorial::to_galactic().

## equ2hor()

int equ2hor | ( | double | jd_ut1,
|  | double | ut1_to_tt,
|  | enum novas_accuracy | accuracy,
|  | double | xp,
|  | double | yp,
|  | const on_surface *restrict | location,
|  | double | ra,
|  | double | dec,
|  | enum novas_refraction_model | ref_option,
|  | double *restrict | zd,
|  | double *restrict | az,
|  | double *restrict | rar,
|  | double *restrict | decr )

Deprecated
  You should use the frame-based novas_app_to_hor() instead, or else the more explicit (less ambiguous) tod_to_itrs() followed by itrs_to_hor(), and possibly following it with an atmospheric refraction correction if appropriate.

Transforms topocentric (TOD) apparent right ascension and declination to zenith distance and azimuth. This method should not be used to convert CIRS apparent coordinates (IAU 2000 standard) – for those you should use cirs_to_itrs() followed by itrs_to_hor() instead.

It uses a method that properly accounts for polar motion, which is significant at the sub-arcsecond level. This function can also adjust coordinates for atmospheric refraction.

NOTES:

1. 'xp' and 'yp' can be set to zero if sub-arcsecond accuracy is not needed.
2. The directions 'zd'= 0 (zenith) and 'az'= 0 (north) are here considered fixed in the terrestrial system. Specifically, the zenith is along the geodetic normal, and north is toward the ITRS pole.
3. If 'ref_option' is NOVAS_STANDARD_ATMOSPHERE (1), then 'rar'='ra' and 'decr'='dec'.

REFERENCES:

1. Kaplan, G. (2008). USNO/AA Technical Note of 28 Apr 2008, "Refraction as a Vector."

Parameters

  | jd_ut1 | [day] UT1 based Julian date
  | ut1_to_tt | [s] TT - UT1 Time difference in seconds
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | xp | [arcsec] Conventionally-defined x coordinate of celestial intermediate pole with respect to ITRS reference pole, e.g. from IERS Bulletin A. If you have defined pole offsets to be incorporated into the TOD input coordinates (pre-IAU2000 method) via cel_pole(), then you should set this to 0.
  | yp | [arcsec] Conventionally-defined y coordinate of celestial intermediate pole with respect to ITRS reference pole, e.g. from IERS Bulletin A. If you have defined pole offsets to be incorporated into the TOD input coordinates (pre-IAU2000 method) via cel_pole(), then you should set this to 0.
  | location | Geodetic (ITRF / GRS80) observer location on Earth
  | ra | [h] Topocentric apparent (TOD) right ascension of object of interest, referred to true equator and equinox of date.
  | dec | [deg] Topocentric apparent (TOD) declination of object of interest, referred to true equator and equinox of date.
  | ref_option | Refraction model to use. E.g., NOVAS_STANDARD_ATMOSPHERE (1), or NOVAS_WEATHER_AT_LOCATION (2) if to use the weather.
  [out] | zd | [deg] Topocentric zenith distance in degrees (unrefracted).
  [out] | az | [deg] Topocentric azimuth (measured east from north) in degrees.
  [out] | rar | [h] Topocentric right ascension of object of interest, in hours, referred to true equator and equinox of date, affected by refraction if 'ref_option' is non-zero. (It may be NULL if not required)
  [out] | decr | [deg] Topocentric declination of object of interest, in degrees, referred to true equator and equinox of date. (It may be NULL if not required)

Returns
  0 if successful, or -1 if one of the 'zd' or 'az' output pointers are NULL.

See also
  itrs_to_hor(), tod_to_itrs(), NOVAS_TOD

References refract_astro(), and ter2cel().

## gal2equ()

int gal2equ | ( | double | glon,
|  | double | glat,
|  | double *restrict | ra,
|  | double *restrict | dec )

Converts galactic longitude and latitude to ICRS right ascension and declination.

REFERENCES:

1. J.-C. Liu, Z. Zhu, and H. Zhang, A&A, 526, A16 (2011), Eq. 18
2. Hipparcos and Tycho Catalogues, Vol. 1, Section 1.5.3.

Parameters

  | glon | [deg] Galactic longitude in degrees.
  | glat | [deg] Galactic latitude in degrees.
  [out] | ra | [h] ICRS right ascension in hours.
  [out] | dec | [deg] ICRS declination in degrees.

Returns
  0 if successful, or -1 if either of the output pointer arguments are NULL.

Since
  1.0

Author
  Attila Kovacs

See also
  equ2gal()

Referenced by supernovas::Galactic::to_equatorial().

## hor_to_itrs()

int hor_to_itrs | ( | const on_surface *restrict | location,
|  | double | az,
|  | double | za,
|  | double *restrict | itrs )

Converts astrometric (unrefracted) azimuth and zenith angles at the specified observer location to a unit position vector in the Earth-fixed ITRS frame.

Parameters

  | location | Geodetic (ITRF / GRS80) observer location on Earth
  | az | [deg] astrometric (unrefracted) azimuth angle at observer location [0:360]. It may be NULL if not required.
  | za | [deg] astrometric (unrefracted) zenith angle at observer location [0:180]. It may be NULL if not required.
  [out] | itrs | Unit 3-vector direction in Earth-fixed ITRS frame

Returns
  0 if successful, or else -1 if the location or the input vector is NULL.

Since
  1.0

Author
  Attila Kovacs

See also
  itrs_to_hor(), itrs_to_cirs(), itrs_to_tod(), refract()

Referenced by novas_hor_to_app().

## itrs_to_hor()

int itrs_to_hor | ( | const on_surface *restrict | location,
|  | const double *restrict | itrs,
|  | double *restrict | az,
|  | double *restrict | za )

Converts a position vector in the Earth-fixed ITRS frame to astrometric (unrefracted) azimuth and zenith angles at the specified observer location.

Parameters

  | location | Geodetic (ITRF / GRS80) observer location on Earth.
  | itrs | 3-vector position in Earth-fixed ITRS frame
  [out] | az | [deg] astrometric (unrefracted) azimuth angle at observer location [0:360]. It may be NULL if not required.
  [out] | za | [deg] astrometric (unrefracted) zenith angle at observer location [0:180]. It may be NULL if not required.

Returns
  0 if successful, or else -1 if the location or the input vector is NULL.

Since
  1.0

Author
  Attila Kovacs

See also
  hor_to_itrs(), cirs_to_itrs(), tod_to_itrs(), refract_astro()

Referenced by novas_app_to_hor().

## novas_enu_to_itrs()

int novas_enu_to_itrs | ( | const double * | enu,
|  | double | lon,
|  | double | lat,
|  | double * | itrf )

Converts an East-North-Up (ENU) vector at the specified site to an ITRS vector.

Parameters

  | enu | input East-North-Up (ENU) vector.
  | lon | [deg] ITRS longitude of site.
  | lat | [deg] ITRS latitude of site.
  [out] | itrf | output ITRS vector. It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either pointer argument is NULL (errno will be set to EINVAL).

Since
  1.6

Author
  Attila Kovacs

See also
  novas_itrs_to_enu()

Referenced by supernovas::GeodeticObserver::GeodeticObserver(), supernovas::Site::enu_to_itrs(), and supernovas::Site::enu_to_itrs().

## novas_itrs_to_enu()

int novas_itrs_to_enu | ( | const double * | itrf,
|  | double | lon,
|  | double | lat,
|  | double * | enu )

Converts an ITRS position vector to a local East-North-Up (ENU) vector at the specified site.

Parameters

  | itrf | xyz position vector in ITRS.
  | lon | [deg] ITRS longitude of site.
  | lat | [deg] ITRS latitude of site.
  [out] | enu | output East-North-Up (ENU) vector. It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either pointer argument is NULL (errno will be set to EINVAL).

Since
  1.6

Author
  Attila Kovacs

See also
  novas_enu_to_itrs()

Referenced by supernovas::GeodeticObserver::enu_velocity(), supernovas::Site::itrs_to_enu(), and supernovas::Site::itrs_to_enu().

## novas_los_to_xyz()

int novas_los_to_xyz | ( | const double * | los,
|  | double | lon,
|  | double | lat,
|  | double * | xyz )

Converts a 3D line-of-sight vector (δφ, δθ, δr) to a rectangular equatorial (δx, δy, δz) vector.

Parameters

  | los | [arb.u.] Line-of-sight 3-vector (δφ, δθ, δr).
  | lon | [deg] Line-of-sight longitude.
  | lat | [deg] Line-of-sight latitude.
  [out] | xyz | [arb.u.] Output rectangular equatorial 3-vector (δx, δy, δz), in the same units as the input. It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either vector argument is NULL (errno will be set to EINVAL).

Since
  1.3

Author
  Attila Kovacs

See also
  novas_xyz_to_los(), novas_uvw_to_xyz()

Referenced by novas_uvw_to_xyz(), starvectors(), and transform_cat().

## novas_uvw_to_xyz()

int novas_uvw_to_xyz | ( | const double * | uvw,
|  | double | ha,
|  | double | dec,
|  | double * | xyz )

Converts equatorial u,v,w projected (absolute or relative) coordinates to rectangular telescope x,y,z coordinates (in PEF) to for a specified line of sight.

u,v,w are Cartesian coordinates, with (u,v) along the local East (R.A.) and North (declination) directions as seen from a direction on the sky (w). As such, they are effectively line-of-sight (LOS) coordinates.

x,y,z are Cartesian coordinates w.r.t the Greenwich meridian in the rotating Pseudo Earth Frame (PEF). The directions are x: long=0, lat=0; y: long=90, lat=0; z: lat=90. To convert thse to ITRS, use wobble() after calling this function. Or, for arcsecond-level precision you might use PEF and ITRS positions interchangeably.

Parameters

  | uvw | [arb.u.] Absolute or relative line of sight coordinates (double[3]).
  | ha | [h] Hourangle (LST - RA) i.e., the difference between the Local (apparent) Sidereal Time and the apparent (true-of-date) Right Ascension of observed source.
  | dec | [deg] Apparent (true-of-date) declination of source.
  [out] | xyz | [arb.u.] Converted x,y,z coordinates (double[3]) in the same unit as uvw, in the Pseudo Earth Frame (PEF). It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either vector argument is NULL (errno will be set to EINVAL)

Since
  1.3

Author
  Attila Kovacs

See also
  novas_xyz_to_uvw(), wobble()

References novas_los_to_xyz().

## novas_xyz_to_los()

int novas_xyz_to_los | ( | const double * | xyz,
|  | double | lon,
|  | double | lat,
|  | double * | los )

Converts a 3D rectangular equatorial (δx, δy, δz) vector to a polar (δφ, δθ, δr) vector along a line-of-sight.

Parameters

  | xyz | [arb.u.] Rectangular equatorial 3-vector (δx, δy, δz).
  | lon | [deg] Line-of-sight longitude.
  | lat | [deg] Line-of-sight latitude.
  [out] | los | [arb.u.] Output line-of-sight 3-vector (δφ, δθ, δr), in the same units as the input. It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either vector argument is NULL (errno will be set to EINVAL).

Since
  1.3

Author
  Attila Kovacs

See also
  novas_los_to_xyz(), novas_xyz_to_uvw()

Referenced by novas_uvw(), novas_xyz_to_uvw(), and transform_cat().

## novas_xyz_to_uvw()

int novas_xyz_to_uvw | ( | const double * | xyz,
|  | double | ha,
|  | double | dec,
|  | double * | uvw )

Converts rectangular telescope x,y,z (absolute or relative) coordinates (in PEF) to an equatorial u,v,w projection for a specified line of sight.

x,y,z are Cartesian coordinates w.r.t the Greenwich meridian, in the PEF frame. The directions are x: long=0, lat=0; y: long=90, lat=0; z: lat=90. To calculate PEF from ITRS, use wobble() first, before calling this function. Or, for arcsecond-level precision you might use PEF and ITRS positions interchangeably.

u,v,w are Cartesian coordinates, with (u,v) along the local East (R.A.) and North (declination) directions as seen from a direction on the sky (w). As such, they are effectively ITRS-based line-of-sight (LOS) coordinates.

Alternatively, use novas_site_uvw() instead to convert a geodetic (ITRS) site location more directly to a u, v, w projection.

Parameters

  | xyz | [arb.u.] Absolute or relative x,y,z coordinates (double[3]) in the Pseudo Earth Frame (PEF).
  | ha | [h] Hourangle (LST - RA) i.e., the difference between the Local (apparent) Sidereal Time and the apparent (true-of-date) Right Ascension of observed source, from the input location.
  | dec | [deg] Apparent (true-of-date) declination of source at the input location
  [out] | uvw | [arb.u.] Converted u,v,w coordinates (double[3]), in same units as the input xyz. It may be the same vector as the input.

Returns
  0 if successful, or else -1 if either vector argument is NULL (errno will be set to EINVAL)

Since
  1.3

Author
  Attila Kovacs

See also
  novas_site_uvw(), novas_uvw_to_xyz(), wobble()

References novas_xyz_to_los().