86 |
|
#include <string.h> |
87 |
|
#include <ctype.h> |
88 |
|
#include "rtmath.h" |
89 |
+ |
#include "platform.h" |
90 |
|
#include "color.h" |
91 |
+ |
#include "resolu.h" |
92 |
|
|
93 |
|
char *progname; /* Program name */ |
94 |
|
char errmsg[128]; /* Error message buffer */ |
110 |
|
double solar_rad; /* Solar radiance */ |
111 |
|
double sun_zenith; /* Sun zenith angle (radians) */ |
112 |
|
int input = 0; /* Input type */ |
113 |
+ |
int output = 0; /* Output type */ |
114 |
|
|
115 |
|
extern double dmax( double, double ); |
116 |
|
extern double CalcAirMass(); |
211 |
|
{ 1.950, 2.800 }, |
212 |
|
{ 2.800, 4.500 }, |
213 |
|
{ 4.500, 6.200 }, |
214 |
< |
{ 6.200, 12.00 } /* Clear */ |
214 |
> |
{ 6.200, 12.01 } /* Clear */ |
215 |
|
}; |
216 |
|
|
217 |
|
/* Luminous efficacy model coefficients */ |
249 |
|
{ 101.18, 1.58, -1.10, -8.29 } |
250 |
|
}; |
251 |
|
|
252 |
+ |
#ifndef NSUNPATCH |
253 |
+ |
#define NSUNPATCH 4 /* max. # patches to spread sun into */ |
254 |
+ |
#endif |
255 |
+ |
|
256 |
|
extern int jdate(int month, int day); |
257 |
|
extern double stadj(int jd); |
258 |
|
extern double sdec(int jd); |
263 |
|
extern double s_longitude; |
264 |
|
extern double s_meridian; |
265 |
|
|
266 |
< |
double grefl = 0.2; /* diffuse ground reflectance */ |
266 |
> |
int nsuns = NSUNPATCH; /* number of sun patches to use */ |
267 |
> |
double fixed_sun_sa = -1; /* fixed solid angle per sun? */ |
268 |
|
|
269 |
|
int verbose = 0; /* progress reports to stderr? */ |
270 |
|
|
272 |
|
|
273 |
|
int rhsubdiv = 1; /* Reinhart sky subdivisions */ |
274 |
|
|
275 |
< |
float skycolor[3] = {.96, 1.004, 1.118}; /* sky coloration */ |
275 |
> |
COLOR skycolor = {.96, 1.004, 1.118}; /* sky coloration */ |
276 |
> |
COLOR suncolor = {1., 1., 1.}; /* sun color */ |
277 |
> |
COLOR grefl = {.2, .2, .2}; /* ground reflectance */ |
278 |
|
|
269 |
– |
int do_sun = 1; /* output direct solar contribution? */ |
270 |
– |
|
279 |
|
int nskypatch; /* number of Reinhart patches */ |
280 |
|
float *rh_palt; /* sky patch altitudes (radians) */ |
281 |
|
float *rh_pazi; /* sky patch azimuths (radians) */ |
294 |
|
extern float * resize_dmatrix(float *mtx_data, int nsteps, int npatch); |
295 |
|
extern void AddDirect(float *parr); |
296 |
|
|
297 |
+ |
|
298 |
+ |
static const char * |
299 |
+ |
getfmtname(int fmt) |
300 |
+ |
{ |
301 |
+ |
switch (fmt) { |
302 |
+ |
case 'a': |
303 |
+ |
return("ascii"); |
304 |
+ |
case 'f': |
305 |
+ |
return("float"); |
306 |
+ |
case 'd': |
307 |
+ |
return("double"); |
308 |
+ |
} |
309 |
+ |
return("unknown"); |
310 |
+ |
} |
311 |
+ |
|
312 |
+ |
|
313 |
|
int |
314 |
|
main(int argc, char *argv[]) |
315 |
|
{ |
316 |
|
char buf[256]; |
317 |
+ |
int doheader = 1; /* output header? */ |
318 |
+ |
double rotation = 0; /* site rotation (degrees) */ |
319 |
|
double elevation; /* site elevation (meters) */ |
320 |
|
int dir_is_horiz; /* direct is meas. on horizontal? */ |
321 |
|
float *mtx_data = NULL; /* our matrix data */ |
322 |
|
int ntsteps = 0; /* number of rows in matrix */ |
323 |
+ |
int step_alloc = 0; |
324 |
|
int last_monthly = 0; /* month of last report */ |
325 |
|
int mo, da; /* month (1-12) and day (1-31) */ |
326 |
|
double hr; /* hour (local standard time) */ |
332 |
|
/* get options */ |
333 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) |
334 |
|
switch (argv[i][1]) { |
335 |
< |
case 'g': |
336 |
< |
grefl = atof(argv[++i]); |
335 |
> |
case 'g': /* ground reflectance */ |
336 |
> |
grefl[0] = atof(argv[++i]); |
337 |
> |
grefl[1] = atof(argv[++i]); |
338 |
> |
grefl[2] = atof(argv[++i]); |
339 |
|
break; |
340 |
< |
case 'v': |
340 |
> |
case 'v': /* verbose progress reports */ |
341 |
|
verbose++; |
342 |
|
break; |
343 |
< |
case 'o': |
343 |
> |
case 'h': /* turn off header */ |
344 |
> |
doheader = 0; |
345 |
> |
break; |
346 |
> |
case 'o': /* output format */ |
347 |
|
switch (argv[i][2]) { |
348 |
|
case 'f': |
349 |
|
case 'd': |
354 |
|
goto userr; |
355 |
|
} |
356 |
|
break; |
357 |
< |
case 'm': |
357 |
> |
case 'O': /* output type */ |
358 |
> |
switch (argv[i][2]) { |
359 |
> |
case '0': |
360 |
> |
output = 0; |
361 |
> |
break; |
362 |
> |
case '1': |
363 |
> |
output = 1; |
364 |
> |
break; |
365 |
> |
default: |
366 |
> |
goto userr; |
367 |
> |
} |
368 |
> |
if (argv[i][3]) |
369 |
> |
goto userr; |
370 |
> |
break; |
371 |
> |
case 'm': /* Reinhart subdivisions */ |
372 |
|
rhsubdiv = atoi(argv[++i]); |
373 |
|
break; |
374 |
< |
case 'c': |
374 |
> |
case 'c': /* sky color */ |
375 |
|
skycolor[0] = atof(argv[++i]); |
376 |
|
skycolor[1] = atof(argv[++i]); |
377 |
|
skycolor[2] = atof(argv[++i]); |
378 |
|
break; |
379 |
< |
case 'd': |
334 |
< |
do_sun = 1; |
379 |
> |
case 'd': /* solar (direct) only */ |
380 |
|
skycolor[0] = skycolor[1] = skycolor[2] = 0; |
381 |
+ |
if (suncolor[1] <= 1e-4) |
382 |
+ |
suncolor[0] = suncolor[1] = suncolor[2] = 1; |
383 |
|
break; |
384 |
< |
case 's': |
385 |
< |
do_sun = 0; |
384 |
> |
case 's': /* sky only (no direct) */ |
385 |
> |
suncolor[0] = suncolor[1] = suncolor[2] = 0; |
386 |
|
if (skycolor[1] <= 1e-4) |
387 |
|
skycolor[0] = skycolor[1] = skycolor[2] = 1; |
388 |
|
break; |
389 |
+ |
case 'r': /* rotate distribution */ |
390 |
+ |
if (argv[i][2] && argv[i][2] != 'z') |
391 |
+ |
goto userr; |
392 |
+ |
rotation = atof(argv[++i]); |
393 |
+ |
break; |
394 |
+ |
case '5': /* 5-phase calculation */ |
395 |
+ |
nsuns = 1; |
396 |
+ |
fixed_sun_sa = PI/360.*atof(argv[++i]); |
397 |
+ |
fixed_sun_sa *= fixed_sun_sa*PI; |
398 |
+ |
break; |
399 |
|
default: |
400 |
|
goto userr; |
401 |
|
} |
415 |
|
progname); |
416 |
|
} |
417 |
|
/* read weather tape header */ |
418 |
< |
if (scanf("place %[^\n]\n", buf) != 1) |
418 |
> |
if (scanf("place %[^\r\n] ", buf) != 1) |
419 |
|
goto fmterr; |
420 |
|
if (scanf("latitude %lf\n", &s_latitude) != 1) |
421 |
|
goto fmterr; |
450 |
|
progname, s_latitude, s_longitude); |
451 |
|
fprintf(stderr, "%s: %d sky patches per time step\n", |
452 |
|
progname, nskypatch); |
453 |
+ |
if (rotation != 0) |
454 |
+ |
fprintf(stderr, "%s: rotating output %.0f degrees\n", |
455 |
+ |
progname, rotation); |
456 |
|
} |
457 |
+ |
/* convert quantities to radians */ |
458 |
+ |
s_latitude = DegToRad(s_latitude); |
459 |
+ |
s_longitude = DegToRad(s_longitude); |
460 |
+ |
s_meridian = DegToRad(s_meridian); |
461 |
|
/* process each time step in tape */ |
462 |
|
while (scanf("%d %d %lf %lf %lf\n", &mo, &da, &hr, &dir, &dif) == 5) { |
463 |
|
double sda, sta; |
464 |
|
/* make space for next time step */ |
465 |
|
mtx_offset = 3*nskypatch*ntsteps++; |
466 |
< |
mtx_data = resize_dmatrix(mtx_data, ntsteps, nskypatch); |
466 |
> |
if (ntsteps > step_alloc) { |
467 |
> |
step_alloc += (step_alloc>>1) + ntsteps + 7; |
468 |
> |
mtx_data = resize_dmatrix(mtx_data, step_alloc, nskypatch); |
469 |
> |
} |
470 |
|
if (dif <= 1e-4) { |
471 |
|
memset(mtx_data+mtx_offset, 0, sizeof(float)*3*nskypatch); |
472 |
|
continue; |
479 |
|
sda = sdec(julian_date); |
480 |
|
sta = stadj(julian_date); |
481 |
|
altitude = salt(sda, hr+sta); |
482 |
< |
azimuth = sazi(sda, hr+sta); |
482 |
> |
azimuth = sazi(sda, hr+sta) + PI - DegToRad(rotation); |
483 |
|
/* convert measured values */ |
484 |
|
if (dir_is_horiz && altitude > 0.) |
485 |
|
dir /= sin(altitude); |
492 |
|
} |
493 |
|
/* compute sky patch values */ |
494 |
|
ComputeSky(mtx_data+mtx_offset); |
495 |
< |
if (do_sun) |
429 |
< |
AddDirect(mtx_data+mtx_offset); |
495 |
> |
AddDirect(mtx_data+mtx_offset); |
496 |
|
} |
497 |
|
/* check for junk at end */ |
498 |
|
while ((i = fgetc(stdin)) != EOF) |
505 |
|
break; |
506 |
|
} |
507 |
|
/* write out matrix */ |
508 |
+ |
if (outfmt != 'a') |
509 |
+ |
SET_FILE_BINARY(stdout); |
510 |
|
#ifdef getc_unlocked |
511 |
|
flockfile(stdout); |
512 |
|
#endif |
513 |
|
if (verbose) |
514 |
|
fprintf(stderr, "%s: writing %smatrix with %d time steps...\n", |
515 |
|
progname, outfmt=='a' ? "" : "binary ", ntsteps); |
516 |
+ |
if (doheader) { |
517 |
+ |
newheader("RADIANCE", stdout); |
518 |
+ |
printargs(argc, argv, stdout); |
519 |
+ |
printf("LATLONG= %.8f %.8f\n", RadToDeg(s_latitude), |
520 |
+ |
-RadToDeg(s_longitude)); |
521 |
+ |
printf("NROWS=%d\n", nskypatch); |
522 |
+ |
printf("NCOLS=%d\n", ntsteps); |
523 |
+ |
printf("NCOMP=3\n"); |
524 |
+ |
fputformat((char *)getfmtname(outfmt), stdout); |
525 |
+ |
putchar('\n'); |
526 |
+ |
} |
527 |
|
/* patches are rows (outer sort) */ |
528 |
|
for (i = 0; i < nskypatch; i++) { |
529 |
|
mtx_offset = 3*i; |
530 |
|
switch (outfmt) { |
531 |
|
case 'a': |
532 |
|
for (j = 0; j < ntsteps; j++) { |
533 |
< |
printf("%.3e %.3e %.3e\n", mtx_data[mtx_offset], |
533 |
> |
printf("%.3g %.3g %.3g\n", mtx_data[mtx_offset], |
534 |
|
mtx_data[mtx_offset+1], |
535 |
|
mtx_data[mtx_offset+2]); |
536 |
|
mtx_offset += 3*nskypatch; |
537 |
|
} |
538 |
< |
fputc('\n', stdout); |
538 |
> |
if (ntsteps > 1) |
539 |
> |
fputc('\n', stdout); |
540 |
|
break; |
541 |
|
case 'f': |
542 |
|
for (j = 0; j < ntsteps; j++) { |
565 |
|
fprintf(stderr, "%s: done.\n", progname); |
566 |
|
exit(0); |
567 |
|
userr: |
568 |
< |
fprintf(stderr, "Usage: %s [-v][-d|-s][-m N][-g refl][-c r g b][-o{f|d}] [tape.wea]\n", |
568 |
> |
fprintf(stderr, "Usage: %s [-v][-h][-d|-s][-r deg][-m N][-g r g b][-c r g b][-o{f|d}][-O{0|1}] [tape.wea]\n", |
569 |
|
progname); |
570 |
|
exit(1); |
571 |
|
fmterr: |
586 |
|
{ |
587 |
|
int index; /* Category index */ |
588 |
|
double norm_diff_illum; /* Normalized diffuse illuimnance */ |
509 |
– |
double zlumin; /* Zenith luminance */ |
589 |
|
int i; |
511 |
– |
|
512 |
– |
if (bright(skycolor) <= 1e-4) { /* 0 sky component? */ |
513 |
– |
memset(parr, 0, sizeof(float)*3*nskypatch); |
514 |
– |
return; |
515 |
– |
} |
590 |
|
|
591 |
|
/* Calculate atmospheric precipitable water content */ |
592 |
|
apwc = CalcPrecipWater(dew_point); |
593 |
|
|
594 |
< |
/* Limit solar altitude to keep circumsolar off zenith */ |
595 |
< |
if (altitude > DegToRad(87.0)) |
596 |
< |
altitude = DegToRad(87.0); |
594 |
> |
/* Calculate sun zenith angle (don't let it dip below horizon) */ |
595 |
> |
/* Also limit minimum angle to keep circumsolar off zenith */ |
596 |
> |
if (altitude <= 0.0) |
597 |
> |
sun_zenith = DegToRad(90.0); |
598 |
> |
else if (altitude >= DegToRad(87.0)) |
599 |
> |
sun_zenith = DegToRad(3.0); |
600 |
> |
else |
601 |
> |
sun_zenith = DegToRad(90.0) - altitude; |
602 |
|
|
524 |
– |
/* Calculate sun zenith angle */ |
525 |
– |
sun_zenith = DegToRad(90.0) - altitude; |
526 |
– |
|
603 |
|
/* Compute the inputs for the calculation of the sky distribution */ |
604 |
|
|
605 |
|
if (input == 0) /* XXX never used */ |
618 |
|
sky_brightness = CalcSkyBrightness(); |
619 |
|
sky_clearness = CalcSkyClearness(); |
620 |
|
|
621 |
+ |
/* Limit sky clearness */ |
622 |
+ |
if (sky_clearness > 11.9) |
623 |
+ |
sky_clearness = 11.9; |
624 |
+ |
|
625 |
+ |
/* Limit sky brightness */ |
626 |
+ |
if (sky_brightness < 0.01) |
627 |
+ |
sky_brightness = 0.01; |
628 |
+ |
|
629 |
|
/* Calculate illuminance */ |
630 |
|
index = GetCategoryIndex(); |
631 |
|
diff_illum = diff_irrad * CalcDiffuseIllumRatio(index); |
637 |
|
index = CalcSkyParamFromIllum(); |
638 |
|
} |
639 |
|
|
640 |
+ |
if (output == 1) { /* hack for solar radiance */ |
641 |
+ |
diff_illum = diff_irrad * WHTEFFICACY; |
642 |
+ |
dir_illum = dir_irrad * WHTEFFICACY; |
643 |
+ |
} |
644 |
+ |
|
645 |
+ |
if (bright(skycolor) <= 1e-4) { /* 0 sky component? */ |
646 |
+ |
memset(parr, 0, sizeof(float)*3*nskypatch); |
647 |
+ |
return; |
648 |
+ |
} |
649 |
|
/* Compute ground radiance (include solar contribution if any) */ |
650 |
< |
parr[0] = diff_illum * (1./PI/WHTEFFICACY); |
650 |
> |
parr[0] = diff_illum; |
651 |
|
if (altitude > 0) |
652 |
< |
parr[0] += dir_illum * sin(altitude) * (1./PI/WHTEFFICACY); |
653 |
< |
parr[2] = parr[1] = parr[0]; |
652 |
> |
parr[0] += dir_illum * sin(altitude); |
653 |
> |
parr[2] = parr[1] = parr[0] *= (1./PI/WHTEFFICACY); |
654 |
> |
multcolor(parr, grefl); |
655 |
|
|
656 |
|
/* Calculate Perez sky model parameters */ |
657 |
|
CalcPerezParam(sun_zenith, sky_clearness, sky_brightness, index); |
662 |
|
/* Calculate relative horizontal illuminance */ |
663 |
|
norm_diff_illum = CalcRelHorzIllum(parr); |
664 |
|
|
665 |
+ |
/* Check for zero sky -- make uniform in that case */ |
666 |
+ |
if (norm_diff_illum <= FTINY) { |
667 |
+ |
for (i = 1; i < nskypatch; i++) |
668 |
+ |
setcolor(parr+3*i, 1., 1., 1.); |
669 |
+ |
norm_diff_illum = PI; |
670 |
+ |
} |
671 |
|
/* Normalization coefficient */ |
672 |
|
norm_diff_illum = diff_illum / norm_diff_illum; |
673 |
|
|
574 |
– |
/* Calculate relative zenith luminance */ |
575 |
– |
zlumin = CalcRelLuminance(sun_zenith, 0.0); |
576 |
– |
|
577 |
– |
/* Calculate absolute zenith illuminance */ |
578 |
– |
zlumin *= norm_diff_illum; |
579 |
– |
|
674 |
|
/* Apply to sky patches to get absolute radiance values */ |
675 |
|
for (i = 1; i < nskypatch; i++) { |
676 |
< |
scalecolor(parr+3*i, zlumin*(1./WHTEFFICACY)); |
676 |
> |
scalecolor(parr+3*i, norm_diff_illum*(1./WHTEFFICACY)); |
677 |
|
multcolor(parr+3*i, skycolor); |
678 |
|
} |
679 |
|
} |
683 |
|
AddDirect(float *parr) |
684 |
|
{ |
685 |
|
FVECT svec; |
686 |
< |
double near_dprod[4]; |
687 |
< |
int near_patch[4]; |
688 |
< |
double wta[4], wtot; |
686 |
> |
double near_dprod[NSUNPATCH]; |
687 |
> |
int near_patch[NSUNPATCH]; |
688 |
> |
double wta[NSUNPATCH], wtot; |
689 |
|
int i, j, p; |
690 |
|
|
691 |
< |
if (!do_sun || dir_illum < 1e-4) |
691 |
> |
if (dir_illum <= 1e-4 || bright(suncolor) <= 1e-4) |
692 |
|
return; |
693 |
< |
/* identify 4 closest patches */ |
694 |
< |
for (i = 4; i--; ) |
693 |
> |
/* identify nsuns closest patches */ |
694 |
> |
if (nsuns > NSUNPATCH) |
695 |
> |
nsuns = NSUNPATCH; |
696 |
> |
else if (nsuns <= 0) |
697 |
> |
nsuns = 1; |
698 |
> |
for (i = nsuns; i--; ) |
699 |
|
near_dprod[i] = -1.; |
700 |
|
vector(svec, altitude, azimuth); |
701 |
|
for (p = 1; p < nskypatch; p++) { |
703 |
|
double dprod; |
704 |
|
rh_vector(pvec, p); |
705 |
|
dprod = DOT(pvec, svec); |
706 |
< |
for (i = 0; i < 4; i++) |
706 |
> |
for (i = 0; i < nsuns; i++) |
707 |
|
if (dprod > near_dprod[i]) { |
708 |
< |
for (j = 4; --j > i; ) { |
708 |
> |
for (j = nsuns; --j > i; ) { |
709 |
|
near_dprod[j] = near_dprod[j-1]; |
710 |
|
near_patch[j] = near_patch[j-1]; |
711 |
|
} |
715 |
|
} |
716 |
|
} |
717 |
|
wtot = 0; /* weight by proximity */ |
718 |
< |
for (i = 4; i--; ) |
718 |
> |
for (i = nsuns; i--; ) |
719 |
|
wtot += wta[i] = 1./(1.002 - near_dprod[i]); |
720 |
|
/* add to nearest patch radiances */ |
721 |
< |
for (i = 4; i--; ) |
722 |
< |
parr[near_patch[i]] += wta[i] * dir_illum / |
723 |
< |
(wtot * rh_dom[near_patch[i]]); |
721 |
> |
for (i = nsuns; i--; ) { |
722 |
> |
float *pdest = parr + 3*near_patch[i]; |
723 |
> |
float val_add = wta[i] * dir_illum / (WHTEFFICACY * wtot); |
724 |
> |
|
725 |
> |
val_add /= (fixed_sun_sa > 0) ? fixed_sun_sa |
726 |
> |
: rh_dom[near_patch[i]] ; |
727 |
> |
*pdest++ += val_add*suncolor[0]; |
728 |
> |
*pdest++ += val_add*suncolor[1]; |
729 |
> |
*pdest++ += val_add*suncolor[2]; |
730 |
> |
} |
731 |
|
} |
732 |
|
|
733 |
|
/* Initialize Reinhart sky patch positions (GW) */ |
761 |
|
for (i = 0; i < NROW*rhsubdiv; i++) { |
762 |
|
const float ralt = alpha*(i + .5); |
763 |
|
const int ninrow = tnaz[i/rhsubdiv]*rhsubdiv; |
764 |
< |
const float dom = (sin(alpha*(i+1)) - sin(alpha*i))/ninrow; |
764 |
> |
const float dom = 2.*PI*(sin(alpha*(i+1)) - sin(alpha*i)) / |
765 |
> |
(double)ninrow; |
766 |
|
for (j = 0; j < ninrow; j++) { |
767 |
|
rh_palt[p] = ralt; |
768 |
|
rh_pazi[p] = 2.*PI * j / (double)ninrow; |
867 |
|
double sz_cubed; /* Sun zenith angle cubed */ |
868 |
|
|
869 |
|
/* Calculate sun zenith angle cubed */ |
870 |
< |
sz_cubed = pow(sun_zenith, 3.0); |
870 |
> |
sz_cubed = sun_zenith*sun_zenith*sun_zenith; |
871 |
|
|
872 |
|
return ((diff_irrad + dir_irrad) / diff_irrad + 1.041 * |
873 |
|
sz_cubed) / (1.0 + 1.041 * sz_cubed); |
898 |
|
double CalcDirectIrradiance() |
899 |
|
{ |
900 |
|
return CalcDiffuseIrradiance() * ((sky_clearness - 1.0) * (1 + 1.041 |
901 |
< |
* pow(sun_zenith, 3.0))); |
901 |
> |
* sun_zenith*sun_zenith*sun_zenith)); |
902 |
|
} |
903 |
|
|
904 |
|
/* Calculate sky brightness and clearness from illuminance values */ |
924 |
|
sky_clearness = 12.0; |
925 |
|
|
926 |
|
/* Limit sky brightness */ |
927 |
< |
if (sky_brightness < 0.05) |
927 |
> |
if (sky_brightness < 0.01) |
928 |
|
sky_brightness = 0.01; |
929 |
|
|
930 |
|
while (((fabs(diff_irrad - test1) > 10.0) || |
948 |
|
sky_clearness = 12.0; |
949 |
|
|
950 |
|
/* Limit sky brightness */ |
951 |
< |
if (sky_brightness < 0.05) |
951 |
> |
if (sky_brightness < 0.01) |
952 |
|
sky_brightness = 0.01; |
953 |
|
} |
954 |
|
|
1034 |
|
double rh_illum = 0.0; /* Relative horizontal illuminance */ |
1035 |
|
|
1036 |
|
for (i = 1; i < nskypatch; i++) |
1037 |
< |
rh_illum += parr[3*i+1] * rh_cos(i); |
1037 |
> |
rh_illum += parr[3*i+1] * rh_cos(i) * rh_dom[i]; |
1038 |
|
|
1039 |
< |
return rh_illum * (2.0 * PI / (nskypatch-1)); |
1039 |
> |
return rh_illum; |
1040 |
|
} |
1041 |
|
|
1042 |
|
/* Calculate earth orbit eccentricity correction factor */ |