source: trunk/MagicSoft/slalib/supgal.c@ 851

Last change on this file since 851 was 732, 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 slaSupgal ( double dsl, double dsb, double *dl, double *db )
4/*
5** - - - - - - - - - -
6** s l a S u p g a l
7** - - - - - - - - - -
8**
9** Transformation from De Vaucouleurs supergalactic coordinates
10** to IAU 1958 Galactic coordinates.
11**
12** (double precision)
13**
14** Given:
15** dsl,dsb double supergalactic longitude and latitude
16**
17** Returned:
18** *dl,*db double Galactic longitude and latitude l2,b2
19**
20** (all arguments are radians)
21**
22** Called:
23** slaDcs2c, slaDimxv, slaDcc2s, slaDranrm, slaDrange
24**
25** References:
26**
27** De Vaucouleurs, De Vaucouleurs, & Corwin, Second Reference
28** Catalogue of Bright Galaxies, U. Texas, page 8.
29**
30** Systems & Applied Sciences Corp., Documentation for the
31** machine-readable version of the above catalogue,
32** contract NAS 5-26490.
33**
34** (These two references give different values for the Galactic
35** longitude of the supergalactic origin. Both are wrong; the
36** correct value is l2=137.37.)
37**
38** Last revision: 8 December 1993
39**
40** Copyright P.T.Wallace. All rights reserved.
41*/
42{
43 double v1[3], v2[3];
44/*
45** System of supergalactic coordinates:
46**
47** sgl sgb l2 b2 (deg)
48** - +90 47.37 +6.32
49** 0 0 - 0
50**
51** Galactic to supergalactic rotation matrix:
52*/
53 static double rmat[3][3] =
54 {
55 { -0.735742574804, 0.677261296414, 0.0 },
56 { -0.074553778365, -0.080991471307, 0.993922590400 },
57 { 0.673145302109, 0.731271165817, 0.110081262225 }
58 };
59
60/* Spherical to Cartesian */
61 slaDcs2c ( dsl, dsb, v1 );
62
63/* Supergalactic to Galactic */
64 slaDimxv ( rmat, v1, v2 );
65
66/* Cartesian to spherical */
67 slaDcc2s ( v2, dl, db );
68
69/* Express in conventional ranges */
70 *dl = slaDranrm ( *dl );
71 *db = slaDrange ( *db );
72}
Note: See TracBrowser for help on using the repository browser.