source: trunk/MagicSoft/slalib/eqeqx.c@ 9421

Last change on this file since 9421 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3double slaEqeqx ( double date )
4/*
5** - - - - - - - - -
6** s l a E q e q x
7** - - - - - - - - -
8**
9** Equation of the equinoxes (IAU 1994, double precision).
10**
11** Given:
12** date double TDB (loosely ET) as Modified Julian Date
13** (JD-2400000.5)
14**
15** The result is the equation of the equinoxes (double precision)
16** in radians:
17**
18** Greenwich apparent ST = Greenwich mean ST + equation of the equinoxes
19**
20** References: IAU Resolution C7, Recommendation 3 (1994)
21** Capitaine, N. & Gontier, A.-M., Astron. Astrophys.,
22** 275, 645-650 (1993)
23**
24** Called: slaNutc
25**
26** Last revision: 21 November 1994
27**
28** Copyright P.T.Wallace. All rights reserved.
29*/
30#define T2AS 1296000.0 /* Turns to arc seconds */
31#define AS2R 0.4848136811095359949E-5 /* Arc seconds to radians */
32{
33 double t, om, dpsi, deps, eps0;
34
35/* Interval between basic epoch J2000.0 and current epoch (JC) */
36 t = ( date - 51544.5 ) / 36525.0;
37
38/* Longitude of the mean ascending node of the lunar orbit on the
39 ecliptic, measured from the mean equinox of date */
40 om = AS2R * ( 450160.280 + ( -5.0 * T2AS - 482890.539
41 + ( 7.455 + 0.008 * t ) * t ) * t );
42
43/* Nutation */
44 slaNutc ( date, &dpsi, &deps, &eps0 );
45
46/* Equation of the equinoxes */
47 return dpsi * cos ( eps0 ) + AS2R * ( 0.00264 * sin ( om ) +
48 0.000063 * sin ( om + om ) );
49}
Note: See TracBrowser for help on using the repository browser.