예제 #1
0
        /// <summary>
        /// Calculates the aberration effect for a celestial body (star or planet) for given instant.
        /// </summary>
        /// <param name="ecl">Ecliptical coordinates of the body (not corrected).</param>
        /// <param name="ae">Aberration elements needed for calculation of aberration correction.</param>
        /// <returns>Returns aberration correction values for ecliptical coordinates.</returns>
        /// <remarks>
        /// AA(II), formula 23.2
        /// </remarks>
        public static CrdsEcliptical AberrationEffect(CrdsEcliptical ecl, AberrationElements ae)
        {
            double thetaLambda = Angle.ToRadians(ae.lambda - ecl.Lambda);
            double piLambda    = Angle.ToRadians(ae.pi - ecl.Lambda);
            double beta        = Angle.ToRadians(ecl.Beta);

            double dLambda = (-k * Math.Cos(thetaLambda) + ae.e * k * Math.Cos(piLambda)) / Math.Cos(beta);
            double dBeta   = -k *Math.Sin(beta) * (Math.Sin(thetaLambda) - ae.e * Math.Sin(piLambda));

            return(new CrdsEcliptical(dLambda / 3600, dBeta / 3600));
        }
예제 #2
0
        /// <summary>
        /// Calculates the aberration effect for a celestial body (star or planet) for given instant.
        /// </summary>
        /// <param name="eq">Equatorial coordinates of the body (not corrected).</param>
        /// <param name="ae">Aberration elements needed for calculation of aberration correction.</param>
        /// <returns>Returns aberration correction values for equatorial coordinates.</returns>
        /// <remarks>AA(II), formula 23.3</remarks>
        public static CrdsEquatorial AberrationEffect(CrdsEquatorial eq, AberrationElements ae, double epsilon)
        {
            double a     = Angle.ToRadians(eq.Alpha);
            double d     = Angle.ToRadians(eq.Delta);
            double theta = Angle.ToRadians(ae.lambda);
            double pi    = Angle.ToRadians(ae.pi);

            epsilon = Angle.ToRadians(epsilon);

            double da = -k * (Math.Cos(a) * Math.Cos(theta) * Math.Cos(epsilon) + Math.Sin(a) * Math.Sin(theta)) / Math.Cos(d)
                        + epsilon * k * (Math.Cos(a) * Math.Cos(pi) * Math.Cos(epsilon) + Math.Sin(a) * Math.Sin(pi)) / Math.Cos(d);

            double m = Math.Tan(epsilon) * Math.Cos(d) - Math.Sin(a) * Math.Sin(d);

            double dd = -k * (Math.Cos(theta) * Math.Cos(epsilon) * m
                              + Math.Cos(a) * Math.Sin(d) * Math.Sin(theta))
                        + epsilon * k * (Math.Cos(pi) * Math.Cos(epsilon) * m + Math.Cos(a) * Math.Sin(d) * Math.Sin(pi));

            return(new CrdsEquatorial(da / 3600, dd / 3600));
        }