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/ctf2r.f | |
download | calfuse-d54fe7c1f704a63824c5bfa0ece65245572e9b27.tar.gz |
Initial commit
Diffstat (limited to 'src/slalib/ctf2r.f')
-rw-r--r-- | src/slalib/ctf2r.f | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/slalib/ctf2r.f b/src/slalib/ctf2r.f new file mode 100644 index 0000000..585d587 --- /dev/null +++ b/src/slalib/ctf2r.f @@ -0,0 +1,54 @@ + SUBROUTINE sla_CTF2R (IHOUR, IMIN, SEC, RAD, J) +*+ +* - - - - - - +* C T F 2 R +* - - - - - - +* +* Convert hours, minutes, seconds to radians (single precision) +* +* Given: +* IHOUR int hours +* IMIN int minutes +* SEC real seconds +* +* Returned: +* RAD real angle in radians +* J int status: 0 = OK +* 1 = IHOUR outside range 0-23 +* 2 = IMIN outside range 0-59 +* 3 = SEC outside range 0-59.999... +* +* Called: +* sla_CTF2D +* +* Notes: +* +* 1) The result is computed even if any of the range checks +* fail. +* +* 2) The sign must be dealt with outside this routine. +* +* P.T.Wallace Starlink November 1984 +* +* Copyright (C) 1995 Rutherford Appleton Laboratory +*- + + IMPLICIT NONE + + INTEGER IHOUR,IMIN + REAL SEC,RAD + INTEGER J + + REAL TURNS + +* Turns to radians + REAL T2R + PARAMETER (T2R=6.283185307179586476925287) + + + +* Convert to turns then radians + CALL sla_CTF2D(IHOUR,IMIN,SEC,TURNS,J) + RAD=T2R*TURNS + + END |