source: trunk/MagicSoft/slalib/ge50.c@ 19598

Last change on this file since 19598 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaGe50 ( double dl, double db, double *dr, double *dd )
4/*
5** - - - - - - - -
6** s l a G e 5 0
7** - - - - - - - -
8**
9** Transformation from IAU 1958 Galactic coordinates to
10** B1950.0 'FK4' 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 B1950.0 'FK4' RA,Dec
19**
20** (all arguments are radians)
21**
22** Called:
23** slaDcs2c, slaDimxv, slaDcc2s, slaAddet, slaDranrm, slaDrange
24**
25** Note:
26** The equatorial coordinates are B1950.0 'FK4'. Use the
27** routine slaGaleq if conversion to 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: 8 December 1993
34**
35** Copyright P.T.Wallace. All rights reserved.
36*/
37{
38 double v1[3], v2[3], r, d, re, de;
39/*
40** l2,b2 system of Galactic coordinates
41**
42** p = 192.25 RA of Galactic north pole (mean B1950.0)
43** q = 62.6 inclination of Galactic to mean B1950.0 equator
44** r = 33 longitude of ascending node
45**
46** p,q,r are degrees
47**
48** Equatorial to Galactic rotation matrix
49**
50** The Euler angles are p, q, 90-r, about the z then y then
51** z axes.
52**
53** +cp.cq.sr-sp.cr +sp.cq.sr+cp.cr -sq.sr
54**
55** -cp.cq.cr-sp.sr -sp.cq.cr+cp.sr +sq.cr
56**
57** +cp.sq +sp.sq +cq
58*/
59 static double rmat[3][3] =
60 {
61 { -0.066988739415, -0.872755765852, -0.483538914632 },
62 { 0.492728466075, -0.450346958020, 0.744584633283 },
63 { -0.867600811151, -0.188374601723, 0.460199784784 }
64 };
65
66
67/* Spherical to Cartesian */
68 slaDcs2c ( dl, db, v1 );
69
70/* Rotate to mean B1950.0 */
71 slaDimxv ( rmat, v1, v2 );
72
73/* Cartesian to spherical */
74 slaDcc2s ( v2, &r, &d );
75
76/* Introduce e-terms */
77 slaAddet ( r, d, 1950.0, &re, &de );
78
79/* Express in conventional ranges */
80 *dr = slaDranrm ( re );
81 *dd = slaDrange ( de );
82}
Note: See TracBrowser for help on using the repository browser.