OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
EN_eng_data.h
Go to the documentation of this file.
1 #ifndef EN_ENG_DATA_H
2 #define EN_ENG_DATA_H
3 
4 /*
5 !C-INC**********************************************************************
6 
7 !Description: This include file contains information about eng_data (vdata)
8  structures.
9 
10 !Input Parameters: N/A
11 
12 !Output Parameters: N/A
13 
14 Externally Defined:
15  M01LAST_VALID_SCAN (mapiL1A.h)
16  int8 (hdfi.h)
17  uint8 (hdfi.h)
18  int16 (hdfi.h)
19  uint16 (hdfi.h)
20  int32 (hdfi.h)
21  uint32 (hdfi.h)
22 
23 !Revision History:
24  $Log: EN_eng_data.h,v $
25  Revision 3.1 2002/09/20 21:36:02 vlin
26  2 fields "revision" and "instrument" added to Vdata structure.
27 
28  Revision 2.1 2000/12/27
29  John Seaton (seaton@ltpmail.gsfc.nasa.gov)
30  Added #define for EN_NUM_MAJ_CYCLES 32 for use in
31  module update_eng_data_for_maj_cycle_n to get rid of
32  magic numbers.
33 
34  Revision 2.0 1998/10/26 11:29 EST
35  John Seaton/SAIC/GSC (seaton@ltpmail.gsfc.nasa.gov)
36  Added #defines to mark new vdatas in the EN_DATA_LIST
37  and to use #defines from mapiL1A.h where possible. Also
38  added order and type to eng_data field structure to
39  handle data with different data sizes and orders. Also
40  several #defines to assist in picking the needed Vdatas
41  out of the eng_data structure.
42 
43  Revision 1.0 1997/07/21 15:58 EDT
44  David Catozzi/SAIC/GSC (cato@ltpmail.gsfc.nasa.gov)
45  Originated code development.
46 
47 !Team-unique Header:
48 
49  This software is developed by the MODIS Science Data Support Team
50  for the National Aeronautics and Space Administration,
51  Goddard Space Flight Center, under contract NAS5-32373.
52 
53 !END
54 *************************************************************************/
55 
56 #include "hdfi.h"
57 #include "mapiL1A.h"
58 #include "PGS_PC.h"
59 #include "PGS_TYPES.h"
60 
61 
62 /********************** GLOBAL CONSTANTS (MACROS): *****************************/
63 
64 #define EN_NUM_VDATAS 68
65 #define EN_ENG_VDATA_START_INDEX 51 /* the vdata_array index of the first
66  (eng pkt 1-2) engineering Vdata */
67 
68 #define EN_NUM_MAJ_CYCLES 32
69 
70 #define EN_MAX_FIELDS_PER_VDATA 70
71 #define EN_MAX_VDATA_NAME_LENGTH 80
72 #define EN_MAX_FIELD_NAME_LENGTH 50
73 
74 /* LAST_VALID_SCAN flag values */
75 #define EN_INITIAL_LAST_VALID_SCAN_VALUE 65535
76 #define EN_ENG_DATA_IS_FROM_PREVIOUS_GRANULE 0
77 
78 #define EN_LAST_VALID_SCAN M01LAST_VALID_SCAN
79 
80 #define EN_INITIAL_FIELD_VALUE 0
81 
82 #define EN_CP_HK_TLMY_PRIOR_OFFSET 512
83 
84 #define EN_EMPTY_SLOT "EMPTY_SLOT"
85 
86 #define EN_MAX_LINE_LEN 255
87 
88 #define EN_SC_ANCILLARY_VDATA_START 48
89 #define EN_SC_ANCILLARY_VDATA_END 49
90 #define EN_COMM_PROC_VDATA_NUMBER 50
91 #define EN_ANCIL_VDATA_BUFFER_SIZE 71
92 
93 #define EN_MAX_VDATA_NUM_BITS 64
94 #define EN_MIN_VDATA_NUM_BITS 1
95 #define EN_NUM_SCAN_ELEMENTS 5
96 #define EN_MAX_VDATA_ORDER 8
97 #define EN_MIN_VDATA_ORDER 1
98 #define EN_MAX_VDATA_TYPE 25
99 #define EN_MIN_VDATA_TYPE 20
100 /****************************************************************************
101  *** VDATA STRUCTURE: ***
102  ****************************************************************************/
103 
104 /* Vdata field structure: */
105 typedef struct{
106  char field_name[EN_MAX_FIELD_NAME_LENGTH];
107  uint16 num_bits;
108  uint16 start_bit_pos;
109  uint16 order;
110  uint16 type;
111  union {
112  int8 i8type;
113  uint8 ui8type;
114  int16 i16type;
115  uint16 ui16type;
116  int32 i32type;
117  uint32 ui32type;
118  } union_value[EN_MAX_VDATA_ORDER];
119  uint16 value;
121 
122 /* Vdata structure */
123 typedef struct{
124  char vdata_name[EN_MAX_VDATA_NAME_LENGTH];
125  uint8 num_fields;
127  char revision[PGSd_PC_VALUE_LENGTH_MAX];
128  PGSt_tag instrument;
130 
131 
132 #endif /* EN_ENG_DATA_H */
integer, parameter int16
Definition: cubeio.f90:3
int32 value
Definition: Granule.c:1235
#define EN_MAX_VDATA_ORDER
Definition: EN_eng_data.h:95
#define EN_MAX_VDATA_NAME_LENGTH
Definition: EN_eng_data.h:70
#define EN_MAX_FIELD_NAME_LENGTH
Definition: EN_eng_data.h:71
#define EN_MAX_FIELDS_PER_VDATA
Definition: EN_eng_data.h:69