1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | void slaAddet ( double rm, double dm, double eq, double *rc, double *dc )
|
---|
4 | /*
|
---|
5 | ** - - - - - - - - -
|
---|
6 | ** s l a A d d e t
|
---|
7 | ** - - - - - - - - -
|
---|
8 | **
|
---|
9 | ** Add the e-terms (elliptic component of annual aberration) to a
|
---|
10 | ** pre IAU 1976 mean place to conform to the old catalogue convention.
|
---|
11 | **
|
---|
12 | ** Given:
|
---|
13 | ** rm,dm double RA,Dec (radians) without e-terms
|
---|
14 | ** eq double Besselian epoch of mean equator and equinox
|
---|
15 | **
|
---|
16 | ** Returned:
|
---|
17 | ** *rc,*dc double RA,dec (radians) with e-terms included
|
---|
18 | **
|
---|
19 | ** Called:
|
---|
20 | ** slaEtrms, slaDcs2c, slaDcc2s, slaDranrm, slaDrange
|
---|
21 | **
|
---|
22 | ** Explanation:
|
---|
23 | ** Most star positions from pre-1984 optical catalogues (or
|
---|
24 | ** derived from astrometry using such stars) embody the
|
---|
25 | ** e-terms. If it is necessary to convert a formal mean
|
---|
26 | ** place (for example a pulsar timing position) to one
|
---|
27 | ** consistent with such a star catalogue, then the RA,Dec
|
---|
28 | ** should be adjusted using this routine.
|
---|
29 | **
|
---|
30 | ** Reference:
|
---|
31 | ** Explanatory Supplement to the Astronomical Almanac,
|
---|
32 | ** ed P.K.Seidelmann (1992), page 169.
|
---|
33 | **
|
---|
34 | ** Last revision: 25 July 1996
|
---|
35 | **
|
---|
36 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
37 | */
|
---|
38 | {
|
---|
39 | double a[3]; /* Elliptic components of annual aberration vector */
|
---|
40 | double v[3]; /* Cartesian equivalant of RA,Dec */
|
---|
41 | int i;
|
---|
42 |
|
---|
43 |
|
---|
44 | /* E-terms vector */
|
---|
45 | slaEtrms ( eq, a );
|
---|
46 |
|
---|
47 | /* Spherical to Cartesian */
|
---|
48 | slaDcs2c ( rm, dm, v );
|
---|
49 |
|
---|
50 | /* Include the e-terms */
|
---|
51 | for ( i=0; i < 3; i++ ) {
|
---|
52 | v[i] += a[i];
|
---|
53 | }
|
---|
54 |
|
---|
55 | /* Cartesian to spherical */
|
---|
56 | slaDcc2s ( v, rc, dc );
|
---|
57 |
|
---|
58 | /* Bring RA into conventional range */
|
---|
59 | *rc = slaDranrm ( *rc );
|
---|
60 | }
|
---|