diff --git a/image.c b/image.c index 48e4522..e333d65 100644 --- a/image.c +++ b/image.c @@ -32,8 +32,8 @@ double cf[REGORDER+1] ; static void rgcomp(double x[16], rgparam *rgpr) { -/*{ 0.106,0.215,0.324,0.434,0.542,0.652,0.78,0.87 ,0.0 }; */ -const double y[9] = { 31.1,63.0,95.0,127.2,158.9,191.1,228.6,255.0, 0.0 }; +/*{ 0.106,0.215,0.324,0.433,0.542,0.652,0.78,0.87 ,0.0 }; */ +const double y[9] = { 31.07,63.02,94.96,126.9,158.86,191.1,228.62,255.0, 0.0 }; extern void polyreg(const int m,const int n,const double x[],const double y[],double c[]); polyreg(REGORDER,9,x,y,rgpr->cf); @@ -60,7 +60,6 @@ int Calibrate(float **prow,int nrow,int offset) { double teleline[3000]; -double csline[3000]; double wedge[16]; rgparam regr[30]; int n; @@ -77,13 +76,10 @@ for(n=0;n50.0) { - Cs+=csline[j]; + for(Cs=0.0,i=0,j=n;j50.0) { + Cs+=csline; i++; + } } - Cs/=128; + Cs/=i; Cs=rgcal(Cs,&(regr[k])); } } @@ -156,7 +160,7 @@ for(n=0;nch].A)/satcal[satnum].rad[rgpr->ch].B; - /* rescale to range 0-255 for -60-+40 °C */ - T=(T-273.15+60)/100*255.0; + /* rescale to range 0-255 for +40-60 °C */ + T=(-T+273.15+40)/100.0*255.0; return(T); } @@ -282,7 +286,7 @@ for(n=0;n