/// <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 ecliptic latitude 'β' /// </summary> /// <param name="model"></param> /// <param name="largeDelta"></param> /// <returns></returns> public static double GetEclipticLatitude(this LocationModel model, double largeDelta) { return(DegreeHelper.RadiansToDegrees(Math.Asin(model.Z / largeDelta))); }
/// <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))))); }
/// <summary> /// Get the ecliptic longitude 'λ' /// </summary> /// <param name="model"></param> /// <returns></returns> public static double GetEclipticLongitude(this LocationModel model) { return(DegreeHelper.RadiansToDegrees(Math.Atan2(model.Y, model.X))); }