1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
use crateDR2AS;
use crate;
/// Convert J2000.0 FK5 star catalog data to B1950.0 FK4.
///
/// Status: support function.
///
/// Given: (all J2000.0, FK5)
/// r2000,d2000 f64 J2000.0 RA,Dec (rad)
/// dr2000,dd2000 f64 J2000.0 proper motions (rad/Jul.yr)
/// p2000 f64 parallax (arcsec)
/// v2000 f64 radial velocity (km/s, +ve = moving away)
///
/// Returned: (all B1950.0, FK4)
/// r1950,d1950 f64 B1950.0 RA,Dec (rad)
/// dr1950,dd1950 f64 B1950.0 proper motions (rad/trop.yr)
/// p1950 f64 parallax (arcsec)
/// v1950 f64 radial velocity (km/s, +ve = moving away)
///
/// Notes:
///
/// 1) The proper motions in RA are dRA/dt rather than cos(Dec)*dRA/dt,
/// and are per year rather than per century.
///
/// 2) The conversion is somewhat complicated, for several reasons:
///
/// . Change of standard epoch from J2000.0 to B1950.0.
///
/// . An intermediate transition date of 1984 January 1.0 TT.
///
/// . A change of precession model.
///
/// . Change of time unit for proper motion (Julian to tropical).
///
/// . FK4 positions include the E-terms of aberration, to simplify
/// the hand computation of annual aberration. FK5 positions
/// assume a rigorous aberration computation based on the Earth's
/// barycentric velocity.
///
/// . The E-terms also affect proper motions, and in particular cause
/// objects at large distances to exhibit fictitious proper
/// motions.
///
/// The algorithm is based on Smith et al. (1989) and Yallop et al.
/// (1989), which presented a matrix method due to Standish (1982) as
/// developed by Aoki et al. (1983), using Kinoshita's development of
/// Andoyer's post-Newcomb precession. The numerical constants from
/// Seidelmann (1992) are used canonically.
///
/// 4) In the FK4 catalog the proper motions of stars within 10 degrees
/// of the poles do not embody differential E-terms effects and
/// should, strictly speaking, be handled in a different manner from
/// stars outside these regions. However, given the general lack of
/// homogeneity of the star data available for routine astrometry,
/// the difficulties of handling positions that may have been
/// determined from astrometric fields spanning the polar and non-
/// polar regions, the likelihood that the differential E-terms
/// effect was not taken into account when allowing for proper motion
/// in past astrometry, and the undesirability of a discontinuity in
/// the algorithm, the decision has been made in this SOFA algorithm
/// to include the effects of differential E-terms on the proper
/// motions for all stars, whether polar or not. At epoch J2000.0,
/// and measuring "on the sky" rather than in terms of RA change, the
/// errors resulting from this simplification are less than
/// 1 milliarcsecond in position and 1 milliarcsecond per century in
/// proper motion.
///
/// Called:
/// anp normalize angle into range 0 to 2pi
/// pdp scalar product of two p-vectors
/// pm modulus of p-vector
/// pmp p-vector minus p-vector
/// ppp p-vector plus p-vector
/// pv2s pv-vector to spherical coordinates
/// s2pv spherical coordinates to pv-vector
/// sxp multiply p-vector by scalar
///
/// References:
///
/// Aoki, S. et al., 1983, "Conversion matrix of epoch B1950.0
/// FK4-based positions of stars to epoch J2000.0 positions in
/// accordance with the new IAU resolutions". Astron.Astrophys.
/// 128, 263-267.
///
/// Seidelmann, P.K. (ed), 1992, "Explanatory Supplement to the
/// Astronomical Almanac", ISBN 0-935702-68-7.
///
/// Smith, C.A. et al., 1989, "The transformation of astrometric
/// catalog systems to the equinox J2000.0". Astron.J. 97, 265.
///
/// Standish, E.M., 1982, "Conversion of positions and proper motions
/// from B1950.0 to the IAU system at J2000.0". Astron.Astrophys.,
/// 115, 1, 20-22.
///
/// Yallop, B.D. et al., 1989, "Transformation of mean star places
/// from FK4 B1950.0 to FK5 J2000.0 using matrices in 6-space".
/// Astron.J. 97, 274.