aboutsummaryrefslogtreecommitdiff
path: root/src/slalib/subet.f
blob: e36575bfff567b67017673a8481423aaa9834ffa (plain) (blame)
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
SUBROUTINE sla_SUBET (RC, DC, EQ, RM, DM)
*+
*     - - - - - -
*      S U B E T
*     - - - - - -
*
*  Remove the E-terms (elliptic component of annual aberration)
*  from a pre IAU 1976 catalogue RA,Dec to give a mean place
*  (double precision)
*
*  Given:
*     RC,DC     dp     RA,Dec (radians) with E-terms included
*     EQ        dp     Besselian epoch of mean equator and equinox
*
*  Returned:
*     RM,DM     dp     RA,Dec (radians) without E-terms
*
*  Called:
*     sla_ETRMS, sla_DCS2C, sla_,DVDV, sla_DCC2S, sla_DRANRM
*
*  Explanation:
*     Most star positions from pre-1984 optical catalogues (or
*     derived from astrometry using such stars) embody the
*     E-terms.  This routine converts such a position to a
*     formal mean place (allowing, for example, comparison with a
*     pulsar timing position).
*
*  Reference:
*     Explanatory Supplement to the Astronomical Ephemeris,
*     section 2D, page 48.
*
*  P.T.Wallace   Starlink   10 May 1990
*
*  Copyright (C) 1995 Rutherford Appleton Laboratory
*-

      IMPLICIT NONE

      DOUBLE PRECISION RC,DC,EQ,RM,DM

      DOUBLE PRECISION sla_DRANRM,sla_DVDV
      DOUBLE PRECISION A(3),V(3),F

      INTEGER I



*  E-terms
      CALL sla_ETRMS(EQ,A)

*  Spherical to Cartesian
      CALL sla_DCS2C(RC,DC,V)

*  Include the E-terms
      F=1D0+sla_DVDV(V,A)
      DO I=1,3
         V(I)=F*V(I)-A(I)
      END DO

*  Cartesian to spherical
      CALL sla_DCC2S(V,RM,DM)

*  Bring RA into conventional range
      RM=sla_DRANRM(RM)

      END