/// <summary> /// Get the right ascension 'α' /// </summary> /// <param name="eclipticLatitude"></param> /// <param name="eclipticLongitude"></param> /// <param name="angle"></param> /// <returns></returns> public static double GetRightAscension(double eclipticLatitude, double eclipticLongitude, double angle) { return(DegreeHelper.RadiansToDegrees(Math.Atan2( (MathDegrees.Sin(eclipticLongitude) * MathDegrees.Cos(angle)) - (MathDegrees.Tan(eclipticLatitude) * MathDegrees.Sin(angle)), MathDegrees.Cos(eclipticLongitude)))); }
/// <summary> /// Get the declination δ /// </summary> /// <param name="eclipticLatitude"></param> /// <param name="eclipticLongitude"></param> /// <param name="angle"></param> /// <returns></returns> public static double GetDeclination(double eclipticLatitude, double eclipticLongitude, double angle) { return(DegreeHelper.RadiansToDegrees(Math.Asin( (MathDegrees.Sin(eclipticLatitude) * MathDegrees.Cos(angle)) + (MathDegrees.Cos(eclipticLatitude) * MathDegrees.Sin(angle) * MathDegrees.Sin(eclipticLongitude))))); }