static double gmst(double mjd) {

        double mjd0 = Math.floor(mjd);
        double ut = 86400 * (mjd - mjd0);
        double jct0 = (mjd0 - 51544.5) / 36525;
        double jct = (mjd - 51544.5) / 36525;
        double gmstInSecs =
            24110.54841 + 8640184.812866 * jct0 + 1.0027379093 * ut + (0.093104 - 0.0000062 * jct) * jct * jct;
        double gmstInDays = gmstInSecs / 86400;
        return (gmstInDays - Math.floor(gmstInDays)) * 2 * Math.PI;

    }
static double gmst ( double mjd ) { double mjd0 = Math . floor ( mjd ) ; double ut = 86400 * ( mjd - mjd0 ) ; double jct0 = ( mjd0 - 51544.5 ) / 36525 ; double jct = ( mjd - 51544.5 ) / 36525 ; double gmstInSecs = 24110.54841 + 8640184.812866 * jct0 + 1.0027379093 * ut + ( 0.093104 - 0.0000062 * jct ) * jct * jct ; double gmstInDays = gmstInSecs / 86400 ; return ( gmstInDays - Math . floor ( gmstInDays ) ) * 2 * Math . PI ; }
<p>Obtains the mean sidereal time of Greenwich in radians. </p>

@param   mjd     modified julian date on the time scale of UT
@return  mean sidereal time of Greenwich in radians