NASA Logo
Ocean Color Science Software

ocssw V2022
swl0_utils.c
Go to the documentation of this file.
1 /* ============================================================== */
2 /* Module: swl0_utils.c */
3 /* Purpose: Utilities for manipulating seawifs L0 data. */
4 /* Author: B.A. Franz, General Scences Corp., 9/97 */
5 /* ============================================================== */
6 
7 #include <stdio.h>
8 #include <sys/types.h>
9 #include <sys/stat.h>
10 #include <time.h>
11 #include <math.h>
12 #include "swl0_proto.h"
13 
14 #define TIMELEN 25
15 
16 /* -------------------------------------------------------------- */
17 /* scid2mnftype() - decoms the spacecraft ID to minor frame type */
18 
19 /* -------------------------------------------------------------- */
21  return (scid[1] & 0x000F);
22 }
23 
24 
25 /* -------------------------------------------------------------- */
26 /* scid2mnftype() - decoms the spacecraft ID to minor frame numb */
27 
28 /* -------------------------------------------------------------- */
30  return ( (scid[0] & 0x0180) >> 7);
31 }
32 
33 
34 /* -------------------------------------------------------------- */
35 /* ttag2unix() - converts seawifs timetags to secs since 1/1/70 */
36 
37 /* -------------------------------------------------------------- */
39  FLOAT64 sec = 7.2688320e8; /* secs from 1/1/70 to 1/13/93 */
40  INT32 day = 0;
41  INT32 msec = 0;
42 
43  day = ttag[0] << 3 | ttag[1] >> 7;
44  msec = (ttag[1] & 0x7F) << 20 | (ttag[2] << 10) | ttag[3];
45  sec += ((double) day) * 86400.0 + ((double) msec) / 1000.0;
46 
47  return sec;
48 }
49 
50 
51 /* -------------------------------------------------------------- */
52 /* unix2timeStr() - converts secs since 1/1/70 to timedate string */
53 
54 /* -------------------------------------------------------------- */
55 char *unix2timeStr(FLOAT64 usec) {
56  struct tm *trec;
57  time_t utime = (time_t) usec;
58  static char timeStr[TIMELEN];
59 
60  trec = gmtime(&utime);
61  strftime(timeStr, TIMELEN, "%b %d %Y %H:%M:%S:000", trec);
62 
63  return (timeStr);
64 }
65 
66 
67 /* -------------------------------------------------------------- */
68 /* ttag2ydmsec() - converts seawifs timetags to year, day, msec */
69 
70 /* -------------------------------------------------------------- */
71 void ttag2ydmsec(INT16 ttag[], INT16 *year, INT16 *day, INT32 *msec) {
72  INT32 jday; /* julian day number */
73  INT32 rday; /* reference day number */
74 
75  *msec = (ttag[1] & 0x7F) << 20 | (ttag[2] << 10) | ttag[3];
76  jday = (ttag[0] << 3 | ttag[1] >> 7) + 2449001;
77 
78  /* The following was taken from jdate.f of F. S. Patt */
79  rday = jday - 2415020; /* Days since January 0, 1900 */
80  *year = 4 * rday / 1461; /* Years since 1900 */
81 
82  *day = rday - 1461 * (*year - 1) / 4 - 365;
83  *year += 1900;
84 
85  return;
86 }
87 
88 
89 /* -------------------------------------------------------------- */
90 /* timeError() - returns > 0 if any time error flag is set. */
91 
92 /* -------------------------------------------------------------- */
93 BYTE timeError(swl0indx *indx, INT32 irec) {
94  return ( indx->rec[irec].tRanError ||
95  indx->rec[irec].tSeqError ||
96  indx->rec[irec].tDifError);
97 }
98 
99 
100 /* -------------------------------------------------------------- */
101 /* timeSeqError() - returns > 0 if timetags not increasing. Only */
102 /* identifies single-frame sequence errors. */
103 
104 /* -------------------------------------------------------------- */
105 BYTE timeSeqError(swl0indx *indx, INT32 irec) {
106  INT32 i1 = MAX(irec - 1, 0);
107  INT32 i2 = irec;
108  INT32 i3 = MIN(irec + 1, indx->nrecs - 1);
109 
110  if (irec < 0 || irec >= indx->nrecs)
111  return (0);
112 
113  /* Use times that were previously unflagged, if possible. */
114  while (i1 > 0 && timeError(indx, i1)) i1--;
115  while (i3 < indx->nrecs - 1 && timeError(indx, i3)) i3++;
116 
117  /* Don't attempt test if frames are already flagged */
118  if (timeError(indx, i1) || timeError(indx, i2) || timeError(indx, i3))
119  return (0);
120 
121  /* Frame type must be consistent for this test. */
122  if (indx->type != HRPT &&
123  (indx->rec[i2].mnftype != indx->rec[i1].mnftype ||
124  indx->rec[i2].mnftype != indx->rec[i3].mnftype)) {
125  return (0);
126  }
127 
128  /* Check for large deviations at start and end frames */
129  if ((irec == 0) &&
130  (indx->rec[i3].time - indx->rec[i2].time > DELSCENEGAC))
131  return (1);
132  if ((irec == indx->nrecs - 1) &&
133  (indx->rec[i2].time - indx->rec[i1].time > DELSCENEGAC))
134  return (1);
135  if ((irec == 0) &&
136  (indx->rec[i3].time - indx->rec[i2].time <= 0))
137  return (1);
138  if ((irec == indx->nrecs - 1) &&
139  (indx->rec[i2].time - indx->rec[i1].time <= 0))
140  return (1);
141 
142  /* Bounding times must be sequential for test to be valid. We don't */
143  /* to flag the wrong frame. */
144  if (indx->rec[i3].time < indx->rec[i1].time)
145  return (0);
146 
147  /* General case */
148  if ((indx->rec[i2].time < indx->rec[i1].time) ||
149  (indx->rec[i2].time > indx->rec[i3].time) ||
150  ((i1 != i2) && (indx->rec[i2].time == indx->rec[i1].time)))
151 
152  return (1);
153 
154  return (0);
155 }
156 
157 
158 /* -------------------------------------------------------------- */
159 /* timeContiguous() - returns 1 if timetags are contiguous */
160 
161 /* -------------------------------------------------------------- */
162 BYTE timeContiguous(swl0indx *indx, INT32 irec) {
163  INT32 i1;
164  INT32 i2;
165  INT32 i3;
166  FLOAT64 DelTime;
167  FLOAT64 tdiff1;
168  FLOAT64 tdiff2;
169 
170  if (irec < 0 || irec >= indx->nrecs)
171  return (0);
172 
173  /* Determine appropriate center and bounding indices */
174  if (irec == 0) {
175  i1 = 0;
176  i2 = MIN(1, indx->nrecs - 1);
177  i3 = MIN(2, indx->nrecs - 1);
178  } else if (irec == indx->nrecs - 1) {
179  i3 = indx->nrecs - 1;
180  i2 = MAX(i3 - 1, 0);
181  i1 = MAX(i3 - 2, 0);
182  } else {
183  i1 = MAX(irec - 1, 0);
184  i2 = irec;
185  i3 = MIN(irec + 1, indx->nrecs - 1);
186  }
187 
188  /* Frame must be (thus far) free of timing errors */
189  if (timeError(indx, i1) || timeError(indx, i2) || timeError(indx, i3)) {
190  printf("Previous timing error(s) at frame %d\n", irec);
191  return (0);
192  }
193 
194  /* Frame SCID field must be valid */
195  if (indx->rec[i1].scidError ||
196  indx->rec[i2].scidError ||
197  indx->rec[i3].scidError) {
198  printf("Previous SCID error(s) at frame %d\n", irec);
199  return (0);
200  }
201 
202  /* Frame type must be consistent as well. */
203  if (indx->rec[i2].mnftype != indx->rec[i1].mnftype ||
204  indx->rec[i2].mnftype != indx->rec[i3].mnftype) {
205  printf("Inconsistent frame types at frame %d\n", irec);
206  return (0);
207  }
208 
209  /* Determine expected time difference between frames */
210  if (indx->rec[i2].mnftype == GACTYPE)
211  DelTime = DTGAC;
212  else
213  DelTime = DTLAC;
214 
215  /* Compute actual differences */
216  tdiff1 = indx->rec[i2].time - indx->rec[i1].time;
217  tdiff2 = indx->rec[i3].time - indx->rec[i2].time;
218 
219  /* Check center time relative to bounding frames */
220  if (tdiff1 > DelTime - CLOCKVAR &&
221  tdiff1 < DelTime + CLOCKVAR &&
222  tdiff2 > DelTime - CLOCKVAR &&
223  tdiff2 < DelTime + CLOCKVAR)
224  return (1);
225  else {
226  printf("%d %lf %lf\n", irec, tdiff1, tdiff2);
227  return (0);
228  }
229 }
230 
231 
232 /* -------------------------------------------------------------- */
233 /* timeConsistent() - returns 0 if timetag differences are not */
234 /* multiples of expected frame rate */
235 /* Note that this will not detect shifts, as it looks for timetag */
236 /* which is inconsistent with the preceeding and following times */
237 
238 /* -------------------------------------------------------------- */
239 BYTE timeConsistent(swl0indx *indx, INT32 irec) {
240  INT32 i1;
241  INT32 i2;
242  INT32 i3;
243  FLOAT64 DelTime;
244  FLOAT64 DelScene;
245  FLOAT64 tdiff1;
246  FLOAT64 tdiff2;
247  FLOAT64 terror1;
248  FLOAT64 terror2;
249 
250  if (irec < 0 || irec >= indx->nrecs)
251  return (1);
252 
253  /* Determine appropriate center and bounding indices */
254  if (irec == 0) {
255  i1 = 0;
256  i2 = MIN(1, indx->nrecs - 1);
257  i3 = MIN(2, indx->nrecs - 1);
258  } else if (irec == indx->nrecs - 1) {
259  i3 = indx->nrecs - 1;
260  i2 = MAX(i3 - 1, 0);
261  i1 = MAX(i3 - 2, 0);
262  } else {
263  i1 = MAX(irec - 1, 0);
264  i2 = irec;
265  i3 = MIN(irec + 1, indx->nrecs - 1);
266  }
267 
268  /* Avoid time difference test across frame type changes. */
269  if (indx->rec[i2].mnftype == GACTYPE &&
270  (indx->rec[i3].mnftype != indx->rec[i1].mnftype)) {
271  return (1);
272  }
273 
274  /* Determine expected time difference between frames */
275  if (indx->rec[i2].mnftype == GACTYPE) {
276  DelTime = DTGAC;
277  DelScene = DELSCENEGAC;
278  } else {
279  DelTime = DTLAC;
280  DelScene = DELSCENELAC;
281  }
282 
283  /* Compute actual differences */
284  tdiff1 = indx->rec[i2].time - indx->rec[i1].time;
285  tdiff2 = indx->rec[i3].time - indx->rec[i2].time;
286 
287  /* Avoid consistency check across scene breaks, GAC/LAC files only */
288  if (indx->type == GAC && (tdiff1 > DelScene || tdiff2 > DelScene))
289  return (1);
290 
291  /* Compute residual error */
292  terror1 = fmod(tdiff1, DelTime);
293  terror2 = fmod(tdiff2, DelTime);
294  terror1 = ABS(terror1);
295  terror2 = ABS(terror2);
296  if (terror1 > DelTime / 2) terror1 = ABS(terror1 - DelTime);
297  if (terror2 > DelTime / 2) terror2 = ABS(terror2 - DelTime);
298 
299  /* Check error relative to allowed clock variance. We require time */
300  /* error on both sides of the center frame, as we want to avoid */
301  /* flagging both frames across a time shift. */
302 
303  if (tdiff1 == 0.0 || (terror1 > CLOCKVAR && terror2 > CLOCKVAR)) {
304  printf("Time Difference Error at Frame %d: %lf %lf %lf\n",
305  irec, tdiff1, terror1, terror2);
306  return (0);
307  } else {
308  return (1);
309  }
310 }
311 
312 
313 /* -------------------------------------------------------------- */
314 /* timeShifted() - returns 0 if timetag differences are not */
315 /* multiples of expected frame rate */
316 
317 /* -------------------------------------------------------------- */
318 BYTE timeShifted(swl0indx *indx, INT32 irec, FLOAT64 *shiftval) {
319  INT32 i1;
320  INT32 i2;
321  INT32 i3;
322  FLOAT64 DelTime;
323  FLOAT64 DelScene;
324  FLOAT64 tdiff1;
325  FLOAT64 tdiff2;
326  FLOAT64 terror1;
327  FLOAT64 terror2;
328 
329  *shiftval = 0.0;
330 
331  if (irec < 0 || irec >= indx->nrecs)
332  return (1);
333 
334  /* Determine appropriate center and bounding indices */
335  if (irec == 0) {
336  i1 = 0;
337  i2 = MIN(1, indx->nrecs - 1);
338  i3 = MIN(2, indx->nrecs - 1);
339  } else if (irec == indx->nrecs - 1) {
340  i3 = indx->nrecs - 1;
341  i2 = MAX(i3 - 1, 0);
342  i1 = MAX(i3 - 2, 0);
343  } else {
344  i1 = MAX(irec - 1, 0);
345  i2 = irec;
346  i3 = MIN(irec + 1, indx->nrecs - 1);
347  }
348 
349  /* Avoid time difference test across frame type changes. */
350  if (indx->rec[i2].mnftype == GACTYPE &&
351  (indx->rec[i3].mnftype != indx->rec[i1].mnftype)) {
352  return (0);
353  }
354 
355  /* Determine expected time difference between frames */
356  if (indx->rec[i2].mnftype == GACTYPE) {
357  DelTime = DTGAC;
358  DelScene = DELSCENEGAC;
359  } else {
360  DelTime = DTLAC;
361  DelScene = DELSCENELAC;
362  }
363 
364  /* Compute actual differences */
365  tdiff1 = indx->rec[i2].time - indx->rec[i1].time;
366  tdiff2 = indx->rec[i3].time - indx->rec[i2].time;
367 
368  /* Avoid check across scene breaks, GAC/LAC files only */
369  if (indx->type == GAC && (tdiff1 > DelScene || tdiff2 > DelScene))
370  return (0);
371 
372  /* Compute residual error */
373  terror1 = fmod(tdiff1, DelTime);
374  if (tdiff1 < DelTime)
375  terror1 -= DelTime;
376 
377  terror2 = fmod(tdiff2, DelTime);
378  if (tdiff2 < DelTime)
379  terror2 -= DelTime;
380 
381 
382  /* Check error relative to allowed clock variance. We require time */
383  /* shift preceeding center frame, and no timeshift following. */
384 
385  if (fabs(terror1) > CLOCKVAR && fabs(terror2) <= CLOCKVAR) {
386  *shiftval = terror1;
387  printf("Time Shift at Frame %d: %lf of %lf secs\n",
388  irec, tdiff1, *shiftval);
389  return (1);
390  } else {
391  return (0);
392  }
393 }
394 
395 
396 /* -------------------------------------------------------------- */
397 /* sohHdrError() - returns > 0 if bytes do not match SOH header */
398 
399 /* -------------------------------------------------------------- */
401  BYTE status = 0;
402  BYTE msghdr[6] = {225, 1, 193, 28, 0, 3};
403  int i;
404 
405  for (i = 0; i < 6; i++)
406  if (hdr[i + 2] != msghdr[i])
407  status = 1;
408 
409  /*
410  if (status)
411  printf("Bad SOH header: %3d %3d %3d %3d %3d %3d \n",
412  hdr[2],hdr[3],hdr[4],hdr[5],hdr[6],hdr[7]);
413  */
414 
415  return (status);
416 }
417 
418 
419 /* -------------------------------------------------------------- */
420 /* bitError() - computes bit errors based on image data */
421 /* */
422 /* Returns 1 if any errors found. */
423 
424 /* -------------------------------------------------------------- */
425 BYTE bitError(BYTE mnf[], INT32 *totbits, INT32 *toterrs) {
426  INT32 numbits;
427  INT32 numerrs;
428 
429  startBitError(mnf, &numbits, &numerrs);
430  *totbits = numbits;
431  *toterrs = numerrs;
432 
433  stopBitError(mnf, &numbits, &numerrs);
434  *totbits += numbits;
435  *toterrs += numerrs;
436 
437  if (*toterrs > 0)
438  return (1);
439  else
440  return (0);
441 }
442 
443 
444 /* -------------------------------------------------------------- */
445 /* startBitError() - computes bit errors based on image data */
446 /* */
447 /* Uses the known pattern of the start-pixel field to compute the */
448 /* number of bits which deviate from expectation. There is one */
449 /* start-pixel in LAC and 5 in GAC, so the test is more */
450 /* comprehensive for GAC frames. Returns 1 if any errors found. */
451 
452 /* -------------------------------------------------------------- */
453 BYTE startBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs) {
454  INT16 scid[2];
455  INT16 mnftype;
456  BYTE mask[] = {3, 255, 0, 0, 3, 255, 0, 0, 3, 255, 0, 0, 3, 255};
457  BYTE npix;
458  INT16 offset = 0; /* byte offset to first start-pixel */
459  BYTE m, x, z;
460  int i, j;
461 
462  memcpy(scid, &mnf[O_SCID], sizeof (scid));
463  if (endianess() == 1)
464  swapc_bytes((char *) scid, 2, 2);
465  mnftype = scid2mnftype(scid);
466 
467  if (mnftype == GACTYPE) {
468  npix = 5;
469  *numbits = 350;
470  offset = 806;
471  } else if (mnftype == LACTYPE) {
472  npix = 1;
473  *numbits = 70;
474  offset = 894;
475  } else {
476  npix = 0;
477  *numbits = 0;
478  }
479  *numerrs = 0;
480 
481  for (i = 0; i < npix; i++) {
482  for (j = 0; j < 14; j++) {
483  x = mnf[offset + (4032 * i) + j];
484  m = mask[j];
485  if (x != m) {
486  z = x ^ m;
487  while (z) {
488  if (z & 0x1)
489  (*numerrs)++;
490  z = z >> 1;
491  }
492  }
493  }
494  }
495 
496  if (*numerrs > 0)
497  return (1);
498  else
499  return (0);
500 }
501 
502 
503 /* -------------------------------------------------------------- */
504 /* stopBitError() - computes bit errors based on image data */
505 /* */
506 /* Uses the known pattern of the stop-pixel field to compute the */
507 /* number of bits which deviate from expectation. There is one */
508 /* start-pixel in LAC and 5 in GAC, so the test is more */
509 /* comprehensive for GAC frames. Returns 1 if any errors found. */
510 
511 /* -------------------------------------------------------------- */
512 BYTE stopBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs) {
513  INT16 scid[2];
514  INT16 mnftype;
515  BYTE mask[] = {3, 255, 3, 255, 0, 0, 0, 0, 3, 255, 3, 255, 0, 0};
516  BYTE npix;
517  INT16 offset = 0; /* byte offset to first start-pixel */
518  BYTE m, x, z;
519  int i, j;
520 
521  memcpy(scid, &mnf[O_SCID], sizeof (scid));
522  if (endianess() == 1)
523  swapc_bytes((char *) scid, 2, 2);
524  mnftype = scid2mnftype(scid);
525 
526  if (mnftype == GACTYPE) {
527  npix = 5;
528  *numbits = 350;
529  offset = 806 + 2000 * 2;
530  } else if (mnftype == LACTYPE) {
531  npix = 1;
532  *numbits = 70;
533  offset = 894 + 10296 * 2;
534  } else {
535  npix = 0;
536  *numbits = 0;
537  }
538  *numerrs = 0;
539 
540  for (i = 0; i < npix; i++) {
541  for (j = 0; j < 14; j++) {
542  x = mnf[offset + (4032 * i) + j];
543  m = mask[j];
544  if (x != m) {
545  z = x ^ m;
546  while (z) {
547  if (z & 0x1)
548  (*numerrs)++;
549  z = z >> 1;
550  }
551  }
552  }
553  }
554 
555  if (*numerrs > 0)
556  return (1);
557  else
558  return (0);
559 }
560 
561 /* -------------------------------------------------------------- */
562 /* pixVariance() - computes pixel-to-pixel change */
563 /* */
564 
565 /* -------------------------------------------------------------- */
567  INT16 scid[2];
568  INT16 mnftype;
569  INT16 npix;
570  INT16 offset;
571  INT16 i, j;
572  INT16 *data;
573  INT32 var = 0;
574  INT16 x, lastx = 0, dx;
575 
576  memcpy(scid, &mnf[O_SCID], sizeof (scid));
577  if (endianess() == 1)
578  swapc_bytes((char *) scid, 2, 2);
579  mnftype = scid2mnftype(scid);
580 
581  if (mnftype == GACTYPE) {
582  return (var);
583  } else if (mnftype == LACTYPE) {
584  npix = 1285;
585  offset = 926;
586  data = (INT16 *) & mnf[offset];
587  } else {
588  return (var);
589  }
590 
591  for (j = 0; j < NBANDS; j++) {
592  for (i = 0; i < npix; i++) {
593  x = data[i * NBANDS + j];
594  if (endianess() == 1)
595  swapc_bytes((char *) &x, 2, 1);
596  if (i > 0) {
597  dx = x - lastx;
598  var = var + (INT32) abs(dx);
599  }
600  lastx = x;
601  }
602  }
603 
604  return (var);
605 }
606 
607 
608 
609 
610 
611 
612 
613 
614 
BYTE timeError(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:93
#define MAX(A, B)
Definition: swl0_utils.h:25
#define MIN(x, y)
Definition: rice.h:169
#define DTLAC
Definition: swl0_parms.h:47
double FLOAT64
Definition: elements.h:8
int j
Definition: decode_rs.h:73
int32_t day
int status
Definition: l1_czcs_hdf.c:32
#define INT32
Definition: l1_imgscale.c:3
BYTE startBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs)
Definition: swl0_utils.c:453
BYTE stopBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs)
Definition: swl0_utils.c:512
void ttag2ydmsec(INT16 ttag[], INT16 *year, INT16 *day, INT32 *msec)
Definition: swl0_utils.c:71
int32_t INT32
Definition: elements.h:6
#define DELSCENEGAC
Definition: swl0_parms.h:51
int32 * msec
Definition: l1_czcs_hdf.c:31
float tm[MODELMAX]
#define LACTYPE
Definition: swl0_parms.h:20
INT16 scid2mnftype(INT16 scid[])
Definition: swl0_utils.c:20
BYTE timeContiguous(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:162
int32_t jday(int16_t i, int16_t j, int16_t k)
Converts a calendar date to the corresponding Julian day starting at noon on the calendar date....
Definition: jday.c:14
#define GAC
Definition: l1stat.h:33
BYTE timeSeqError(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:105
int endianess(void)
determine endianess
Definition: endianess.c:10
int swapc_bytes(char *in, int nbyte, int ntime)
Definition: swapc_bytes.c:4
#define DELSCENELAC
Definition: swl0_parms.h:50
INT32 pixVariance(BYTE mnf[])
Definition: swl0_utils.c:566
unsigned char BYTE
Definition: elements.h:4
short int INT16
Definition: elements.h:5
#define ABS(A)
Definition: swl0_utils.h:32
#define DTGAC
Definition: swl0_parms.h:46
#define HRPT
Definition: l1stat.h:35
INT16 scid2mnfnum(INT16 scid[])
Definition: swl0_utils.c:29
BYTE sohHdrError(BYTE hdr[])
Definition: swl0_utils.c:400
a context in which it is NOT documented to do so subscript which cannot be easily calculated when extracting TONS attitude data from the Terra L0 files Corrected several defects in extraction of entrained ephemeris and and as HDF file for both the L1A and Geolocation enabling retrieval of South Polar DEM data Resolved Bug by changing to opent the geolocation file only after a successful read of the L1A and also by checking for fatal errors from not restoring C5 and to report how many of those high resolution values were water in the new WaterPresent SDS Added valid_range attribute to Land SeaMask Changed to bilinearly interpolate the geoid_height to remove artifacts at one degree lines Made corrections to const qualification of pointers allowed by new version of M API library Removed casts that are no longer for same not the geoid Corrected off by one error in calculation of high resolution offsets Corrected parsing of maneuver list configuration parameter Corrected to set Height SDS to fill values when geolocation when for elevation and land water mask
Definition: HISTORY.txt:114
integer, parameter double
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
#define GACTYPE
Definition: swl0_parms.h:19
BYTE timeShifted(swl0indx *indx, INT32 irec, FLOAT64 *shiftval)
Definition: swl0_utils.c:318
@ NBANDS
Definition: make_L3_v1.1.c:53
BYTE timeConsistent(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:239
#define fabs(a)
Definition: misc.h:93
BYTE bitError(BYTE mnf[], INT32 *totbits, INT32 *toterrs)
Definition: swl0_utils.c:425
#define TIMELEN
Definition: swl0_utils.c:14
l2prod offset
#define O_SCID
Definition: swl0_parms.h:32
#define abs(a)
Definition: misc.h:90
int i
Definition: decode_rs.h:71
#define CLOCKVAR
Definition: swl0_parms.h:48
int npix
Definition: get_cmp.c:28
char * unix2timeStr(FLOAT64 usec)
Definition: swl0_utils.c:55
FLOAT64 ttag2unix(INT16 ttag[])
Definition: swl0_utils.c:38