--- ray/src/gen/gendaylit.c 2009/06/15 22:27:21 2.2 +++ ray/src/gen/gendaylit.c 2011/08/16 18:09:53 2.6 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: gendaylit.c,v 2.2 2009/06/15 22:27:21 greg Exp $"; +static const char RCSid[] = "$Id: gendaylit.c,v 2.6 2011/08/16 18:09:53 greg Exp $"; #endif /* Copyright (c) 1994 *Fraunhofer Institut for Solar Energy Systems * Oltmannstr 5, D-79100 Freiburg, Germany @@ -43,6 +43,7 @@ double normsc(); /* Perez sky parametrization : epsilon and delta calculations from the direct and diffuse irradiances */ double sky_brightness(); double sky_clearness(); +void computesky(); /* calculation of the direct and diffuse components from the Perez parametrization */ double diffus_irradiance_from_sky_brightness(); @@ -273,16 +274,16 @@ char *argv[]; } +void computesky() /* compute sky parameters */ { /* new variables */ - int j, i; + int j; float *lv_mod; /* 145 luminance values*/ /* 145 directions for the calculation of the normalization coefficient, coefficient Perez model */ float *theta_o, *phi_o, *coeff_perez; double dzeta, gamma; - double diffusion; double normfactor; @@ -472,8 +473,10 @@ computesky() /* compute sky parameters */ /* Compute the ground radiance */ zenithbr=calc_rel_lum_perez(0.0,radians(sunzenith),radians(sunzenith),skyclearness,skybrightness,coeff_perez); zenithbr*=diffnormalization; +/* fprintf(stderr, "gendaylit : the actual zenith radiance(W/m^2/sr) or luminance(cd/m^2) is : %.0lf\n", zenithbr); - +*/ + if (skyclearness==1) normfactor = 0.777778;