Loading...
Searching...
No Matches
Transforming between equatorial systems

## Enumerations

enum | novas_dynamical_type { NOVAS_DYNAMICAL_MOD = 0 , NOVAS_DYNAMICAL_TOD , NOVAS_DYNAMICAL_CIRS }
| Constants that determine the type of dynamical system. More...
enum | novas_frametie_direction { J2000_TO_ICRS = -1 , ICRS_TO_J2000 }
| Direction constant to use for frame_tie(), to determine the direction of transformation between J2000 and ICRS coordinates. More...
enum | novas_reference_system { NOVAS_GCRS = 0 , NOVAS_TOD , NOVAS_CIRS , NOVAS_ICRS , NOVAS_J2000 , NOVAS_MOD , NOVAS_TIRS , NOVAS_ITRS }
| The basic types of positional coordinate reference systems supported by NOVAS. More...

## Functions

double | app_to_cirs_ra (double jd_tt, enum novas_accuracy accuracy, double ra)
| Converts an apparent right ascension coordinate (measured from the true equinox of date) to a CIRS R.A., measured from the CIO.
short | cio_ra (double jd_tt, enum novas_accuracy accuracy, double *restrict ra_cio)
| Computes the true right ascension of the celestial intermediate origin (CIO) vs the equinox of date on the true equator of date for a given TT Julian date.
double | cirs_to_app_ra (double jd_tt, enum novas_accuracy accuracy, double ra)
| Converts a CIRS right ascension coordinate (measured from the CIO) to an apparent R.A.
int | cirs_to_gcrs (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) frame at the given epoch to the ICRS / GCRS.
int | cirs_to_itrs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out)
| Rotates a position vector from the dynamical CIRS frame of date to the Earth-fixed ITRS frame (IAU 2000 standard method).
int | cirs_to_tod (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) at the given epoch to the True of Date (TOD) reference system.
int | frame_tie (const double *in, enum novas_frametie_direction direction, double *out)
| Transforms a vector from the dynamical reference system to the International Celestial Reference System (ICRS), or vice versa.
short | gcrs2equ (double jd_tt, enum novas_dynamical_type sys, enum novas_accuracy accuracy, double rag, double decg, double *restrict ra, double *restrict dec)
| Converts GCRS right ascension and declination to coordinates with respect to the equator of date (mean or true).
int | gcrs_to_cirs (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the Celestial Intermediate Reference System (CIRS) frame at the given epoch.
int | gcrs_to_j2000 (const double *in, double *out)
| Changes ICRS / GCRS coordinates to J2000 coordinates.
int | gcrs_to_mod (double jd_tdb, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the Mean of Date (MOD) reference frame at the given epoch.
int | gcrs_to_tod (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the True of Date (TOD) reference frame at the given epoch.
double | ira_equinox (double jd_tdb, enum novas_equinox_type equinox, enum novas_accuracy accuracy)
| Compute the intermediate right ascension of the equinox at the input Julian date, using an analytical expression for the accumulated precession in right ascension.
int | itrs_to_cirs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out)
| Rotates a position vector from the Earth-fixed ITRS frame to the dynamical CIRS frame of date (IAU 2000 standard method).
int | itrs_to_tod (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out)
| Rotates a position vector from the Earth-fixed ITRS frame to the dynamical True of Date (TOD) frame of date (pre IAU 2000 method).
int | j2000_to_gcrs (const double *in, double *out)
| Change J2000 coordinates to ICRS / GCRS coordinates.
int | j2000_to_tod (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from J2000 coordinates to the True of Date (TOD) reference frame at the given epoch.
int | mod_to_gcrs (double jd_tdb, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from Mean of Date (MOD) reference frame at the given epoch to the ICRS / GCRS.
int | tod_to_cirs (double jd_tt, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from the True of Date (TOD) reference system to the Celestial Intermediate Reference System (CIRS) at the given epoch to the .
int | tod_to_gcrs (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from True of Date (TOD) reference frame at the given epoch to the ICRS / GCRS.
int | tod_to_itrs (double jd_tt_high, double jd_tt_low, double ut1_to_tt, enum novas_accuracy accuracy, double xp, double yp, const double *in, double *out)
| Rotates a position vector from the dynamical True of Date (TOD) frame of date the Earth-fixed ITRS frame (pre IAU 2000 method).
int | tod_to_j2000 (double jd_tdb, enum novas_accuracy accuracy, const double *in, double *out)
| Transforms a rectangular equatorial (x, y, z) vector from True of Date (TOD) reference frame at the given epoch to the J2000 coordinates.

## Detailed Description

## Enumeration Type Documentation

## novas_dynamical_type

enum novas_dynamical_type

Constants that determine the type of dynamical system.

I.e., the 'current' equatorial coordinate system used for a given epoch of observation.

See also
  gcrs2equ()

Enumerator
NOVAS_DYNAMICAL_MOD | Mean Of Date (TOD): dynamical system that include precession but not including nutation, such as commonly used for older catalogs like FK4, KF5, B1950, or HIP.
NOVAS_DYNAMICAL_TOD | True Of Date (TOD): dynamical system of the 'true' equator of date, with its origin at the true equinox of date. In the IAU 2000 methodology, it includes precession and nutation, but not the sub-arcsecond level Earth Orientation Parameters (EOP). The latter are used only when converting to the Earth-fixed TIRS system.
NOVAS_DYNAMICAL_CIRS | Celestial Intermediate Reference System (CIRS): dynamical system of the true equator, with its origin at the CIO (preferred since IAU 2006).

## novas_frametie_direction

enum novas_frametie_direction

Direction constant to use for frame_tie(), to determine the direction of transformation between J2000 and ICRS coordinates.

See also
  frame_tie(), gsrs_to_j2000(), j2000_to_gcrs(), J2000_TO_ICRS

Enumerator

J2000_TO_ICRS

Change coordinates from ICRS to the J2000 (dynamical) frame.

(You can also use any negative value for the same effect).

See also
  j2000_to_gcrs()

ICRS_TO_J2000

Change coordinates from J2000 (dynamical) frame to the ICRS.

(You can use any value >=0 for the same effect).

See also
  gcrs_to_j2000()

## novas_reference_system

enum novas_reference_system

The basic types of positional coordinate reference systems supported by NOVAS.

These determine only how the celestial pole is to be located, but not how velocities are to be referenced. specific pos-vel coordinates are referenced to an 'astro_frame', which must specify one of the values defined here.

See also
  novas_frame, NOVAS_REFERENCE_SYSTEMS
  novas_sky_pos(), novas_geom_posvel(), novas_geom_to_app(), novas_app_to_geom(), novas_app_to_hor(), novas_hor_to_app(), novas_make_transform()

Enumerator
NOVAS_GCRS | Geocentric Celestial Reference system. Essentially the same as ICRS but includes aberration and gravitational deflection for an observer around Earth.
NOVAS_TOD | True equinox Of Date: dynamical system of the 'true' equator, with its origin at the 'true' equinox (pre IAU 2006 system).
NOVAS_CIRS | Celestial Intermediate Reference System: dynamical system of the true equator, with its origin at the CIO (preferred since IAU 2006).
NOVAS_ICRS | International Celestial Reference system. The equatorial system fixed to the frame of distant quasars.

NOVAS_J2000

The J2000 dynamical reference system.

Since
  1.1

NOVAS_MOD

Mean of date: dynamical system of the 'mean' equator, with its origin at the 'mean' equinox (pre IAU 2006 system).

It includes precession (Lieske et. al. 1977), but not nutation. For example, FK4 or B1950 are MOD coordinate systems.

Since
  1.1

NOVAS_TIRS

Terrestrial Intermediate Reference System.

It is the IAU 2006 standard pseudo Earth-fixed (PEF) coordinate system, which co-rotates with Earth, but does not include Earth polar wobble corrections.

Since
  1.4

NOVAS_ITRS

International Terrestrial Reference System.

This is the IAU 2006 Earth-fixed reference system, and includes small measured corrections for the unmodelled polar motion, as published by the IERS Bulletins.

Since
  1.4

## Function Documentation

## app_to_cirs_ra()

double app_to_cirs_ra | ( | double | jd_tt,
|  | enum novas_accuracy | accuracy,
|  | double | ra )

Converts an apparent right ascension coordinate (measured from the true equinox of date) to a CIRS R.A., measured from the CIO.

Parameters

  jd_tt | [day] Terrestrial Time (TT) based Julian date
  accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  ra | [h] the apparent R.A. coordinate measured from the true equinox of date.

Returns
  [h] The CIRS right ascension coordinate, measured from the CIO [0:24], or NAN if the accuracy is invalid, or if there wan an error from cio_ra().

Since
  1.0.1

Author
  Attila Kovacs

See also
  cirs_to_app_ra(), tod_to_cirs()

References cio_ra().

## cio_ra()

short cio_ra | ( | double | jd_tt,
|  | enum novas_accuracy | accuracy,
|  | double *restrict | ra_cio )

Computes the true right ascension of the celestial intermediate origin (CIO) vs the equinox of date on the true equator of date for a given TT Julian date.

This is simply the negated return value ofira_equinox() for the true equator of date.

REFERENCES:

1. Kaplan, G. (2005), US Naval Observatory Circular 179.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  [out] | ra_cio | [h] Right ascension of the CIO, with respect to the true equinox of date (+ or -), or NAN when returning with an error code.

Returns
  0 if successful, -1 if the output pointer argument is NULL, 1 if 'accuracy' is invalid, 10–20: 10 + error code from cio_location(), or else 20 + error from cio_basis()

See also
  ira_equinox()

References ira_equinox(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUINOX.

## cirs_to_app_ra()

double cirs_to_app_ra | ( | double | jd_tt,
|  | enum novas_accuracy | accuracy,
|  | double | ra )

Converts a CIRS right ascension coordinate (measured from the CIO) to an apparent R.A.

measured from the true equinox of date.

Parameters

  jd_tt | [day] Terrestrial Time (TT) based Julian date
  accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  ra | [h] The CIRS right ascension coordinate, measured from the CIO.

Returns
  [h] the apparent R.A. coordinate measured from the true equinox of date [0:24], or NAN if the accuracy is invalid, or if there wan an error from cio_ra().

Since
  1.0.1

Author
  Attila Kovacs

See also
  app_to_cirs_ra(), cirs_to_tod()

References cio_ra().

## cirs_to_gcrs()

int cirs_to_gcrs | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) frame at the given epoch to the ICRS / GCRS.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

This function uses Method 2 of the IERS Conventions 2010 (Chapter 5, Section 5.9), converting CIRS to TOD first via a rotation by the equation of origins, then using the IAU 2006 precession-nutation model (P03; Capitaine et al. 2003) to convert to J2000, and finally correcting for the frame bias to arrive at GCRS.

REFERENCES:

1. IERS Conventions 2010, Chapter 5, especially Section 5.9
2. Capitaine, N. et al. (2003), Astronomy And Astrophysics 412, pp. 567-586.

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | CIRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the ICRS / GCRS coordinate frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the accuracy is invalid, or else 10 + the error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  tod_to_gcrs(), gcrs_to_cirs(), cirs_to_itrs(), cirs_to_tod()

References cirs_to_tod(), and tod_to_gcrs().

## cirs_to_itrs()

int cirs_to_itrs | ( | double | jd_tt_high,
|  | double | jd_tt_low,
|  | double | ut1_to_tt,
|  | enum novas_accuracy | accuracy,
|  | double | xp,
|  | double | yp,
|  | const double * | in,
|  | double * | out )

Rotates a position vector from the dynamical CIRS frame of date to the Earth-fixed ITRS frame (IAU 2000 standard method).

If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.

If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.

REFERENCES:

1. Kaplan, G. H. et. al. (1989). Astron. Journ. 97, 1197-1210.
2. Kaplan, G. H. (2003), 'Another Look at Non-Rotating Origins', Proceedings of IAU XXV Joint Discussion 16.

Parameters

  | jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date.
  | jd_tt_low | [day] Low-order part of Terrestrial Time (TT) 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 pole, in arcseconds.
  | yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds.
  | in | Position vector, geocentric equatorial rectangular coordinates, referred to CIRS axes (celestial system).
  [out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system).

Returns
  0 if successful, -1 if either of the vector arguments is NULL, 1 if 'accuracy' is invalid, 2 if 'method' is invalid 10–20, 3 if the method and option are mutually incompatible, or else 10 + the error from cio_location(), or 20 + error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  tod_to_itrs(), itrs_to_cirs(), gcrs_to_cirs(), cirs_to_gcrs(), cirs_to_tod()

References cel2ter(), EROT_ERA, and NOVAS_DYNAMICAL_CLASS.

## cirs_to_tod()

int cirs_to_tod | ( | double | jd_tt,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the Celestial Intermediate Reference System (CIRS) at the given epoch to the True of Date (TOD) reference system.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | CIRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the True of Date (TOD) frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the accuracy is invalid, or else 20 + the error from cio_basis().

Since
  1.1

Author
  Attila Kovacs

See also
  tod_to_cirs(), cirs_to_app_ra(), cirs_to_gcrs(), cirs_to_itrs()

References ira_equinox(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUINOX, and spin().

## frame_tie()

int frame_tie | ( | const double * | in,
|  | enum novas_frametie_direction | direction,
|  | double * | out )

Transforms a vector from the dynamical reference system to the International Celestial Reference System (ICRS), or vice versa.

The dynamical reference system is based on the dynamical mean equator and equinox of J2000.0. The ICRS is based on the space-fixed ICRS axes defined by the radio catalog positions of several hundred extragalactic objects.

For geocentric coordinates, the same transformation is used between the dynamical reference system and the GCRS.

NOTES:

1. More efficient 3D rotation implementation for small angles by A. Kovacs

REFERENCES:

1. Hilton, J. and Hohenkerk, C. (2004), Astronomy and Astrophysics 413, 765-770, eq. (6) and (8).
2. IERS (2003) Conventions, Chapter 5.

Parameters

  | in | Position vector, equatorial rectangular coordinates.
  | direction | <0 for for dynamical to ICRS transformation, or else >=0 for ICRS to dynamical transformation. Alternatively you may use the constants J2000_TO_ICRS (-1; or negative) or ICRS_TO_J2000 (0; or positive).
  [out] | out | Position vector, equatorial rectangular coordinates. It can be the same vector as the input.

Returns
  0 if successfor or -1 if either of the vector arguments is NULL.

See also
  j2000_to_gcrs(), gcrs_to_j2000()

## gcrs2equ()

short gcrs2equ | ( | double | jd_tt,
|  | enum novas_dynamical_type | sys,
|  | enum novas_accuracy | accuracy,
|  | double | rag,
|  | double | decg,
|  | double *restrict | ra,
|  | double *restrict | dec )

Converts GCRS right ascension and declination to coordinates with respect to the equator of date (mean or true).

For coordinates with respect to the true equator of date, the origin of right ascension can be either the true equinox or the celestial intermediate origin (CIO). This function only supports the CIO-based method.

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date. (Unused if 'coord_sys' is NOVAS_ICRS_EQUATOR)
  | sys | Dynamical equatorial system type
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1) (unused if 'coord_sys' is not NOVAS_ICRS [3])
  | rag | [h] GCRS right ascension in hours.
  | decg | [deg] GCRS declination in degrees.
  [out] | ra | [h] Right ascension in hours, referred to specified equator and right ascension origin of date.
  [out] | dec | [deg] Declination in degrees, referred to specified equator of date.

Returns
  0 if successful, or -1 with errno set to EINVAL if the output pointers are NULL, or sys and/or accuracy is invalid; otherwise <0 if an error from vector2radec(); 10–20 error is 10 + error cio_location(); or else 20 + error from cio_basis()

See also
  gcrs_to_tod(), gcrs_to_mod(), gcrs_to_cirs(), novas_transform_sky_pos()

References gcrs_to_cirs(), gcrs_to_mod(), gcrs_to_tod(), NOVAS_DYNAMICAL_CIRS, NOVAS_DYNAMICAL_MOD, NOVAS_DYNAMICAL_TOD, radec2vector(), and vector2radec().

## gcrs_to_cirs()

int gcrs_to_cirs | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the Celestial Intermediate Reference System (CIRS) frame at the given epoch.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

This function uses Method 2 of the IERS Conventions 2010 (Chapter 5, Section 5.9), first applying the frame bias to convert GCRS to J2000, then using the IAU 2006 precession-nutation model (P03; Capitaine et al. 2003) to convert to TOD, and finally to CIRS via a rotation by the equation of origins.

REFERENCES:

1. IERS Conventions 2010, Chapter 5, especially Section 5.9
2. Capitaine, N. et al. (2003), Astronomy And Astrophysics 412, pp. 567-586.

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | ICRS / GCRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the True equinox of Date coordinate frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the accuracy is invalid, or else 10 + the error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  gcrs_to_j2000(), cirs_to_gcrs()

References gcrs_to_tod(), and tod_to_cirs().

## gcrs_to_j2000()

int gcrs_to_j2000 | ( | const double * | in,
|  | double * | out )

Changes ICRS / GCRS coordinates to J2000 coordinates.

Same as frame_tie() called with ICRS_TO_J2000. (We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | in | ICRS / GCRS input 3-vector
  [out] | out | J2000 output 3-vector

Returns
  0 if successful, or else an error from frame_tie()

Since
  1.0

Author
  Attila Kovacs

See also
  j2000_to_gcrs(), tod_to_j2000()

References frame_tie(), and ICRS_TO_J2000.

## gcrs_to_mod()

int gcrs_to_mod | ( | double | jd_tdb,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the Mean of Date (MOD) reference frame at the given epoch.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | in | ICRS / GCRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the Mean wquinox of Date coordinate frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL.

Since
  1.2

Author
  Attila Kovacs

See also
  mod_to_gcrs(), gcrs_to_tod()

References frame_tie(), ICRS_TO_J2000, NOVAS_JD_J2000, and precession().

## gcrs_to_tod()

int gcrs_to_tod | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the ICRS / GCRS to the True of Date (TOD) reference frame at the given epoch.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | ICRS / GCRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the True equinox of Date coordinate frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL, or if the accuracy argument is invalid.

Since
  1.2

Author
  Attila Kovacs

See also
  gcrs_to_cirs(), tod_to_gcrs(), j2000_to_tod()

References frame_tie(), ICRS_TO_J2000, and j2000_to_tod().

## ira_equinox()

double ira_equinox | ( | double | jd_tdb,
|  | enum novas_equinox_type | equinox,
|  | enum novas_accuracy | accuracy )

Compute the intermediate right ascension of the equinox at the input Julian date, using an analytical expression for the accumulated precession in right ascension.

For the true equinox, the result is the equation of the origins.

NOTES:

1. Fixes bug in NOVAS C 3.1, which returned the value for the wrong 'equinox' if 'equinox = 1' was requested for the same 'jd_tbd' and 'accuracy' as a the preceding call with 'equinox = 0'. As a result, the caller ended up with the mean instead of the expected true equinox R.A. value.

REFERENCES:

1. Capitaine, N. et al. (2003), Astronomy and Astrophysics 412, 567-586, eq. (42).

Parameters

  jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date
  equinox | NOVAS_MEAN_EQUINOX (0) or NOVAS_TRUE_EQUINOX (1, or non-zero)
  accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1, or non-zero)

Returns
  [h] Intermediate right ascension of the equinox, in hours (+ or -). If 'equinox' = 1 (i.e true equinox), then the returned value is the equation of the origins.

See also
  cio_ra()
  gcrs_to_cirs(), cirs_to_gcrs()

References e_tilt(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and NOVAS_TRUE_EQUINOX.

## itrs_to_cirs()

int itrs_to_cirs | ( | double | jd_tt_high,
|  | double | jd_tt_low,
|  | double | ut1_to_tt,
|  | enum novas_accuracy | accuracy,
|  | double | xp,
|  | double | yp,
|  | const double * | in,
|  | double * | out )

Rotates a position vector from the Earth-fixed ITRS frame to the dynamical CIRS frame of date (IAU 2000 standard method).

If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.

If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.

REFERENCES:

1. Kaplan, G. H. et. al. (1989). Astron. Journ. 97, 1197-1210.
2. Kaplan, G. H. (2003), 'Another Look at Non-Rotating Origins', Proceedings of IAU XXV Joint Discussion 16.

Parameters

  | jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date.
  | jd_tt_low | [day] Low-order part of Terrestrial Time (TT) 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 pole, in arcseconds.
  | yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds.
  | in | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system)
  [out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to CIRS axes (celestial system).

Returns
  0 if successful, -1 if either of the vector arguments is NULL, 1 if 'accuracy' is invalid, or else 10 + the error from cio_location(), or 20 + error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  itrs_to_tod(), cirs_to_itrs(), cirs_to_gcrs()

References EROT_ERA, NOVAS_DYNAMICAL_CLASS, and ter2cel().

## itrs_to_tod()

int itrs_to_tod | ( | double | jd_tt_high,
|  | double | jd_tt_low,
|  | double | ut1_to_tt,
|  | enum novas_accuracy | accuracy,
|  | double | xp,
|  | double | yp,
|  | const double * | in,
|  | double * | out )

Rotates a position vector from the Earth-fixed ITRS frame to the dynamical True of Date (TOD) frame of date (pre IAU 2000 method).

If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.

If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.

REFERENCES:

1. Kaplan, G. H. et. al. (1989). Astron. Journ. 97, 1197-1210.
2. Kaplan, G. H. (2003), 'Another Look at Non-Rotating Origins', Proceedings of IAU XXV Joint Discussion 16.

Parameters

  | jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date.
  | jd_tt_low | [day] Low-order part of Terrestrial Time (TT) 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 pole, in arcseconds.
  | yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds.
  | in | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system)
  [out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to True of Date (TOD) axes (celestial system)

Returns
  0 if successful, -1 if either of the vector arguments is NULL, 1 if 'accuracy' is invalid, or else 10 + the error from cio_location(), or 20 + error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  itrs_to_cirs(), tod_to_itrs(), tod_to_j2000()

References EROT_GST, NOVAS_DYNAMICAL_CLASS, and ter2cel().

## j2000_to_gcrs()

int j2000_to_gcrs | ( | const double * | in,
|  | double * | out )

Change J2000 coordinates to ICRS / GCRS coordinates.

Same as frame_tie() called with J2000_TO_ICRS. (We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | in | J2000 input 3-vector
  [out] | out | ICRS / GCRS output 3-vector

Returns
  0 if successful, or else an error from frame_tie()

Since
  1.0

Author
  Attila Kovacs

See also
  j2000_to_tod(), gcrs_to_j2000()

References frame_tie(), and J2000_TO_ICRS.

## j2000_to_tod()

int j2000_to_tod | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from J2000 coordinates to the True of Date (TOD) reference frame at the given epoch.

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Input (x, y, z) position or velocity vector in rectangular equatorial coordinates at J2000
  [out] | out | Output position or velocity 3-vector in the True equinox of Date coordinate frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the accuracy is invalid.

Since
  1.0

Author
  Attila Kovacs

See also
  j2000_to_gcrs(), tod_to_j2000(), gcrs_to_j2000()

References NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NUTATE_MEAN_TO_TRUE, nutation(), and precession().

## mod_to_gcrs()

int mod_to_gcrs | ( | double | jd_tdb,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from Mean of Date (MOD) reference frame at the given epoch to the ICRS / GCRS.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the input epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | in | Input (x, y, z) position or velocity 3-vector in the Mean equinox of Date coordinate frame.
  [out] | out | Output ICRS / GCRS position or velocity vector. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL.

Since
  1.2

Author
  Attila Kovacs

See also
  gcrs_to_mod(), tod_to_gcrs()

References frame_tie(), J2000_TO_ICRS, NOVAS_JD_J2000, and precession().

## tod_to_cirs()

int tod_to_cirs | ( | double | jd_tt,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from the True of Date (TOD) reference system to the Celestial Intermediate Reference System (CIRS) at the given epoch to the .

Parameters

  | jd_tt | [day] Terrestrial Time (TT) based Julian date that defines the output epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | CIRS Input (x, y, z) position or velocity vector
  [out] | out | Output position or velocity 3-vector in the True of Date (TOD) frame. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the accuracy is invalid, or 10 + the error from cio_ra(), or else 20 + the error from cio_basis().

Since
  1.1

Author
  Attila Kovacs

See also
  cirs_to_tod(), app_to_cirs_ra(), tod_to_gcrs(), tod_to_j2000(), tod_to_itrs()

References ira_equinox(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NOVAS_TRUE_EQUINOX, and spin().

## tod_to_gcrs()

int tod_to_gcrs | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from True of Date (TOD) reference frame at the given epoch to the ICRS / GCRS.

(We treat ICRS and GCRS the same, since they only define the orientation of the equator, and not the origin. The origin is defined by the observer location separately.)

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the input epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Input (x, y, z) position or velocity 3-vector in the True equinox of Date coordinate frame.
  [out] | out | Output ICRS / GCRS position or velocity vector. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL.

Since
  1.2

Author
  Attila Kovacs

See also
  j2000_to_tod(), tod_to_cirs(), tod_to_j2000(), tod_to_itrs()

References frame_tie(), J2000_TO_ICRS, and tod_to_j2000().

## tod_to_itrs()

int tod_to_itrs | ( | double | jd_tt_high,
|  | double | jd_tt_low,
|  | double | ut1_to_tt,
|  | enum novas_accuracy | accuracy,
|  | double | xp,
|  | double | yp,
|  | const double * | in,
|  | double * | out )

Rotates a position vector from the dynamical True of Date (TOD) frame of date the Earth-fixed ITRS frame (pre IAU 2000 method).

If both 'xp' and 'yp' are set to 0 no polar motion is included in the transformation.

If extreme (sub-microarcsecond) accuracy is not required, you can use UT1-based Julian date instead of the TT-based Julian date and set the 'ut1_to_tt' argument to 0.0. and you can use UTC-based Julian date the same way.for arcsec-level precision also.

REFERENCES:

1. Kaplan, G. H. et. al. (1989). Astron. Journ. 97, 1197-1210.
2. Kaplan, G. H. (2003), 'Another Look at Non-Rotating Origins', Proceedings of IAU XXV Joint Discussion 16.

Parameters

  | jd_tt_high | [day] High-order part of Terrestrial Time (TT) based Julian date.
  | jd_tt_low | [day] Low-order part of Terrestrial Time (TT) 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 pole, in arcseconds.
  | yp | [arcsec] Conventionally-defined Y coordinate of celestial intermediate pole with respect to ITRS pole, in arcseconds.
  | in | Position vector, geocentric equatorial rectangular coordinates, referred to True of Date (TOD) axes (celestial system).
  [out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to ITRS axes (terrestrial system).

Returns
  0 if successful, -1 if either of the vector arguments is NULL, 1 if 'accuracy' is invalid, 2 if 'method' is invalid 10–20, 3 if the method and option are mutually incompatible, or else 10 + the error from cio_location(), or 20 + error from cio_basis().

Since
  1.0

Author
  Attila Kovacs

See also
  cirs_to_itrs(), itrs_to_tod(), j2000_to_tod(), tod_to_gcrs(), tod_to_j2000(), tod_to_cirs()

References cel2ter(), EROT_GST, and NOVAS_DYNAMICAL_CLASS.

## tod_to_j2000()

int tod_to_j2000 | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Transforms a rectangular equatorial (x, y, z) vector from True of Date (TOD) reference frame at the given epoch to the J2000 coordinates.

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date that defines the input epoch. Typically it does not require much precision, and Julian dates in other time measures will be unlikely to affect the result
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Input (x, y, z) position or velocity 3-vector in the True equinox of Date coordinate frame.
  [out] | out | Output position or velocity vector in rectangular equatorial coordinates at J2000. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the vector arguments is NULL or the 'accuracy' is invalid.

Since
  1.0

Author
  Attila Kovacs

See also
  j2000_to_tod(), j2000_to_gcrs(), tod_to_gcrs(), tod_to_cirs(), tod_to_itrs()

References NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, NUTATE_TRUE_TO_MEAN, nutation(), and precession().