SUBROUTINE CDLMST ( * * inputs * : MJD, LONG, * * outputs * : LMST) * * Module number: * * Module name: * * Keyphrase: * ---------- * calculate the local mean sidereal time * * Description: * ------------ * calculate the local mean sidereal time of the epoch at the given longitude. * By setting longitude to 0, this routine gives Greenwich Mean Sidereal Time * (GMST). See Astronomical Almanac 1984, p. B6 for equations used here. * * FORTRAN name: CDLMST.FOR * * Keywords of accessed files and tables: * -------------------------------------- * Name I/O Description / Comments * * Subroutines Called: * ------------------- * CDBS: * None * SDAS: * None * Others: * None * * History: * -------- * Version Date Author Description * 1 02-28-88 J.-C. HSU coding, adapted from noao ast_mst * *------------------------------------------------------------------------------- * *== input: * --epoch in Modified Julian days DOUBLE PRECISION MJD * --longitude REAL LONG * *== output: * --local mean sidereal time (in hours) DOUBLE PRECISION LMST * *== local: * --universal time, centuries since * --J2000.0, and sidereal time DOUBLE PRECISION UT, T, ST, MJ2000 PARAMETER (MJ2000 = 51544.5D0) * *------------------------------------------------------------------------------ * * if use JD instead of MJD, need to subtract 0.5 in UT calculation * UT = (MJD - INT (MJD)) * 24.D0 T = (MJD - MJ2000) / 36525.D0 * * GMST at 0h UT in seconds as a power series of T * ST = 24110.54841D0 + T * (8640184.812866D0 + T * (0.093104D0 * - T * 6.2D-6)) LMST = MOD ((ST / 3600.D0 + UT - LONG / 15.D0), 24.D0) * IF (ST .LT. 0.D0) LMST = LMST + 24.D0 * RETURN END