source: trunk/MagicSoft/slalib/fk45z.c@ 9990

Last change on this file since 9990 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.9 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaFk45z ( double r1950, double d1950, double bepoch,
4 double *r2000, double *d2000 )
5/*
6** - - - - - - - - -
7** s l a F k 4 5 z
8** - - - - - - - - -
9**
10** Convert B1950.0 FK4 star data to J2000.0 FK5 assuming zero
11** proper motion in the FK5 frame (double precision)
12**
13** This routine converts stars from the old, Bessel-Newcomb, FK4
14** system to the new, IAU 1976, FK5, Fricke system, in such a
15** way that the FK5 proper motion is zero. Because such a star
16** has, in general, a non-zero proper motion in the FK4 system,
17** the routine requires the epoch at which the position in the
18** FK4 system was determined.
19**
20** The method is from Appendix 2 of Ref 1, but using the constants
21** of Ref 4.
22**
23** Given:
24** r1950,d1950 double B1950.0 FK4 RA,Dec at epoch (rad)
25** bepoch double Besselian epoch (e.g. 1979.3)
26**
27** Returned:
28** *r2000,*d2000 double J2000.0 FK5 RA,Dec (rad)
29**
30** Notes:
31**
32** 1) The epoch BEPOCH is strictly speaking Besselian, but
33** if a Julian epoch is supplied the result will be
34** affected only to a negligible extent.
35**
36** 2) Conversion from Besselian epoch 1950.0 to Julian epoch
37** 2000.0 only is provided for. Conversions involving other
38** epochs will require use of the appropriate precession,
39** proper motion, and E-terms routines before and/or
40** after FK45Z is called.
41**
42** 3) In the FK4 catalogue the proper motions of stars within
43** 10 degrees of the poles do not embody the differential
44** E-term effect and should, strictly speaking, be handled
45** in a different manner from stars outside these regions.
46** However, given the general lack of homogeneity of the star
47** data available for routine astrometry, the difficulties of
48** handling positions that may have been determined from
49** astrometric fields spanning the polar and non-polar regions,
50** the likelihood that the differential E-terms effect was not
51** taken into account when allowing for proper motion in past
52** astrometry, and the undesirability of a discontinuity in
53** the algorithm, the decision has been made in this routine to
54** include the effect of differential E-terms on the proper
55** motions for all stars, whether polar or not. At epoch 2000,
56** and measuring on the sky rather than in terms of dRA, the
57** errors resulting from this simplification are less than
58** 1 milliarcsecond in position and 1 milliarcsecond per
59** century in proper motion.
60**
61** References:
62**
63** 1 Aoki,S., et al, 1983. Astron. Astrophys., 128, 263.
64**
65** 2 Smith, C.A. et al, 1989. "The transformation of astrometric
66** catalog systems to the equinox J2000.0". Astron.J. 97, 265.
67**
68** 3 Yallop, B.D. et al, 1989. "Transformation of mean star places
69** from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
70** Astron.J. 97, 274.
71**
72** 4 Seidelmann, P.K. (ed), 1992. "Explanatory Supplement to
73** the Astronomical Almanac", ISBN 0-935702-68-7.
74**
75** Called: slaDcs2c, slaEpj, slaEpb2d, slaDcc2s, slaDranrm
76**
77** Defined in slamac.h: D2PI
78**
79** Last revision: 21 September 1998
80**
81** Copyright P.T.Wallace. All rights reserved.
82*/
83{
84 double w;
85 int i, j;
86
87/* Position and position+velocity vectors */
88 double r0[3], a1[3], v1[3], v2[6];
89
90/* Radians per year to arcsec per century */
91 static double pmf = 100.0 * 60.0 * 60.0 * 360.0 / D2PI;
92
93/*
94** Canonical constants (see references)
95*/
96
97/* vectors a and adot, and matrix m (only half of which is needed here) */
98 static double a[3] = { -1.62557e-6, -0.31919e-6, -0.13843e-6 };
99 static double ad[3] = { 1.245e-3, -1.580e-3, -0.659e-3 };
100 static double em[6][3] =
101 {
102 { 0.9999256782, -0.0111820611, -0.0048579477 },
103 { 0.0111820610, 0.9999374784, -0.0000271765 },
104 { 0.0048579479, -0.0000271474, 0.9999881997 },
105 { -0.000551, -0.238565, 0.435739 },
106 { 0.238514, -0.002667, -0.008541 },
107 { -0.435623, 0.012254, 0.002117 }
108 };
109
110/* Spherical to Cartesian */
111 slaDcs2c ( r1950, d1950, r0 );
112
113/* Adjust vector a to give zero proper motion in FK5 */
114 w = ( bepoch - 1950.0 ) / pmf;
115 for ( i = 0; i < 3; i++ ) {
116 a1[i] = a[i] + w * ad[i];
117 }
118
119/* Remove e-terms */
120 w = r0[0] * a1[0] + r0[1] * a1[1] + r0[2] * a1[2];
121 for ( i = 0; i < 3; i++ ) {
122 v1[i] = r0[i] - a1[i] + w * r0[i];
123 }
124
125/* Convert position vector to Fricke system */
126 for ( i = 0; i < 6; i++ ) {
127 w = 0.0;
128 for ( j = 0; j < 3; j++ ) {
129 w += em[i][j] * v1[j];
130 }
131 v2[i] = w;
132 }
133
134/* Allow for fictitious proper motion in FK4 */
135 w = ( slaEpj ( slaEpb2d ( bepoch ) ) - 2000.0 ) / pmf;
136 for ( i = 0; i < 3; i++ ) {
137 v2[i] += w * v2[i+3];
138 }
139
140/* Revert to spherical coordinates */
141 slaDcc2s ( v2, &w, d2000 );
142 *r2000 = slaDranrm ( w );
143}
Note: See TracBrowser for help on using the repository browser.