1
/* @(#)ast_jgal.c 19.1 (ES0-DMD) 02/25/03 13:53:53 */
2
/*===========================================================================
3
Copyright (C) 1995 European Southern Observatory (ESO)
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public
16
License along with this program; if not, write to the Free
17
Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
Corresponding concerning ESO-MIDAS should be addressed as follows:
21
Internet e-mail: midas@eso.org
22
Postal address: European Southern Observatory
23
Data Management Division
24
Karl-Schwarzschild-Strasse 2
25
D 85748 Garching bei Muenchen
27
===========================================================================*/
31
.IDENTIFICATION jgal.c
32
.VERSION 1.0 27-Feb-1987: Creation
33
.VERSION 1.1 24-Oct-1988: Applies on Unit Vectors
35
.AUTHOR Francois Ochsenbein [ESO-IPG]
36
.KEYWORDS J2000 / Galactic coordinate transformations
41
All spherical coordinates are assumed to be expressed in DEGREES.
42
No function is traced.
46
The parameter mnemonics are:
49
\item f = array $[\alpha,\delta]$ of Fundamental (J2000) equatorial coordinates
50
\item g = array $[\ell,b]$ of Galactic coordinates
54
-----------------------------------------------------------------------*/
60
#define DEBUG 0 /* Debugging option */
63
RGLOBAL double gal_2000[3][3] = { /* J2000 to galactic rotation matrix */
64
{-0.054875539726e0, -0.873437108010e0, -0.483834985808e0},
65
{ 0.494109453312e0, -0.444829589425e0, 0.746982251810e0},
66
{-0.867666135858e0, -0.198076386122e0, 0.455983795705e0}
69
/*============================================================================*/
72
.PURPOSE transformation from J2000 to Galactic
75
double uf5[3]; /* IN: J2000 Unit Vector */
76
double ug[3]; /* OUT: Galactic Unit Vector */
78
return (tr_uu ( uf5, ug, gal_2000));
81
/*============================================================================*/
84
.PURPOSE transformation from Galactic to J2000
87
double ug[3]; /* IN: Galactic Unit Vector */
88
double uf5[3]; /* OUT: J2000 Unit Vector */
90
return (tr_uu1 ( ug, uf5, gal_2000));