|
ocssw
1.0
|
00001 #ifndef MD_metadata_H 00002 #define MD_metadata_H 00003 00004 #include "PGS_PC.h" 00005 /* 00006 !C-INC************************************************************************ 00007 00008 !Description: This header file contains the metadata definitions and 00009 structures for the ECS Granule Inventory Metadata (section 1.1.1 00010 of the MODIS Level 1A Data Product Format), MODIS Level 1A 00011 Specific Granule Metadata (section 1.2 of the MODIS Level 1A 00012 Data Product Format), and Scan Level Metadata (section 2 of the 00013 MODIS Level 1A Data Product Format). 00014 00015 !Input Parameters: 00016 N/A 00017 00018 !Output Parameters: 00019 N/A 00020 00021 Externally Defined: 00022 int16 (hdfi.h) 00023 int32 (hdfi.h) 00024 PGSd_PC_VALUE_LENGTH_MAX (PGS_PC.h) 00025 00026 !Revision History: 00027 $Log: MD_metadata.h,v $ 00028 Revision 5.1 2004/09/30 18:54:46 seaton 00029 Updated to run Collection 5 L1A code. 00030 seaton@saicmodis.com 00031 00032 Revision 4.2 2003/01/07 21:14:25 vlin 00033 MD_ECS_GRA_INV_MET_t struct field name "operation_mode" removed 00034 00035 Revision 4.1 2002/10/30 14:31:16 vlin 00036 Added some fields to structure name "MD_ECS_GRA_INV_MET_t. 00037 vlin@saicmodis.com 00038 00039 Revision 2.1 1998/10/07 13:00 EDT 00040 John Seaton/SAIC/GSC (seaton@ltpmail.gsfc.nasa.gov) 00041 Modified #defines to reference mapiL1A.h #defines 00042 00043 Revision 2.0 1997/07/15 16:32 00044 Qi Huang/RDC (qhuang@ltpmail.gsfc.nasa.gov) 00045 Copied, modified, and renamed from modis_IO.h 00046 00047 Revision 1.0 1996/09/24 14:45 EDT 00048 Keith Degnan/SAIC/GSC (keith.degnan@gsfc.nasa.gov) 00049 Created the PDL for module 00050 00051 !Team-unique Header: 00052 00053 This software is developed by the MODIS Science Data Support Team 00054 for the National Aeronautics and Space Administration, 00055 Goddard Space Flight Center, under contract NAS5-32373. 00056 00057 References and Credits: 00058 00059 Design Notes: 00060 The ".h" file below was specifically written for development 00061 in C. Any other language choice may require reworking of the 00062 ".h" file before coding can begin. 00063 00064 !END 00065 **************************************************************************/ 00066 00067 #include "hdfi.h" 00068 #include "mapiL1A.h" 00069 00070 #define MD_TIMECODEALEN 28 00071 #define MD_TIMECODEADATELEN 11 00072 #define MD_TIMECODEATIMELEN 16 00073 #define MD_ADDIATTRNAMELEN 20 00074 #define MD_NUM_POINTERS 3 00075 #define MD_POINTER_NAME_L 50 00076 00077 00078 #define MD_NUM_SCANS_TXT M01NUMBER_OF_SCANS 00079 #define MD_NUM_DAY_SCANS_TXT M01NUMBER_DAY_SCANS 00080 #define MD_NUM_NIGHT_SCANS_TXT M01NUMBER_NIGHT_SCANS 00081 #define MD_MAX_TOTAL_FRAMES_TXT M01MAX_TOTAL_FRAMES 00082 #define MD_MAX_EARTH_FRAMES_TXT M01MAX_EARTH_FRAMES 00083 #define MD_MAX_SD_FRAMES_TXT M01MAX_SD_FRAMES 00084 #define MD_MAX_SRCA_FRAMES_TXT M01MAX_SRCA_FRAMES 00085 #define MD_MAX_BB_FRAMES_TXT M01MAX_BB_FRAMES 00086 #define MD_MAX_SV_FRAMES_TXT M01MAX_SV_FRAMES 00087 #define MD_SCAN_TYPES_TXT M01SCAN_TYPES 00088 #define MD_INCOMPLETE_SCANS_TXT M01INCOMPL_SCANS 00089 #define MD_MISSING_PKTS_TXT M01MISSING_PACKETS 00090 #define MD_BAD_CRC_PKTS_TXT M01PACKTS_BAD_CRC 00091 #define MD_DISCARDED_PKTS_TXT M01DISCARD_PACKETS 00092 00093 #define MECS_PRODHISTORY "PRODUCTIONHISTORY" 00094 #define MD_PROCESSVERSION "PROCESSVERSION" 00095 #define MD_OTHER_STRING "Other" 00096 #define MD_MIXED_SCAN "Mixed" 00097 #define MD_DAY_SCAN "Day" 00098 #define MD_NIGHT_SCAN "Night" 00099 #define MD_BOTH "Both" 00100 #define MD_NA "NA" 00101 #define MD_MODIS_BOTH "MODIS_Both" 00102 #define MD_MODIS_DAY "MODIS_Day" 00103 #define MD_MODIS_NIGHT "MODIS_Night" 00104 #define MD_GRANULENUMBER "GRANULENUMBER" 00105 #define MD_MIDNIGHT "T00:00:00.000000Z" 00106 #define MD_NOT_PROCESSED "processed once" 00107 #define EASTBOUNDINGCOORDNIATE "EastBoundingCoordinate" 00108 #define WESTBOUNDINGCOORDNIATE "WestBoundingCoordinate" 00109 #define SOUTHBOUNDINGCOORDNIATE "SouthBoundingCoordinate" 00110 #define NORTHBOUNDINGCOORDNIATE "NorthBoundingCoordinate" 00111 #define EASTBOUNDVALUE -180. 00112 #define WESTBOUNDVALUE 180. 00113 #define SOUTHBOUNDVALUE 90. 00114 #define NORTHBOUNDVALUE -90. 00115 00116 00117 00118 #define MD_NUM_FRAME_COUNT_ARRAY 6 00119 #define MD_NUM_CCSDS_APIDS 3 00120 00121 00122 /**************************************************************************/ 00123 /* The following are the default values. */ 00124 /**************************************************************************/ 00125 00126 #define MD_MAX_MISSING_PKTS_IN_SCAN 3032 00127 #define MD_NO_VALID_DATA_IN_SCAN 0 00128 #define MD_SOME_VALID_DATA_IN_SCAN 1 00129 00130 00131 /**************************************************************************/ 00132 /* The following are the indexes to the Frame count array. */ 00133 /**************************************************************************/ 00134 #define MD_TOTAL_FRAMES_IN_SCAN 0 00135 #define MD_EV_FRAMES_IN_SCAN 1 00136 #define MD_SD_FRAMES_IN_SCAN 2 00137 #define MD_SRCA_FRAMES_IN_SCAN 3 00138 #define MD_BB_FRAMES_IN_SCAN 4 00139 #define MD_SV_FRAMES_IN_SCAN 5 00140 00141 00142 /**************************************************************************/ 00143 /* The following are the indexes to the Scan quality array. */ 00144 /**************************************************************************/ 00145 00146 #define MD_SCAN_DATA_PRESENCE 0 00147 #define MD_MISSING_PACKET 1 00148 #define MD_BAD_CHECKSUM_PACKET 2 00149 #define MD_DISCARDED_PACKET 3 00150 00151 00152 typedef char MD_INPUT_POINTER[MD_NUM_POINTERS][MD_POINTER_NAME_L]; 00153 00154 /**************************************************************************/ 00155 /* The following structure defines the ECS Granule Inventory Metadata */ 00156 /* (section 1.1.1 of the MODIS Level 1A Data Product Format) */ 00157 /**************************************************************************/ 00158 00159 typedef struct 00160 { 00161 char *pgeversion; 00162 char rangebeginningdate[MD_TIMECODEADATELEN]; 00163 char rangebeginningtime[MD_TIMECODEATIMELEN]; 00164 char rangeendingdate[MD_TIMECODEADATELEN]; 00165 char rangeendingtime[MD_TIMECODEATIMELEN]; 00166 char day_night_flag[6]; 00167 int orbit_num_1; 00168 double equatorcrossinglongitude_1; 00169 char *equatorcrossingdate_1; 00170 char *equatorcrossingtime_1; 00171 char exclusiongringflag_1[2]; 00172 double gringpointlatitude_1[4]; 00173 double gringpointlongitude_1[4]; 00174 int gringpointsequenceno_1[4]; 00175 char *additionalattributename_1; 00176 char *additionalattributename_2; 00177 char parametervalue_1[5]; 00178 char *parametervalue_2; 00179 char *reprocessingactual; 00180 char *reprocessingplanned; 00181 char *processingenvironment; 00182 char *localversionid; 00183 char productionhistory[16]; 00184 } MD_ECS_GRA_INV_MET_t; 00185 00186 00187 /**************************************************************************/ 00188 /* The following structure defines the MODIS Level 1A Specific Granule */ 00189 /* Metadata (section 1.1.1 of the MODIS Level 1A Data Product Format) */ 00190 /**************************************************************************/ 00191 00192 typedef struct 00193 { 00194 int32 num_scans; 00195 int32 num_day_scans; 00196 int32 num_night_scans; 00197 int32 max_total_frames; 00198 int32 max_earth_frames; 00199 int32 max_sd_frames; 00200 int32 max_srca_frames; 00201 int32 max_bb_frames; 00202 int32 max_sv_frames; 00203 char scan_types_product[10]; 00204 int32 incomplete_scans; 00205 int32 missing_packets; 00206 int32 packets_bad_crc; 00207 int32 discarded_packets; 00208 } MD_L1A_SPECIFIC_MET_t; 00209 00210 00211 /**************************************************************************/ 00212 /* The following structure defines the Scan Level Metadata (section */ 00213 /* 1.1.1 of the MODIS Level 1A Data Product Format) */ 00214 /**************************************************************************/ 00215 00216 typedef struct 00217 { 00218 int16 scan_num; 00219 int16 frame_count_array[6]; 00220 char scan_type[10]; 00221 float64 sd_start_time; 00222 float64 srca_start_time; 00223 float64 bb_start_time; 00224 float64 sv_start_time; 00225 float64 ev_start_time; 00226 int16 srca_cal_mode; 00227 int16 packet_scan_count; 00228 int16 ccsds_apids[3]; 00229 int16 packet_expedited_data_flag; 00230 int16 mirror_side; 00231 int32 scan_qual_array[4]; 00232 } MD_SCAN_MET_t; 00233 00234 #endif /* MD_metadata_H */
1.7.6.1