Go to the documentation of this file.
   15     int32_t nq = 
l1que.nq;
 
   18         for (
i = 0; 
i < nq; 
i++)
 
   35         printf(
"Queue size limit of %d exceeded: %d\n", 
NQMAX, nq);
 
   40     l1que->nq = (nq / 2)*2 + 1;
 
   43     for (
i = 0; 
i < nq; 
i++) {
 
   46                     "-E- %s line %d: Memory allocation failure at L1B scan %d.\n",
 
   47                     __FILE__, __LINE__, 
i);
 
   64     int32_t nq = 
l1que.nq;
 
   66     int32_t fscan = 
iscan - nq / 2;
 
   67     int32_t lscan = 
iscan + nq / 2;
 
   70     if (iscan < 0 || iscan > 
l1file->nscan)
 
   71         return (EXIT_FAILURE);
 
   80         for (
i = fscan; 
i <= lscan; 
i++) {
 
   84                 return (EXIT_FAILURE);
 
   86                 return (EXIT_FAILURE);
 
   94         memcpy(&
tmp, &
l1que.r[0], sizeof (l1str));
 
   95         for (iq = 1; iq < nq; iq++)
 
   96             memcpy(&
l1que.r[iq - 1], &
l1que.r[iq], sizeof (l1str));
 
   97         memcpy(&
l1que.r[nq - 1], &
tmp, sizeof (l1str));
 
  104             return (EXIT_FAILURE);
 
  106             return (EXIT_FAILURE);
 
  116     static int firstcall = 1;
 
  119     float *wave = 
l1rec->l1file->fwave;
 
  131     static float *Lt_scan;
 
  134         Lt_scan = (
float*) malloc(
npix * 
nbands * 
sizeof (
float));
 
  143             if (
j == ib325 || 
j == ib340)
 
  145             else if (
j == ib865) {
 
  147                 for (
k = 
j - 4; 
k <= 
j + 4; 
k++)
 
  148                     templt += Lt_scan[ipb + 
k];
 
  149                 l1rec->Lt[ipb + 
j] = templt / 9.0;
 
  150             } 
else if (
j == ib665 || 
j == ib680 || 
j == ib750) {
 
  151                 l1rec->Lt[ipb + 
j] = (Lt_scan[ipb + 
j - 1] + Lt_scan[ipb + 
j]) / 2.0;
 
  154                     l1rec->Lt[ipb + 
j] = (2 * Lt_scan[ipb + 
j] + Lt_scan[ipb + 
j + 1]) / 3.0;                    
 
  156                     l1rec->Lt[ipb + 
j] = (Lt_scan[ipb + 
j - 1] + 2 * Lt_scan[ipb + 
j]) / 3.0;
 
  158                     l1rec->Lt[ipb + 
j] = (Lt_scan[ipb + 
j - 1] + Lt_scan[ipb + 
j] + Lt_scan[ipb + 
j + 1]) / 3.0;
 
  170     static int32_t 
npix = -1;
 
  171     static int32_t nq = -1;
 
  180     crec = &
l1que.r[nq / 2];
 
  195             printf(
"-E- %s: Unable to allocate L1B record queue.\n",
 
  197             return (EXIT_FAILURE);
 
  202         if(
l1rec->uncertainty){
 
  203             for(iq=0;iq<nq;iq++){
 
  204                 l1que.r[iq].uncertainty= (uncertainty_t*) malloc(
sizeof (uncertainty_t));
 
  206                     printf(
"-E- %s: Unable to allocate error record.\n",__FILE__);
 
  215         printf(
"-E- %s %d: Error reading %s at scan %d.\n",
 
  217         return (EXIT_FAILURE);
 
  224     if (
input->fctl.nfilt > 0) {
 
  228         for (ip = 0; ip < 
npix; ip++)
 
  234     if(
l1rec->uncertainty){
 
  
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
 
int readl1(filehandle *l1file, int32_t recnum, l1str *l1rec)
 
void cpl1rec(l1str *dest, l1str *src)
 
int32_t alloc_l1q(int32_t nq, filehandle *l1file, l1qstr *l1que)
 
void l1_mask_set(l1str *l1rec, int32_t ip)
 
int loadl1q(filehandle *l1file, int32_t iscan, int32_t dscan)
 
void lt_agregat_ocis(l1str *l1rec)
 
INT32 getl1rec(INT16 sceneFrameNum, swl0scene *scene, swl0ctl *l0ctl, input_sType navinp[], navblk_sType navblk[], tilt_states_sType *tiltblk, swl1rec l1rec[])
 
void init_uncertainty(uncertainty_t *uncertainty, int ifscan)
 
void filter(fctlstr *fctl, l1qstr *l1que, l1str *l1rec, int32_t dscan)
 
void free_l1(l1str *l1rec)
 
int windex(float wave, float twave[], int ntwave)
 
float * get_uncertainty(l1str *l1rec)
 
int32_t alloc_l1(filehandle *l1file, l1str *l1rec)
 
void setflagbits_l1(int level, l1str *l1rec, int32_t ipix)
 
int loadl1(filehandle *l1file, l1str *l1rec)
 
int alloc_uncertainty(int32_t nbands, int32_t nbands_ac, int32_t npix, uncertainty_t *uncertainty)
 
void seawater_set(l1str *l1rec)