diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-04 21:21:30 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-04 21:21:30 -0500 |
commit | d54fe7c1f704a63824c5bfa0ece65245572e9b27 (patch) | |
tree | afc52015ffc2c74e0266653eecef1c8ef8ba5d91 /src/slalib/epco.f | |
download | calfuse-d54fe7c1f704a63824c5bfa0ece65245572e9b27.tar.gz |
Initial commit
Diffstat (limited to 'src/slalib/epco.f')
-rw-r--r-- | src/slalib/epco.f | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/slalib/epco.f b/src/slalib/epco.f new file mode 100644 index 0000000..ef642ca --- /dev/null +++ b/src/slalib/epco.f @@ -0,0 +1,51 @@ + DOUBLE PRECISION FUNCTION sla_EPCO (K0, K, E) +*+ +* - - - - - +* E P C O +* - - - - - +* +* Convert an epoch into the appropriate form - 'B' or 'J' +* +* Given: +* K0 char form of result: 'B'=Besselian, 'J'=Julian +* K char form of given epoch: 'B' or 'J' +* E dp epoch +* +* Called: sla_EPB, sla_EPJ2D, sla_EPJ, sla_EPB2D +* +* Notes: +* +* 1) The result is always either equal to or very close to +* the given epoch E. The routine is required only in +* applications where punctilious treatment of heterogeneous +* mixtures of star positions is necessary. +* +* 2) K0 and K are not validated. They are interpreted as follows: +* +* o If K0 and K are the same the result is E. +* o If K0 is 'B' or 'b' and K isn't, the conversion is J to B. +* o In all other cases, the conversion is B to J. +* +* Note that K0 and K won't match if their cases differ. +* +* P.T.Wallace Starlink 5 September 1993 +* +* Copyright (C) 1995 Rutherford Appleton Laboratory +*- + + IMPLICIT NONE + + CHARACTER*(*) K0,K + DOUBLE PRECISION E + DOUBLE PRECISION sla_EPB,sla_EPJ2D,sla_EPJ,sla_EPB2D + + + IF (K.EQ.K0) THEN + sla_EPCO=E + ELSE IF (K0.EQ.'B'.OR.K0.EQ.'b') THEN + sla_EPCO=sla_EPB(sla_EPJ2D(E)) + ELSE + sla_EPCO=sla_EPJ(sla_EPB2D(E)) + END IF + + END |