OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
swl0_utils.h
Go to the documentation of this file.
1 #ifndef _SWL0_UTILS_H
2 #define _SWL0_UTILS_H
3 
4 #include "swl0_types.h"
5 #include "swl0_struc.h"
6 
7 INT16 scid2mnftype(INT16 scid[]);
8 INT16 scid2mnfnum(INT16 scid[]);
9 void ttag2ydmsec(INT16 ttag[], INT16 *year, INT16 *day, INT32 *msec);
10 FLOAT64 ttag2unix(INT16 ttag[]);
11 char *unix2timeStr(FLOAT64 usec);
12 INT32 filesize(const char *filename);
13 BYTE timeError(swl0indx *indx, INT32 irec);
14 BYTE timeSeqError(swl0indx *indx, INT32 irec);
15 BYTE timeContiguous(swl0indx *indx, INT32 irec);
16 BYTE timeConsistent(swl0indx *indx, INT32 irec);
17 BYTE timeShifted(swl0indx *indx, INT32 irec, FLOAT64 *shiftval);
18 BYTE sohHdrError(BYTE hdr[]);
19 BYTE startBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs);
20 BYTE stopBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs);
21 BYTE bitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs);
22 INT32 pixVariance(BYTE mnf[]);
23 
24 /* Macro definitions */
25 #ifndef MAX
26 #define MAX(A,B) ((A) > (B) ? (A) : (B)) /* Greater of (A,B) */
27 #endif
28 
29 #ifndef MIN
30 #define MIN(A,B) ((A) < (B) ? (A) : (B)) /* Lesser of (A,B) */
31 #endif
32 
33 #define ABS(A) ((A) > 0 ? (A) : -(A)) /* Absolute Value */
34 
35 
36 
37 #endif
double FLOAT64
Definition: elements.h:8
BYTE timeShifted(swl0indx *indx, INT32 irec, FLOAT64 *shiftval)
Definition: swl0_utils.c:334
int32_t day
INT32 pixVariance(BYTE mnf[])
Definition: swl0_utils.c:582
BYTE timeConsistent(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:255
BYTE startBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs)
Definition: swl0_utils.c:469
int32_t INT32
Definition: elements.h:6
int32 * msec
Definition: l1_czcs_hdf.c:31
char * unix2timeStr(FLOAT64 usec)
Definition: swl0_utils.c:55
unsigned char BYTE
Definition: elements.h:4
short int INT16
Definition: elements.h:5
BYTE stopBitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs)
Definition: swl0_utils.c:528
FLOAT64 ttag2unix(INT16 ttag[])
Definition: swl0_utils.c:38
INT32 filesize(const char *filename)
Definition: swl0_utils.c:93
BYTE timeError(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:109
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
void ttag2ydmsec(INT16 ttag[], INT16 *year, INT16 *day, INT32 *msec)
Definition: swl0_utils.c:71
BYTE timeContiguous(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:178
INT16 scid2mnfnum(INT16 scid[])
Definition: swl0_utils.c:29
BYTE sohHdrError(BYTE hdr[])
Definition: swl0_utils.c:416
BYTE timeSeqError(swl0indx *indx, INT32 irec)
Definition: swl0_utils.c:121
INT16 scid2mnftype(INT16 scid[])
Definition: swl0_utils.c:20
BYTE bitError(BYTE mnf[], INT32 *numbits, INT32 *numerrs)
Definition: swl0_utils.c:441