Beispiel #1
0
        /// <summary>
        ///     Compute equation of time for given julian date.
        /// </summary>
        private static double ComputeEquationOfTime(double julianDate)
        {
            var epochDaysFraction     = ComputeEpochDaysFraction(julianDate);
            var sunMeanAnomaly        = ComputeSunMeanAnomaly(epochDaysFraction);
            var sunMeanLongitude      = ComputeSunMeanLongitude(epochDaysFraction);
            var sunEclipticLongitude  = ComputeSunEclipticLongitude(sunMeanLongitude, sunMeanAnomaly);
            var eclipticMeanObliquity = ComputeEclipticMeanObliquity(epochDaysFraction);
            var sunRightAscension     = ComputeSunRightAscension(eclipticMeanObliquity, sunEclipticLongitude);

            return((sunMeanLongitude / 15.0) - DateTimeMath.FixHour(sunRightAscension));
        }
Beispiel #2
0
        /// <summary>
        ///     Compute mid day hours for given julian date and time fraction.
        /// </summary>
        /// <param name="julianDate">
        ///     Julian date of mid day hours to be computed.
        /// </param>
        /// <param name="timeFraction">
        ///     Time fraction of the day of mid day hours to be computed.
        /// </param>
        /// <returns>
        ///     Mid day hours for given julian date and time fraction.
        /// </returns>
        internal static double ComputeMidDay(double julianDate, double timeFraction)
        {
            var equationOfTime = ComputeEquationOfTime(julianDate + timeFraction);

            return(DateTimeMath.FixHour(12.0 - equationOfTime));
        }