| 1 | #include "slalib.h"
|
|---|
| 2 | #include "slamac.h"
|
|---|
| 3 | void slaSubet ( double rc, double dc, double eq, double *rm, double *dm )
|
|---|
| 4 | /*
|
|---|
| 5 | ** - - - - - - - - -
|
|---|
| 6 | ** s l a S u b e t
|
|---|
| 7 | ** - - - - - - - - -
|
|---|
| 8 | **
|
|---|
| 9 | ** Remove the e-terms (elliptic component of annual aberration)
|
|---|
| 10 | ** from a pre IAU 1976 catalogue RA,Dec to give a mean place.
|
|---|
| 11 | **
|
|---|
| 12 | ** (double precision)
|
|---|
| 13 | **
|
|---|
| 14 | ** Given:
|
|---|
| 15 | ** rc,dc double RA,Dec (radians) with e-terms included
|
|---|
| 16 | ** eq double Besselian epoch of mean equator and equinox
|
|---|
| 17 | **
|
|---|
| 18 | ** Returned:
|
|---|
| 19 | ** *rm,*dm double RA,Dec (radians) without e-terms
|
|---|
| 20 | **
|
|---|
| 21 | ** Called:
|
|---|
| 22 | ** slaEtrms, slaDcs2c, sla,dvdv, slaDcc2s, slaDranrm
|
|---|
| 23 | **
|
|---|
| 24 | ** Explanation:
|
|---|
| 25 | ** Most star positions from pre-1984 optical catalogues (or
|
|---|
| 26 | ** derived from astrometry using such stars) embody the
|
|---|
| 27 | ** e-terms. This routine converts such a position to a
|
|---|
| 28 | ** formal mean place (allowing, for example, comparison with a
|
|---|
| 29 | ** pulsar timing position).
|
|---|
| 30 | **
|
|---|
| 31 | ** Reference:
|
|---|
| 32 | ** Explanatory Supplement to the Astronomical Ephemeris,
|
|---|
| 33 | ** section 2D, page 48.
|
|---|
| 34 | **
|
|---|
| 35 | ** Last revision: 31 October 1993
|
|---|
| 36 | **
|
|---|
| 37 | ** Copyright P.T.Wallace. All rights reserved.
|
|---|
| 38 | */
|
|---|
| 39 | {
|
|---|
| 40 | double a[3], v[3], f;
|
|---|
| 41 |
|
|---|
| 42 | int i;
|
|---|
| 43 |
|
|---|
| 44 | /* E-terms */
|
|---|
| 45 | slaEtrms ( eq, a );
|
|---|
| 46 |
|
|---|
| 47 | /* Spherical to Cartesian */
|
|---|
| 48 | slaDcs2c ( rc, dc, v );
|
|---|
| 49 |
|
|---|
| 50 | /* Include the e-terms */
|
|---|
| 51 | f = 1.0 + slaDvdv (v, a);
|
|---|
| 52 | for ( i = 0; i < 3; i++ ) {
|
|---|
| 53 | v[i] = f * v[i] - a[i];
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | /* Cartesian to spherical */
|
|---|
| 57 | slaDcc2s ( v, rm, dm );
|
|---|
| 58 |
|
|---|
| 59 | /* Bring RA into conventional range */
|
|---|
| 60 | *rm = slaDranrm ( *rm );
|
|---|
| 61 | }
|
|---|