Exemplo n.º 1
0
        public static DateTime CalcGSTFromUT(DateTime dDate)
        {
            double   fJD;
            double   fS;
            double   fT;
            double   fT0;
            DateTime dGST;
            double   fUT;
            double   fGST;

            fJD  = GetJulianDay(dDate.Date, 0);
            fS   = fJD - 2451545.0;
            fT   = fS / 36525.0;
            fT0  = 6.697374558 + (2400.051336 * fT) + (0.000025862 * fT * fT);
            fT0  = Trig.PutIn24Hour(fT0);
            fUT  = ConvTimeToDec(dDate);
            fUT  = fUT * 1.002737909;
            fGST = fUT + fT0;
            while (fGST > 24)
            {
                fGST = fGST - 24;
            }
            dGST = ConvDecTUraniaTime(fGST);
            return(dGST);
        }
Exemplo n.º 2
0
        public static double ConvRAToHA(double fRA, DateTime dUT, double fLong)
        {
            //Convert Right Ascension to Hour Angle at specified time and longitude
            double fLST;
            double fHA;

            fLST = ConvTimeToDec(CalcLSTFromUT(dUT, fLong));

            fHA = fLST - fRA;
            fHA = Trig.PutIn24Hour(fHA);

            return(fHA);
        }