Пример #1
0
        public static double GetSunEclipticLongitude(double julianDate, bool highPrecision)
        {
            if (highPrecision)
            {
                return
                    (CoordinateTransformation.MapTo0To360Range
                         (CoordinateTransformation.SetRadiansToDegrees
                             (CalculateEarthPosition(julianDate)))); // Вроде как для высокой точности
            }
            else
            {
                double julianMillennias = Tools.GetMillenniasCount(julianDate);

                var sunLongitudeBase        = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeBaseArray(), julianMillennias);
                var sunLongitudeFirstGroup  = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeFirstArray(), julianMillennias);
                var sunLongitudeSecondGroup = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeSecondArray(), julianMillennias);
                var sunLongitudeThirdGroup  = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeThirdArray(), julianMillennias);
                var sunLongitudeFourthGroup = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeFourthArray(), julianMillennias);
                var sunLongitudeFifthGroup  = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLongitudeFifthArray(), julianMillennias);

                var value = (sunLongitudeBase
                             + sunLongitudeFirstGroup * julianMillennias
                             + sunLongitudeSecondGroup * Tools.GetRaisedValue(julianMillennias, Power.Square)
                             + sunLongitudeThirdGroup * Tools.GetRaisedValue(julianMillennias, Power.Cube)
                             + sunLongitudeFourthGroup * Tools.GetRaisedValue(julianMillennias, Power.Fourth)
                             + sunLongitudeFifthGroup * Tools.GetRaisedValue(julianMillennias, Power.Fifth)) / 100000000;

                //convert results back to degrees
                return(CoordinateTransformation.MapTo0To360Range(CoordinateTransformation.SetRadiansToDegrees(value)));
            }
        }
Пример #2
0
        public static double GetSunEclipticLatitude(double julianDate)
        {
            var julianMillennias = Tools.GetMillenniasCount(julianDate);// (julianDate - 2451545) / 365250;

            var sunLatitudeBase       = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLatitudeBaseArray(), julianMillennias);
            var sunLatitudeFirstGroup = GetCalculatedValue(PositionByOrbitalElementsArray.GetSunLatitudeFirstArray(), julianMillennias);

            double value = (sunLatitudeBase + sunLatitudeFirstGroup * julianMillennias) / 100000000;

            return(CoordinateTransformation.MapToMinus90To90Range(CoordinateTransformation.SetRadiansToDegrees(value)));
        }