source: trunk/MagicSoft/slalib/galeq.c@ 1435

Last change on this file since 1435 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaGaleq ( double dl, double db, double *dr, double *dd )
4/*
5** - - - - - - - - -
6** s l a G a l e q
7** - - - - - - - - -
8**
9** Transformation from IAU 1958 Galactic coordinates to
10** J2000.0 equatorial coordinates.
11**
12** (double precision)
13**
14** Given:
15** dl,db double galactic longitude and latitude l2,b2
16**
17** Returned:
18** *dr,*dd double J2000.0 RA,dec
19**
20** (all arguments are radians)
21**
22** Called:
23** slaDcs2c, slaDimxv, slaDcc2s, slaDranrm, slaDrange
24**
25** Note:
26** The equatorial coordinates are J2000.0. Use the routine
27** slaGe50 if conversion to B1950.0 'FK4' coordinates is
28** required.
29**
30** Reference:
31** Blaauw et al, Mon.Not.R.astron.Soc.,121,123 (1960)
32**
33** Last revision: 21 September 1998
34**
35** Copyright P.T.Wallace. All rights reserved.
36*/
37{
38 double v1[3], v2[3];
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 (J2000.0), obtained by
50** applying the standard FK4 to FK5 transformation, for zero proper
51** motion in FK5, to the columns of the B1950 equatorial to
52** Galactic rotation matrix:
53*/
54 static double rmat[3][3] =
55 {
56 { -0.054875539726, -0.873437108010, -0.483834985808 },
57 { 0.494109453312, -0.444829589425, 0.746982251810 },
58 { -0.867666135858, -0.198076386122, 0.455983795705 }
59 };
60
61/* Spherical to Cartesian */
62 slaDcs2c ( dl, db, v1 );
63
64/* Galactic to equatorial */
65 slaDimxv ( rmat, v1, v2 );
66
67/* Cartesian to spherical */
68 slaDcc2s ( v2, dr, dd );
69
70/* Express in conventional ranges */
71 *dr = slaDranrm ( *dr );
72 *dd = slaDrange ( *dd );
73}
Note: See TracBrowser for help on using the repository browser.