source: trunk/MagicSoft/slalib/ecleq.c@ 11550

Last change on this file since 11550 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 slaEcleq ( double dl, double db, double date,
4 double *dr, double *dd)
5/*
6** - - - - - - - - -
7** s l a E c l e q
8** - - - - - - - - -
9**
10** Transformation from ecliptic coordinates to J2000.0
11** equatorial coordinates.
12**
13** (double precision)
14**
15** Given:
16** dl,db double ecliptic longitude and latitude
17** (mean of date, IAU 1980 theory, radians)
18** date double TDB (loosely ET) as Modified Julian Date
19** (JD-2400000.5)
20** Returned:
21** *dr,*dd double J2000.0 mean RA,Dec (radians)
22**
23** Called:
24** slaDcs2c, slaEcmat, slaDimxv, slaPrec, slaEpj, slaDcc2s,
25** slaDranrm, slaDrange
26**
27** Last revision: 31 October 1993
28**
29** Copyright P.T.Wallace. All rights reserved.
30*/
31{
32 double rmat[3][3], v1[3], v2[3];
33
34/* Spherical to Cartesian */
35 slaDcs2c ( dl, db, v1 );
36
37/* Ecliptic to equatorial */
38 slaEcmat ( date, rmat );
39 slaDimxv ( rmat, v1, v2 );
40
41/* Mean of date to J2000 */
42 slaPrec ( 2000.0, slaEpj ( date ), rmat );
43 slaDimxv ( rmat, v2, v1 );
44
45/* Cartesian to spherical */
46 slaDcc2s ( v1, dr, dd );
47
48/* Express in conventional ranges */
49 *dr = slaDranrm ( *dr );
50 *dd = slaDrange ( *dd );
51}
Note: See TracBrowser for help on using the repository browser.