aboutsummaryrefslogtreecommitdiff
path: root/src/slalib/eqecl.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-03-04 21:21:30 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-03-04 21:21:30 -0500
commitd54fe7c1f704a63824c5bfa0ece65245572e9b27 (patch)
treeafc52015ffc2c74e0266653eecef1c8ef8ba5d91 /src/slalib/eqecl.f
downloadcalfuse-d54fe7c1f704a63824c5bfa0ece65245572e9b27.tar.gz
Initial commit
Diffstat (limited to 'src/slalib/eqecl.f')
-rw-r--r--src/slalib/eqecl.f55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/slalib/eqecl.f b/src/slalib/eqecl.f
new file mode 100644
index 0000000..a3a73f6
--- /dev/null
+++ b/src/slalib/eqecl.f
@@ -0,0 +1,55 @@
+ SUBROUTINE sla_EQECL (DR, DD, DATE, DL, DB)
+*+
+* - - - - - -
+* E Q E C L
+* - - - - - -
+*
+* Transformation from J2000.0 equatorial coordinates to
+* ecliptic coordinates (double precision)
+*
+* Given:
+* DR,DD dp J2000.0 mean RA,Dec (radians)
+* DATE dp TDB (loosely ET) as Modified Julian Date
+* (JD-2400000.5)
+* Returned:
+* DL,DB dp ecliptic longitude and latitude
+* (mean of date, IAU 1980 theory, radians)
+*
+* Called:
+* sla_DCS2C, sla_PREC, sla_EPJ, sla_DMXV, sla_ECMAT, sla_DCC2S,
+* sla_DRANRM, sla_DRANGE
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DR,DD,DATE,DL,DB
+
+ DOUBLE PRECISION sla_EPJ,sla_DRANRM,sla_DRANGE
+
+ DOUBLE PRECISION RMAT(3,3),V1(3),V2(3)
+
+
+
+* Spherical to Cartesian
+ CALL sla_DCS2C(DR,DD,V1)
+
+* Mean J2000 to mean of date
+ CALL sla_PREC(2000D0,sla_EPJ(DATE),RMAT)
+ CALL sla_DMXV(RMAT,V1,V2)
+
+* Equatorial to ecliptic
+ CALL sla_ECMAT(DATE,RMAT)
+ CALL sla_DMXV(RMAT,V2,V1)
+
+* Cartesian to spherical
+ CALL sla_DCC2S(V1,DL,DB)
+
+* Express in conventional ranges
+ DL=sla_DRANRM(DL)
+ DB=sla_DRANGE(DB)
+
+ END