OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
regen.h
Go to the documentation of this file.
1 #ifndef REGEN_H
2 #define REGEN_H
3 
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <time.h>
8 #include "hdf.h"
9 #include "mfhdf.h"
10 
11 #define NBANDS 8
12 #define MSECHOUR 3600000
13 #define MSECMIN 60000
14 #define MSECSEC 1000
15 #define PFLAG 16
16 
17 #define MAXATTRS 255
18 #define MAXVAL 255
19 #define MALLOC_ERR -5
20 #define MAXVGPS 6
21 
22 #ifndef ERR_MSG
23 extern char ERR_MSG[255];
24 #endif
25 
26 #define DTYPE "Data Type"
27 #define NSAMP "Pixels per Scan Line"
28 #define NREC "Number of Scan Lines"
29 #define TILTFLAGS "tilt_flags"
30 #define TILTRANGES "tilt_ranges"
31 #define TILTLATS "tilt_lats"
32 #define TILTLONS "tilt_lons"
33 #define PTIME "Processing Time"
34 #define SYEAR "Start Year"
35 #define SDAY "Start Day"
36 #define SMSEC "Start Millisec"
37 #define EYEAR "End Year"
38 #define EDAY "End Day"
39 #define EMSEC "End Millisec"
40 #define PIX_START "LAC Pixel Start Number"
41 #define PIX_SUB "LAC Pixel Subsampling"
42 #define CTIME "Scene Center Time"
43 #define SCLAT "Scene Center Latitude"
44 #define SCLON "Scene Center Longitude"
45 #define SCSOLZ "Scene Center Solar Zenith"
46 #define ULLAT "Upper Left Latitude"
47 #define ULLON "Upper Left Longitude"
48 #define URLAT "Upper Right Latitude"
49 #define URLON "Upper Right Longitude"
50 #define LLLAT "Lower Left Latitude"
51 #define LLLON "Lower Left Longitude"
52 #define LRLAT "Lower Right Latitude"
53 #define LRLON "Lower Right Longitude"
54 #define NORTHLAT "Northernmost Latitude"
55 #define SOUTHLAT "Southernmost Latitude"
56 #define WESTLON "Westernmost Longitude"
57 #define EASTLON "Easternmost Longitude"
58 #define BCLAT "Start Center Latitude"
59 #define ECLAT "End Center Latitude"
60 #define BCLON "Start Center Longitude"
61 #define ECLON "End Center Longitude"
62 #define NCREC "Scene Center Scan Line"
63 #define NFREC "Filled Scan Lines"
64 #define FF_MIS "FF Missing Frames"
65 #define SD_MIS "SDPS Missing Frames"
66 #define PCT_FLAG "Flag Percentages"
67 
68 #define L1SATG1 "Gain 1 Saturated Pixels"
69 #define L1SATG2 "Gain 2 Saturated Pixels"
70 #define L1NSATG1 "Gain 1 Non-Saturated Pixels"
71 #define L1NSATG2 "Gain 2 Non-Saturated Pixels"
72 #define L1ZEROS "Zero Pixels"
73 #define L1MEANR1 "Mean Gain 1 Radiance"
74 #define L1MEANR2 "Mean Gain 2 Radiance"
75 
76 #ifndef TILT_STRUCT
77 #define TILT_STRUCT
78 
79 typedef struct tilt_struct {
80  int ntilts; /* MFSD Number of scene tilt states*/
81  short tilt_flags[20]; /* MFSD Tilt indicators */
82  short tilt_ranges[20][2]; /* MFSD ranges of scene tilt states */
83  float tilt_lats[20][2][2]; /* MFSD Lats of tilt-range pts */
84  float tilt_lons[20][2][2]; /* MFSD Lons of tilt-range pts */
85 } tilt_Type;
86 #endif /* TILT_STRUCT */
87 
88 
89 #ifndef NAV_STRUCT
90 #define NAV_STRUCT
91 
92 typedef struct nav_struct {
93  float *orb_vec; /* MFSD Orbit positionn vector */
94  float *l_vert; /* Local vertical vector in ECEF*/
95  float *sun_ref; /* Reference Sun vector in ECEF */
96  float *att_ang; /* Computed yaw, roll, pitch */
97  float *sen_mat; /* ECEF-to-sensor-frame matrix */
98  float *scan_ell; /* Scan-track ellipse coeffs */
99  int32 *nflag; /* Navigation flags */
100 } NavType;
101 #endif /* MET_STRUCT */
102 
103 #ifndef GEO_STRUCT
104 #define GEO_STRUCT
105 
106 typedef struct geonav_struct {
107  float *slat; /* MFSD Scan start pixel latitude*/
108  float *slon; /* MFSD Scan start pixel longitude*/
109  float *clat; /* MFSD Scan center pixel lat */
110  float *clon; /* MFSD Scan center pixel long */
111  float *elat; /* MFSD Scan end pixel latitude */
112  float *elon; /* MFSD Scan end pixel longitude*/
113  float *csol_z; /* MFSD Scene Center Solar Zenith*/
114 } GeoType;
115 #endif /* GEO_STRUCT */
116 
117 #ifndef FM_STRUCT
118 #define FM_STRUCT
119 
120 typedef struct fm_struct {
121  int32 satg1[8];
122  int32 satg2[8];
123  int32 nsatg1[8];
124  int32 nsatg2[8];
125  int32 zeroes[8];
126  float meanr1[8];
127  float meanr2[8];
128 } FilemetricsType;
129 #endif /* FM_STRUCT */
130 
131 #endif /* REGEN_H */
float * sen_mat
Definition: regen.h:97
int32 nsatg2[8]
Definition: regen.h:124
short tilt_ranges[20][2]
Definition: regen.h:82
int32 zeroes[8]
Definition: regen.h:125
int32 satg2[8]
Definition: regen.h:122
int ntilts
Definition: regen.h:80
char ERR_MSG[255]
Definition: extract_sub.c:119
float * scan_ell
Definition: regen.h:98
float * slon
Definition: regen.h:108
float meanr2[8]
Definition: regen.h:127
float * att_ang
Definition: regen.h:96
float * elon
Definition: regen.h:112
float * orb_vec
Definition: regen.h:93
float * csol_z
Definition: regen.h:113
float * elat
Definition: regen.h:111
float * clon
Definition: regen.h:110
float tilt_lats[20][2][2]
Definition: regen.h:83
int32 * nflag
Definition: regen.h:99
float meanr1[8]
Definition: regen.h:126
float * sun_ref
Definition: regen.h:95
int32 nsatg1[8]
Definition: regen.h:123
float * slat
Definition: regen.h:107
int32 satg1[8]
Definition: regen.h:121
float tilt_lons[20][2][2]
Definition: regen.h:84
float * clat
Definition: regen.h:109
float * l_vert
Definition: regen.h:94
short tilt_flags[20]
Definition: regen.h:81