00001
00002
00003 int heightformation(int FID, double OBSVR, float *CDELT1, float *RSUN, float *CRPIX1, float *CRPIX2, float CROTA2)
00004 {
00005 int wl=0;
00006 int status=0;
00007 float correction=0.0,correction2=0.0;
00008
00009 wl = (FID/10)%20;
00010
00011 if( (wl >= 0) && (wl < 20) )
00012 {
00013 correction = 0.445*exp(-(wl-10.-(float)OBSVR/(0.690/6173.*3.e8/20.)-0.25)*(wl-10.-(float)OBSVR/(0.690/6173.*3.e8/20.)-0.25)/7.1);
00014 correction2 = 0.39*(-2.0*(wl-10.- (float)OBSVR/(0.690/6173.*3.e8/20.)-0.35)/6.15)*exp(-(wl-10.-(float)OBSVR/(0.690/6173.*3.e8/20.)-0.35)*(wl-10.-(float)OBSVR/(0.690/6173.*3.e8/20.)-0.35)/6.15);
00015
00016 *CDELT1 = *CDELT1*(*RSUN)/((*RSUN)-correction);
00017 *RSUN = *RSUN-correction;
00018 *CRPIX1 = *CRPIX1-cos(M_PI-CROTA2*M_PI/180.)*correction2;
00019 *CRPIX2 = *CRPIX2-sin(M_PI-CROTA2*M_PI/180.)*correction2;
00020 }
00021 else status=1;
00022
00023 return status;
00024 }