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

Various functions for calculating the equator and equinox of date, and related quatities. More...

## Functions

double | accum_prec (double t)
| Returns the general precession in longitude (Simon et al.
short | cel_pole (double jd_tt, enum novas_pole_offset_type type, double dpole1, double dpole2)
int | e_tilt (double jd_tdb, enum novas_accuracy accuracy, double *restrict mobl, double *restrict tobl, double *restrict ee, double *restrict dpsi, double *restrict deps)
| (primarily for internal use) Computes quantities related to the orientation of the Earth's rotation axis at the specified Julian date.
int | fund_args (double t, novas_delaunay_args *restrict a)
| Compute the fundamental (a.k.a.
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.
double | mean_obliq (double jd_tdb)
| Computes the mean obliquity of the ecliptic.
int | nutation (double jd_tdb, enum novas_nutation_direction direction, enum novas_accuracy accuracy, const double *in, double *out)
| Nutates equatorial rectangular coordinates from mean equator and equinox of epoch to true equator and equinox of epoch.
short | precession (double jd_tdb_in, const double *in, double jd_tdb_out, double *out)
| Precesses equatorial rectangular coordinates from one epoch to another using the IAU2006 (P03) precession model of Capitaine et al.

## Detailed Description

Various functions for calculating the equator and equinox of date, and related quatities.

Date
  Created on Mar 6, 2025

Author
  G. Kaplan and Attila Kovacs

See also
  cio.c, earth.c, frames.c, nutation.c, transform.c

## Function Documentation

## accum_prec()

double accum_prec | ( | double | t | ) |

Returns the general precession in longitude (Simon et al.

1994), equivalent to 5028.8200 arcsec/cy at J2000.

Parameters

  t | [cy] Julian centuries since J2000

Returns
  [rad] the approximate precession angle [-π:π].

See also
  planet_lon(), nutation_angles(), e_tilt(), NOVAS_JD_J2000

Since
  1.0

Author
  Attila Kovacs

References TWOPI.

Referenced by nu2000k().

## cel_pole()

short cel_pole | ( | double | jd_tt,
|  | enum novas_pole_offset_type | type,
|  | double | dpole1,
|  | double | dpole2 )

Deprecated
  This old way of incorporating Earth orientation parameters into the true equator and equinox is now disfavored. Instead, the pole offsets should be used only to convert between the Terrestrial Intermediate Reference System (TIRS) / Pseudo Earth Fixed (PEF) and the International Terrestrial Reference System (ITRS) going forward, e.g. via novas_app_to_hor() / novas_hor_to_app() or else wobble().

Specifies the unmodeled celestial pole offsets for high-precision applications to be applied to the True of Date (TOD) equator, in the old, pre IAU 2006 methodology. Nonetheless, these offsets should be specified relative to the IAU2006 precession / nutation model to provide a correction to the modeled (precessed and nutated) position of Earth's pole, such those derived from observations and published by IERS.

The call sets the global variables PSI_COR and EPS_COR, for subsequent calls to e_tilt(). As such, it should be called to specify pole offsets prior to legacy NOVAS C equinox-specific calls. The global values of PSI_COR and EPS_COR specified via this function will be effective until explicitly changed again.

NOTES:

1. The pole offsets et this way will affect all future TOD-based calculations, until the pole is changed or reset again. Hence, you should be extremely careful using it (if at all), as it may become an unpredictable source of inaccuracy if implicitly applied without intent to do so.
2. The current UT1 - UTC time difference, and polar offsets, historical data and near-term projections are published in the IERS Bulletins
3. If Δδψ, Δδdε offsets are specified, these must be the residual corrections relative to the IAU 2006 precession/nutation model (not the Lieske et al. 1977 model!). As such, they are just a rotated version of the newer xp, yp offsets published by IERS.
4. The equivalent IAU 2006 standard method, which is preferred, is to apply xp, yp pole offsets only for converting between TIRS and ITRS, e.g. via novas_app_to_hor(), novas_hor_to_app(), or wobble()).
5. There is no need to define pole offsets this way when using the newer frame-based approach introduced in SuperNOVAS. If the pole offsets are specified on a per-frame basis during the initialization of each observing frame (see novas_make_frame(), the offsets will be applied for the TIRS / ITRS conversion only, and not to the TOD equator per se.

REFERENCES:

1. Kaplan, G. (2005), US Naval Observatory Circular 179.
2. Kaplan, G. (2003), USNO/AA Technical Note 2003-03.

Parameters

  jd_tt | [day] Terrestrial Time (TT) based Julian date. Used only if 'type' is POLE_OFFSETS_X_Y (2), to transform dx and dy to the equivalent Δδψ and Δδε values.
  type | POLE_OFFSETS_DPSI_DEPS (1) if the offsets are Δδψ, Δδε relative to the IAU 2006 precession/nutation model; or POLE_OFFSETS_X_Y (2) if they are dx, dy offsets relative to the IAU 2000 / 2006 precession-nutation model.
  dpole1 | [mas] Value of celestial pole offset in first coordinate, (Δδψ for or dx) in milliarcseconds, relative to the IAU2006 precession/nutation model.
  dpole2 | [mas] Value of celestial pole offset in second coordinate, (Δδε or dy) in milliarcseconds, relative to the IAU2006 precession/nutation model.

Returns
  0 if successful, or else 1 if 'type' is invalid.

See also
  novas_make_frame(), wobble()

## e_tilt()

int e_tilt | ( | double | jd_tdb,
|  | enum novas_accuracy | accuracy,
|  | double *restrict | mobl,
|  | double *restrict | tobl,
|  | double *restrict | ee,
|  | double *restrict | dpsi,
|  | double *restrict | deps )

(primarily for internal use) Computes quantities related to the orientation of the Earth's rotation axis at the specified Julian date.

In the pre-IAU2000 method, unmodelled corrections to earth orientation can be defined via cel_pole() prior to this call. However, we strongly recommend against that approach, and suggest you apply Earth orientation corrections only in novas_make_frame() or wobble().

NOTES:

1. This function caches the results of the last calculation in case it may be re-used at no extra computational cost for the next call.

Parameters

  | jd_tdb | [day] Barycentric Dynamical Time (TDB) based Julian date.
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  [out] | mobl | [deg] Mean obliquity of the ecliptic. It may be NULL if not required.
  [out] | tobl | [deg] True obliquity of the ecliptic. It may be NULL if not required.
  [out] | ee | [s] Equation of the equinoxes in seconds of time. It may be NULL if not required.
  [out] | dpsi | [arcsec] Nutation in longitude. It may be NULL if not required.
  [out] | deps | [arcsec] Nutation in obliquity. It may be NULL if not required.

Returns
  0 if successful, or -1 if the accuracy argument is invalid

See also
  novas_gast(), nutation(), ira_equinox(), equ2ecl(), ecl2equ()

References mean_obliq(), NOVAS_FULL_ACCURACY, NOVAS_REDUCED_ACCURACY, and nutation_angles().

Referenced by ecl2equ_vec(), equ2ecl_vec(), ira_equinox(), novas_gast(), and nutation().

## fund_args()

int fund_args | ( | double | t,
|  | novas_delaunay_args *restrict | a )

Compute the fundamental (a.k.a.

Delaunay) arguments (mean elements) of the Sun and Moon.

REFERENCES:

1. IERS Conventions 2010, Chapter 5, Eq. 5.43.
2. Simon et al. (1994) Astronomy and Astrophysics 282, 663-683, esp. Sections 3.4-3.5.

Parameters

  | t | [cy] TDB time in Julian centuries since J2000.0
  [out] | a | [rad] Fundamental arguments data to populate (5 doubles) [0:2π]

Returns
  0 if successful, or -1 if the output pointer argument is NULL.

See also
  nutation_angles(), e_tilt(), NOVAS_JD_J2000

References novas_norm_ang().

Referenced by novas_diurnal_eop_at_time(), and nu2000k().

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

Referenced by cio_location(), cio_ra(), cirs_to_tod(), novas_hor_track(), supernovas::Equatorial::to_ecliptic(), and tod_to_cirs().

## mean_obliq()

double mean_obliq | ( | double | jd_tdb | ) |

Computes the mean obliquity of the ecliptic.

REFERENCES:

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

Parameters

  jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date

Returns
  [arcsec] Mean obliquity of the ecliptic in arcseconds.

See also
  e_tilt(), equ2ecl(), ecl2equ(), tt2tdb(), novas_get_time()

Referenced by e_tilt(), ecl2equ_vec(), equ2ecl_vec(), and novas_make_frame().

## nutation()

int nutation | ( | double | jd_tdb,
|  | enum novas_nutation_direction | direction,
|  | enum novas_accuracy | accuracy,
|  | const double * | in,
|  | double * | out )

Nutates equatorial rectangular coordinates from mean equator and equinox of epoch to true equator and equinox of epoch.

Inverse transformation may be applied by setting flag 'direction'.

This is the old (pre IAU 2006) method of nutation calculation. If you follow the now standard IAU 2000 / 2006 methodology you will want to use nutation_angles() instead.

REFERENCES:

1. Explanatory Supplement To The Astronomical Almanac, pp. 114-115.

Parameters

  | jd_tdb | [day] Barycentric Dynamic Time (TDB) based Julian date
  | direction | NUTATE_MEAN_TO_TRUE (0) or NUTATE_TRUE_TO_MEAN (-1; or non-zero)
  | accuracy | NOVAS_FULL_ACCURACY (0) or NOVAS_REDUCED_ACCURACY (1)
  | in | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean equator and equinox of epoch.
  [out] | out | Position vector, geocentric equatorial rectangular coordinates, referred to true equator and equinox of epoch. It can be the same as the input position.

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

See also
  nutation_angles()
  tt2tdb(), novas_get_time(), NOVAS_MOD, NOVAS_TOD

References e_tilt(), and NUTATE_MEAN_TO_TRUE.

Referenced by j2000_to_tod(), and tod_to_j2000().

## precession()

short precession | ( | double | jd_tdb_in,
|  | const double * | in,
|  | double | jd_tdb_out,
|  | double * | out )

Precesses equatorial rectangular coordinates from one epoch to another using the IAU2006 (P03) precession model of Capitaine et al.

2003.

NOTES:

1. Unlike the original NOVAS C 3.1 version, this one does not require that one of the time arguments must be J2000. You can precess from any date to any other date, and the intermediate epoch of J2000 will be handled internally as needed.
2. This function caches the results of the last calculation in case it may be re-used at no extra computational cost for the next call.

REFERENCES:

1. Explanatory Supplement To The Astronomical Almanac, pp. 103-104.
2. Capitaine, N. et al. (2003), Astronomy And Astrophysics 412, pp. 567-586.
3. Hilton, J. L. et al. (2006), IAU WG report, Celest. Mech., 94, pp. 351-367.
4. Capitaine, N., P.T. Wallace and J. Chapront (2005), “Improvement of the IAU 2000 precession model.” Astronomy & Astrophysics, Vol. 432, pp. 355–67. 5.Liu, J.-C., & Capitaine, N. (2017), A&A 597, A83.

Parameters

  | jd_tdb_in | [day] Barycentric Dynamic Time (TDB) based Julian date of the input epoch
  | in | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean dynamical equator and equinox of the initial epoch.
  | jd_tdb_out | [day] Barycentric Dynamic Time (TDB) based Julian date of the output epoch
  [out] | out | Position 3-vector, geocentric equatorial rectangular coordinates, referred to mean dynamical equator and equinox of the final epoch. It can be the same vector as the input.

Returns
  0 if successful, or -1 if either of the position vectors is NULL.

See also
  nutation()
  tt2tdb(), novas_get_time(), frame_tie(), novas_epoch(), NOVAS_MOD, NOVAS_JD_J2000, NOVAS_JD_B1950, NOVAS_JD_B1900

References precession().

Referenced by earth_sun_calc(), gcrs_to_mod(), j2000_to_tod(), mean_star(), mod_to_gcrs(), novas_lsr_to_ssb_vel(), novas_ssb_to_lsr_vel(), precession(), tod_to_j2000(), and transform_cat().