Beispiel #1
0
//Static methods

    /////////////////////////////// Implementation ////////////////////////////////

    public static double MeanGreenwichSiderealTime(double JD)
    {
        //Get the Julian day for the same day at midnight

        DT date = new DT();

        date.SetJD(JD, DT.AfterPapalReformJD(JD));
        double[] D = date.Get();

        int    Year   = (int)D[0];
        int    Month  = (int)D[1];
        int    Day    = (int)D[2];
        int    Hour   = (int)D[3];
        int    Minute = (int)D[4];
        double Second = D[5];

        date.Set(Year, Month, Day, 0, 0, 0, date.InGregorianCalendar());
        double JDMidnight = date.Julian();

        //Calculate the sidereal time at midnight
        double T        = (JDMidnight - 2451545) / 36525;
        double TSquared = T * T;
        double TCubed   = TSquared * T;
        double Value    = 100.46061837 + (36000.770053608 * T) + (0.000387933 * TSquared) - (TCubed / 38710000);

        //Adjust by the time of day
        Value += (((Hour * 15) + (Minute * 0.25) + (Second * 0.0041666666666666666666666666666667)) * 1.00273790935);

        Value = CT.D2H(Value);

        return(CT.M24(Value));
    }