Beispiel #1
0
        public static double SunHoursToRadiations(this double sunHours, DateTime date, ILocation position)
        {
            int    dayOfYear               = Astronomy.DayOfYear(date);
            double dayAngle                = Astronomy.DayAngle(date);
            double latitude                = Astronomy.BoundedLatitude(position);
            double solarDeclination        = Astronomy.SolarDeclination(dayOfYear);
            double daylightTimeFactor      = Astronomy.DaylightTimeFactor(latitude, solarDeclination);
            double solarDistanceCorrection = Astronomy.SolarDistanceCorrection(dayAngle);
            double num = Astronomy.DayLength(daylightTimeFactor);

            return(Math.Max(0.1, Astronomy.ExtraTerrestrialRadiation(latitude, solarDistanceCorrection, solarDeclination, daylightTimeFactor) * (0.1 + 0.24 * sunHours / num + (0.78 - 0.44 * sunHours / num) * sunHours / num)));
        }