示例#1
0
        static public Coordinates HorizonToEquitorial(Coordinates altAz, Coordinates location, Date utc)
        {
            double hourAngle = MstFromUTC2(utc, location.Lng);// -(equitorial.RA * 15);

            double   haLocal;
            double   declination;
            Vector2d raDec = AltAzToRaDec(altAz.Alt * RC, altAz.Az * RC, location.Lat * RC);

            haLocal     = raDec.X;
            declination = raDec.Y;

            double ha = (haLocal / RC);

            hourAngle += ha;

            if (hourAngle < 0)
            {
                hourAngle += 360.00;
            }
            if (hourAngle > 360)
            {
                hourAngle -= 360;
            }

            return(Coordinates.FromRaDec(hourAngle / 15, declination / RC));
        }