source: trunk/MagicSoft/slalib/fk52h.c@ 759

Last change on this file since 759 was 731, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 2.7 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaFk52h ( double r5, double d5, double dr5, double dd5,
4 double *rh, double *dh, double *drh, double *ddh )
5/*
6** - - - - - - - - -
7** s l a F k 5 2 h
8** - - - - - - - - -
9**
10** Transform FK5 (J2000) star data into the Hipparcos frame.
11**
12** (double precision)
13**
14** This routine transforms FK5 star positions and proper motions
15** into the frame of the Hipparcos catalogue.
16**
17** Given (all FK5, equinox J2000, epoch J2000):
18** r5 double RA (radians)
19** d5 double Dec (radians)
20** dr5 double proper motion in RA (dRA/dt, rad/Jyear)
21** dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
22**
23** Returned (all Hipparcos, epoch J2000):
24** rh double RA (radians)
25** dh double Dec (radians)
26** drh double proper motion in RA (dRA/dt, rad/Jyear)
27** ddh double proper motion in Dec (dDec/dt, rad/Jyear)
28**
29** Called: slaDs2c6, slaDav2m, slaDmxv, slaDvxv, slaDc62s,
30** 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 slaH2fk5, 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 pv5[6], r5h[3][3], vv[3], pvh[6], w, r, v;
68 int i;
69
70
71/* FK5 barycentric position/velocity 6-vector (normalized). */
72 slaDs2c6 ( r5, d5, 1.0, dr5, dd5, 0.0, pv5 );
73
74/* FK5 to Hipparcos orientation matrix. */
75 slaDav2m ( ortn, r5h );
76
77/* Rotate & spin the 6-vector into the Hipparcos frame. */
78 slaDmxv ( r5h, pv5, pvh );
79 slaDvxv ( pv5, s5, vv );
80 for ( i = 0; i < 3; i++ ) {
81 vv [ i ] = pv5 [ i + 3 ] + vv [ i ];
82 }
83 slaDmxv ( r5h, vv, pvh + 3 );
84
85/* Hipparcos 6-vector to spherical. */
86 slaDc62s ( pvh, &w, dh, &r, drh, ddh, &v );
87 *rh = slaDranrm ( w );
88}
Note: See TracBrowser for help on using the repository browser.