53 |
|
int argc; |
54 |
|
char *argv[]; |
55 |
|
{ |
56 |
< |
extern double atof(); |
56 |
> |
extern double atof(), fabs(); |
57 |
|
int i; |
58 |
|
|
59 |
|
progname = argv[0]; |
102 |
|
else |
103 |
|
userror("bad option"); |
104 |
|
|
105 |
+ |
if (fabs(s_meridian-s_longitude) > 30*PI/180) |
106 |
+ |
fprintf(stderr, |
107 |
+ |
"%s: warning: %.1f hours btwn. standard meridian and longitude\n", |
108 |
+ |
progname, (s_longitude-s_meridian)*12/PI); |
109 |
+ |
|
110 |
|
printhead(argc, argv); |
111 |
|
|
112 |
|
computesky(); |
133 |
|
if (zenithbr <= 0.0) |
134 |
|
if (cloudy) { |
135 |
|
zenithbr = 8.6*sundir[2] + .123; |
136 |
< |
zenithbr *= 1000.0/683.0; |
136 |
> |
zenithbr *= 1000.0*.0064/3.; |
137 |
|
} else { |
138 |
|
zenithbr = (1.376*turbidity-1.81)*tan(altitude)+0.38; |
139 |
< |
zenithbr *= 1000.0/683.0; |
139 |
> |
zenithbr *= 1000.0*.0064/3.; |
140 |
|
} |
141 |
+ |
if (zenithbr < 0.0) |
142 |
+ |
zenithbr = 0.0; |
143 |
|
/* Compute horizontal radiance */ |
144 |
|
if (cloudy) { |
145 |
|
groundbr = zenithbr*0.777778; |
164 |
|
|
165 |
|
printsky() /* print out sky */ |
166 |
|
{ |
160 |
– |
register int i; |
161 |
– |
|
167 |
|
if (dosun) { |
168 |
|
printf("\nvoid light solar\n"); |
169 |
|
printf("0\n0\n"); |