source: trunk/MagicSoft/slalib/eqecl.c

Last change on this file was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaEqecl ( double dr, double dd, double date,
4 double *dl, double *db )
5/*
6** - - - - - - - - -
7** s l a E q e c l
8** - - - - - - - - -
9**
10** Transformation from J2000.0 equatorial coordinates to
11** ecliptic coordinates.
12**
13** (double precision)
14**
15** Given:
16** dr,dd double J2000.0 mean RA,Dec (radians)
17** date double TDB (loosely ET) as Modified Julian Date
18** (JD-2400000.5)
19** Returned:
20** *dl,*db double ecliptic longitude and latitude
21** (mean of date, IAU 1980 theory, radians)
22**
23**
24** Called:
25** slaDcs2c, slaPrec, slaEpj, slaDmxv, slaEcmat, slaDcc2s,
26** slaDranrm, slaDrange
27**
28**
29** Last revision: 31 October 1993
30**
31** Copyright P.T.Wallace. All rights reserved.
32*/
33{
34 double rmat[3][3], v1[3], v2[3];
35
36/* Spherical to Cartesian */
37 slaDcs2c ( dr, dd, v1 );
38
39/* Mean J2000 to mean of date */
40 slaPrec ( 2000.0, slaEpj ( date ), rmat );
41 slaDmxv ( rmat, v1, v2 );
42
43/* Equatorial to ecliptic */
44 slaEcmat ( date, rmat );
45 slaDmxv ( rmat, v2, v1 );
46
47/* Cartesian to spherical */
48 slaDcc2s ( v1, dl, db );
49
50/* Express in conventional ranges */
51 *dl = slaDranrm ( *dl );
52 *db = slaDrange ( *db );
53}
Note: See TracBrowser for help on using the repository browser.