|
@@ -102,11 +102,30 @@ void setHorizonInterval(double val)
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+/* com_sol_const(): compute the solar constant corrected for the day of the
|
|
|
+ year. The Earth is closest to the Sun (Perigee) on about January 3rd,
|
|
|
+ it is furthest from the sun (Apogee) about July 6th. The 1367 W/m^2 solar
|
|
|
+ constant is at the average 1AU distance, but on Jan 3 it gets up to
|
|
|
+ around 1412.71 W/m^2 and on July 6 it gets down to around 1321 W/m^2.
|
|
|
+ This value is for what hits the top of the atmosphere before any energy
|
|
|
+ is attenuated. */
|
|
|
double com_sol_const(int no_of_day)
|
|
|
{
|
|
|
double I0, d1;
|
|
|
|
|
|
+ /* Solar constant: 1367.0 W/m^2.
|
|
|
+
|
|
|
+ Perigee offset: here we call Jan 2 at 8:18pm the Perigee, so day
|
|
|
+ number 2.8408. In angular units that's (2*pi * 2.8408 / 365.25) = 0.048869.
|
|
|
+
|
|
|
+ Orbital eccentricity: For Earth this is currently about 0.01672,
|
|
|
+ and so the distance to the sun varies by +/- 0.01672 from the
|
|
|
+ mean distance (1AU), so over the year the amplitude of the
|
|
|
+ function is 2*ecc = 0.03344.
|
|
|
+
|
|
|
+ And 365.25 is of course the number of days in a year.
|
|
|
+ */
|
|
|
+
|
|
|
/* v W/(m*m) */
|
|
|
d1 = pi2 * no_of_day / 365.25;
|
|
|
I0 = 1367. * (1 + 0.03344 * cos(d1 - 0.048869));
|