source: trunk/MagicSoft/slalib/h2fk5.c

Last change on this file was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaH2fk5 ( double rh, double dh, double drh, double ddh,
4 double *r5, double *d5, double *dr5, double *dd5 )
5/*
6** - - - - - - - - -
7** s l a H 2 f k 5
8** - - - - - - - - -
9**
10** Transform Hipparcos star data into the FK5 (J2000) system.
11**
12** (double precision)
13**
14** This routine transforms Hipparcos star positions and proper
15** motions into FK5 J2000.
16**
17** Given (all Hipparcos, epoch J2000):
18** rh double RA (radians)
19** dh double Dec (radians)
20** drh double proper motion in RA (dRA/dt, rad/Jyear)
21** ddh double proper motion in Dec (dDec/dt, rad/Jyear)
22**
23** Returned (all FK5, equinox J2000, Epoch J2000):
24** r5 double RA (radians)
25** d5 double Dec (radians)
26** dr5 double proper motion in RA (dRA/dt, rad/Jyear)
27** dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
28**
29** Called: slaDs2c6, slaDav2m, slaDmxv, slaDimxv, slaDvxv,
30** slaDc62s, slaDranrm
31**
32** Notes:
33**
34** 1) The proper motions in RA are dRA/dt rather than
35** cos(Dec)*dRA/dt, and are per year rather than per century.
36**
37** 2) The FK5 to Hipparcos transformation consists of a pure
38** rotation and spin; zonal errors in the FK5 catalogue are
39** not taken into account.
40**
41** 3) The published orientation and spin components are interpreted
42** as "axial vectors". An axial vector points at the pole of the
43** rotation and its length is the amount of rotation in radians.
44**
45** 4) See also slaFk52h, slaFk5hz, slaHfk5z.
46**
47** Reference:
48**
49** M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
50**
51** Last revision: 22 June 1999
52**
53** Copyright P.T.Wallace. All rights reserved.
54*/
55
56#define AS2R 0.484813681109535994e-5 /* arcseconds to radians */
57
58{
59/* FK5 to Hipparcos orientation and spin (radians, radians/year) */
60 static double ortn[3] = { -19.9e-3 * AS2R,
61 -9.1e-3 * AS2R,
62 22.9e-3 * AS2R },
63 s5[3] = { -0.30e-3 * AS2R,
64 0.60e-3 * AS2R,
65 0.70e-3 * AS2R };
66
67 double pvh[6], r5h[3][3], sh[3], vv[3], pv5[6], w, r, v;
68 int i;
69
70
71/* Hipparcos barycentric position/velocity 6-vector (normalized). */
72 slaDs2c6 ( rh, dh, 1.0, drh, ddh, 0.0, pvh );
73
74/* FK5 to Hipparcos orientation matrix. */
75 slaDav2m ( ortn, r5h );
76
77/* Rotate the spin vector into the Hipparcos frame. */
78 slaDmxv ( r5h, s5, sh );
79
80/* De-orient & de-spin the 6-vector into FK5 J2000. */
81 slaDimxv ( r5h, pvh, pv5 );
82 slaDvxv ( pvh, sh, vv );
83 for ( i = 0; i < 3; i++ ) {
84 vv [ i ] = pvh [ i + 3 ] - vv [ i ];
85 }
86 slaDimxv ( r5h, vv, pv5 + 3 );
87
88/* FK5 6-vector to spherical. */
89 slaDc62s ( pv5, &w, d5, &r, dr5, dd5, &v );
90 *r5 = slaDranrm ( w );
91}
Note: See TracBrowser for help on using the repository browser.