source: trunk/MagicSoft/slalib/hfk5z.c@ 20036

Last change on this file since 20036 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 3.3 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaHfk5z ( double rh, double dh, double epoch,
4 double *r5, double *d5, double *dr5, double *dd5 )
5/*
6** - - - - - - - - -
7** s l a H f k 5 z
8** - - - - - - - - -
9**
10** Transform a Hipparcos star position into FK5 J2000, assuming
11** zero Hipparcos proper motion.
12**
13** (double precision)
14**
15** Given:
16** rh double Hipparcos RA (radians)
17** dh double Hipparcos Dec (radians)
18** epoch double Julian epoch (TDB)
19**
20** Returned (all FK5, equinox J2000, epoch EPOCH):
21** r5 double RA (radians)
22** d5 double Dec (radians)
23**
24** Called: slaDcs2c, slaDav2m, slaDmxv, slaDav2m, slaDmxm,
25** slaDimxv, slaDvxv, slaDc62s, slaDranrm
26**
27** Notes:
28**
29** 1) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
30**
31** 2) The FK5 to Hipparcos transformation consists of a pure
32** rotation and spin; zonal errors in the FK5 catalogue are
33** not taken into account.
34**
35** 3) The published orientation and spin components are interpreted
36** as "axial vectors". An axial vector points at the pole of the
37** rotation and its length is the amount of rotation in radians.
38**
39** 4) It was the intention that Hipparcos should be a close
40** approximation to an inertial frame, so that distant objects
41** have zero proper motion; such objects have (in general)
42** non-zero proper motion in FK5, and this routine returns those
43** fictitious proper motions.
44**
45** 5) The position returned by this routine is in the FK5 J2000
46** reference frame but at the specified epoch.
47**
48** 6) See also slaFk52h, slaH2fk5, slaFk5zhz.
49**
50** Reference:
51**
52** M.Feissel & F.Mignard, Astron. Astrophys. 331, L33-L36 (1998).
53**
54** Last revision: 30 December 1999
55**
56** Copyright P.T.Wallace. All rights reserved.
57*/
58
59#define AS2R 0.484813681109535994e-5 /* arcseconds to radians */
60
61{
62/* FK5 to Hipparcos orientation and spin (radians, radians/year) */
63 static double ortn[3] = { -19.9e-3 * AS2R,
64 -9.1e-3 * AS2R,
65 22.9e-3 * AS2R },
66 s5[3] = { -0.30e-3 * AS2R,
67 0.60e-3 * AS2R,
68 0.70e-3 * AS2R };
69
70 double ph[3], r5h[3][3], sh[3], t, vst[3], rst[3][3], r5ht[3][3],
71 pv5e[6], vv[3], w, r, v;
72 int i;
73
74
75/* Hipparcos barycentric position vector (normalized). */
76 slaDcs2c ( rh, dh, ph );
77
78/* FK5 to Hipparcos orientation matrix. */
79 slaDav2m ( ortn, r5h );
80
81/* Rotate the spin vector into the Hipparcos frame. */
82 slaDmxv ( r5h, s5, sh );
83
84/* Time interval from J2000 to epoch. */
85 t = epoch - 2000.0;
86
87/* Axial vector: accumulated Hipparcos wrt FK5 spin over that interval. */
88 for ( i = 0; i < 3; i++ ) {
89 vst [ i ] = s5 [ i ] * t;
90 }
91
92/* Express the accumulated spin as a rotation matrix. */
93 slaDav2m ( vst, rst );
94
95/* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */
96 slaDmxm ( r5h, rst, r5ht );
97
98/* De-orient & de-spin the vector into FK5 J2000 at epoch. */
99 slaDimxv ( r5ht, ph, pv5e );
100 slaDvxv ( sh, ph, vv );
101 slaDimxv ( r5ht, vv, pv5e + 3 );
102
103/* FK5 position/velocity 6-vector to spherical. */
104 slaDc62s( pv5e, &w, d5, &r, dr5, dd5, &v );
105 *r5 = slaDranrm ( w );
106}
Note: See TracBrowser for help on using the repository browser.