source: trunk/MagicSoft/slalib/galsup.c@ 807

Last change on this file since 807 was 731, checked in by tbretz, 23 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 slaGalsup ( double dl, double db, double *dsl, double *dsb )
4/*
5** - - - - - - - - - -
6** s l a G a l s u p
7** - - - - - - - - - -
8**
9** Transformation from IAU 1958 Galactic coordinates to
10** De Vaucouleurs supergalactic coordinates.
11**
12** (double precision)
13**
14** Given:
15** dl,db double Galactic longitude and latitude l2,b2
16**
17** Returned:
18** *dsl,*dsb double Supergalactic longitude and latitude
19**
20** (all arguments are radians)
21**
22** Called:
23** slaDcs2c, slaDmxv, 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: 25 January 1999
39**
40** Copyright P.T.Wallace. All rights reserved.
41*/
42{
43 double v1[3], v2[3];
44
45/*
46** System of Supergalactic coordinates:
47**
48** SGl SGb l2 b2 (deg)
49** - +90 47.37 +6.32
50** 0 0 - 0
51**
52** Galactic to Supergalactic rotation matrix:
53*/
54 static double rmat[3][3] =
55 {
56 { -0.735742574804, 0.677261296414, 0.0 },
57 { -0.074553778365, -0.080991471307, 0.993922590400 },
58 { 0.673145302109, 0.731271165817, 0.110081262225 }
59 };
60
61/* Spherical to Cartesian */
62 slaDcs2c ( dl, db, v1 );
63
64/* Galactic to Supergalactic */
65 slaDmxv ( rmat, v1, v2 );
66
67/* Cartesian to spherical */
68 slaDcc2s ( v2, dsl, dsb );
69
70/* Express in conventional ranges */
71 *dsl = slaDranrm ( *dsl );
72 *dsb = slaDrange ( *dsb );
73}
Note: See TracBrowser for help on using the repository browser.