76 |
|
/* photometric types */ |
77 |
|
#define PM_C 1 |
78 |
|
#define PM_B 2 |
79 |
+ |
#define PM_A 3 |
80 |
|
/* unit types */ |
81 |
|
#define U_FEET 1 |
82 |
|
#define U_METERS 2 |
700 |
|
fprintf(stderr, "dosource: bad lamp specification\n"); |
701 |
|
return(-1); |
702 |
|
} |
703 |
+ |
if (pmtype != PM_C && pmtype != PM_B) { |
704 |
+ |
fprintf(stderr, "dosource: unsupported photometric type (%d)\n", |
705 |
+ |
pmtype); |
706 |
+ |
return(-1); |
707 |
+ |
} |
708 |
|
sinf->mult = multiplier*mult*bfactor*pfactor; |
709 |
|
if (nangles[0] < 2 || nangles[1] < 1) { |
710 |
|
fprintf(stderr, "dosource: too few measured angles\n"); |
756 |
|
else |
757 |
|
fprintf(out, "srcB_horiz "); |
758 |
|
fprintf(out, "srcB_vert "); |
759 |
< |
} else /* pmtype == PM_A */ { |
759 |
> |
} else /* pmtype == PM_C */ { |
760 |
|
if (nangles[1] >= 2) { |
761 |
|
d1 = bounds[1][1] - bounds[1][0]; |
762 |
|
if (d1 <= 90.+FTINY) |
1145 |
|
strcpy(buf, "mgf2rad "); /* build mgf2rad command */ |
1146 |
|
cp = buf+8; |
1147 |
|
if (!FEQ(sinf->mult, 1.0)) { |
1148 |
< |
sprintf(cp, "-m %f ", sinf->mult); |
1148 |
> |
sprintf(cp, "-e %f ", sinf->mult); |
1149 |
|
cp += strlen(cp); |
1150 |
|
} |
1151 |
|
sprintf(cp, "-g %f %s ", |