source: trunk/MagicSoft/slalib/fk5hz.c@ 9872

Last change on this file since 9872 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 slaFk5hz ( double r5, double d5, double epoch, double *rh, double *dh )
4/*
5** - - - - - - - - -
6** s l a F k 5 h z
7** - - - - - - - - -
8**
9** Transform an FK5 (J2000) star position into the frame of the
10** Hipparcos catalogue, assuming zero Hipparcos proper motion.
11**
12** (double precision)
13**
14** This routine converts a star position from the FK5 system to
15** the Hipparcos system, in such a way that the Hipparcos proper
16** motion is zero. Because such a star has, in general, a non-zero
17** proper motion in the FK5 system, the routine requires the epoch
18** at which the position in the FK5 system was determined.
19**
20** Given:
21** r5 double FK5 RA (radians), equinox J2000, epoch EPOCH
22** d5 double FK5 Dec (radians), equinox J2000, epoch EPOCH
23** epoch double Julian epoch (TDB)
24**
25** Returned (all Hipparcos):
26** rh double RA (radians)
27** dh double Dec (radians)
28**
29** Called: slaDcs2c, slaDav2m, slaDimxv, slaDmxv, slaDcc2s, slaDranrm
30**
31** Notes:
32**
33** 1) The FK5 to Hipparcos transformation consists of a pure
34** rotation and spin; zonal errors in the FK5 catalogue are
35** not taken into account.
36**
37** 2) The published orientation and spin components are interpreted
38** as "axial vectors". An axial vector points at the pole of the
39** rotation and its length is the amount of rotation in radians.
40**
41** 3) See also slaFk52h, slaH2fk5, slaHfk5z.
42**
43** Reference:
44**
45** M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
46**
47** Last revision: 22 June 1999
48**
49** Copyright P.T.Wallace. All rights reserved.
50*/
51
52#define AS2R 0.484813681109535994e-5 /* arcseconds to radians */
53
54{
55/* FK5 to Hipparcos orientation and spin (radians, radians/year) */
56 static double ortn[3] = { -19.9e-3 * AS2R,
57 -9.1e-3 * AS2R,
58 22.9e-3 * AS2R },
59 s5[3] = { -0.30e-3 * AS2R,
60 0.60e-3 * AS2R,
61 0.70e-3 * AS2R };
62
63 double p5e[3], r5h[3][3], t, vst[3], rst[3][3], p5[3], ph[3], w;
64 int i;
65
66
67/* FK5 barycentric position vector. */
68 slaDcs2c ( r5, d5, p5e );
69
70/* FK5 to Hipparcos orientation matrix. */
71 slaDav2m ( ortn, r5h );
72
73/* Time interval from epoch to J2000. */
74 t = 2000.0 - epoch;
75
76/* Axial vector: accumulated Hipparcos wrt FK5 spin over that interval. */
77 for ( i = 0; i < 3; i++ ) {
78 vst [ i ] = s5 [ i ] * t;
79 }
80
81/* Express the accumulated spin as a rotation matrix. */
82 slaDav2m ( vst, rst );
83
84/* Derotate the vector's FK5 axes back to epoch. */
85 slaDimxv ( rst, p5e, p5 );
86
87/* Rotate the vector into the Hipparcos frame. */
88 slaDmxv ( r5h, p5, ph );
89
90/* Hipparcos vector to spherical. */
91 slaDcc2s ( ph, &w, dh );
92 *rh = slaDranrm ( w );
93}
Note: See TracBrowser for help on using the repository browser.