| 71 |
|
typedef struct { |
| 72 |
|
int type; /* RECT, DISK, SPHERE */ |
| 73 |
|
double w, l, h; /* width, length, height */ |
| 74 |
< |
double area; /* effective radiating area */ |
| 74 |
> |
double area; /* max. projected area */ |
| 75 |
|
} SHAPE; /* a source shape */ |
| 76 |
|
|
| 77 |
|
int gargc; /* global argc (minus filenames) */ |
| 79 |
|
|
| 80 |
|
extern char *strcpy(), *strcat(), *stradd(), *tailtrunc(), *filetrunc(), |
| 81 |
|
*filename(), *libname(), *fullname(), *malloc(); |
| 82 |
– |
extern double atof(); |
| 82 |
|
extern float *matchlamp(); |
| 83 |
|
|
| 84 |
|
|
| 550 |
|
perror(buf); |
| 551 |
|
return(-1); |
| 552 |
|
} |
| 553 |
< |
if (cvdata(in, datout, 2, nangles, 1./683., bounds) != 0) { |
| 553 |
> |
if (cvdata(in, datout, 2, nangles, 1./WHTEFFICACY, bounds) != 0) { |
| 554 |
|
fprintf(stderr, "dosource: bad distribution data\n"); |
| 555 |
|
fclose(datout); |
| 556 |
|
unlink(fullname(buf,name,T_DST)); |
| 695 |
|
shp->area = shp->w * shp->l; |
| 696 |
|
break; |
| 697 |
|
case DISK: |
| 698 |
+ |
case SPHERE: |
| 699 |
|
shp->area = PI/4. * shp->w * shp->w; |
| 700 |
|
break; |
| 701 |
– |
case SPHERE: |
| 702 |
– |
shp->area = PI * shp->w * shp->w; |
| 703 |
– |
break; |
| 701 |
|
} |
| 702 |
|
return(0); |
| 703 |
|
} |
| 806 |
|
int ndim, npts[]; |
| 807 |
|
double mult, lim[][2]; |
| 808 |
|
{ |
| 809 |
< |
register double *pt[4]; |
| 809 |
> |
double *pt[4]; |
| 810 |
|
register int i, j; |
| 811 |
|
double val; |
| 812 |
|
int total; |