1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | void slaEg50 ( double dr, double dd, double *dl, double *db )
|
---|
4 | /*
|
---|
5 | ** - - - - - - - -
|
---|
6 | ** s l a E g 5 0
|
---|
7 | ** - - - - - - - -
|
---|
8 | **
|
---|
9 | ** Transformation from B1950.0 'FK4' equatorial coordinates to
|
---|
10 | ** IAU 1958 Galactic coordinates.
|
---|
11 | **
|
---|
12 | ** (double precision)
|
---|
13 | **
|
---|
14 | ** Given:
|
---|
15 | ** dr,dd double B1950.0 'FK4' RA,dec
|
---|
16 | **
|
---|
17 | ** Returned:
|
---|
18 | ** *dl,*db double Galactic longitude and latitude l2,b2
|
---|
19 | **
|
---|
20 | ** (all arguments are radians)
|
---|
21 | **
|
---|
22 | ** Called:
|
---|
23 | ** slaDcs2c, slaDmxv, slaDcc2s, slaSubet, slaDranrm, slaDrange
|
---|
24 | **
|
---|
25 | ** Note:
|
---|
26 | ** The equatorial coordinates are B1950.0 'FK4'. Use the
|
---|
27 | ** routine slaEqgal if conversion from J2000.0 coordinates
|
---|
28 | ** is required.
|
---|
29 | **
|
---|
30 | ** Reference:
|
---|
31 | ** Blaauw et al, Mon.Not.R.astron.Soc.,121,123 (1960)
|
---|
32 | **
|
---|
33 | ** Last revision: 16 November 1993
|
---|
34 | **
|
---|
35 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
36 | */
|
---|
37 | {
|
---|
38 | double v1[3], v2[3], r, d;
|
---|
39 |
|
---|
40 | /*
|
---|
41 | ** l2,b2 system of Galactic coordinates
|
---|
42 | **
|
---|
43 | ** p = 192.25 RA of Galactic north pole (mean B1950.0)
|
---|
44 | ** q = 62.6 inclination of Galactic to mean B1950.0 equator
|
---|
45 | ** r = 33 longitude of ascending node
|
---|
46 | **
|
---|
47 | ** p,q,r are degrees
|
---|
48 | **
|
---|
49 | ** Equatorial to Galactic rotation matrix
|
---|
50 | **
|
---|
51 | ** The Euler angles are p, q, 90-r, about the z then y then
|
---|
52 | ** z axes.
|
---|
53 | **
|
---|
54 | ** +cp.cq.sr-sp.cr +sp.cq.sr+cp.cr -sq.sr
|
---|
55 | **
|
---|
56 | ** -cp.cq.cr-sp.sr -sp.cq.cr+cp.sr +sq.cr
|
---|
57 | **
|
---|
58 | ** +cp.sq +sp.sq +cq
|
---|
59 | */
|
---|
60 |
|
---|
61 | static double rmat[3][3];
|
---|
62 |
|
---|
63 | rmat[0][0] = -0.066988739415;
|
---|
64 | rmat[0][1] = -0.872755765852;
|
---|
65 | rmat[0][2] = -0.483538914632;
|
---|
66 | rmat[1][0] = 0.492728466075;
|
---|
67 | rmat[1][1] = -0.450346958020;
|
---|
68 | rmat[1][2] = 0.744584633283;
|
---|
69 | rmat[2][0] = -0.867600811151;
|
---|
70 | rmat[2][1] = -0.188374601723;
|
---|
71 | rmat[2][2] = 0.460199784784;
|
---|
72 |
|
---|
73 |
|
---|
74 | /* Remove e-terms */
|
---|
75 | slaSubet ( dr, dd, 1950.0, &r, &d );
|
---|
76 |
|
---|
77 | /* Spherical to Cartesian */
|
---|
78 | slaDcs2c ( r, d, v1 );
|
---|
79 |
|
---|
80 | /* Rotate to Galactic */
|
---|
81 | slaDmxv ( rmat, v1, v2 );
|
---|
82 |
|
---|
83 | /* Cartesian to spherical */
|
---|
84 | slaDcc2s ( v2, dl, db );
|
---|
85 |
|
---|
86 | /* Express angles in conventional ranges */
|
---|
87 | *dl = slaDranrm ( *dl );
|
---|
88 | *db = slaDrange ( *db );
|
---|
89 | }
|
---|