OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
emeta_exploit.h
Go to the documentation of this file.
1 /*
2  * Name: emeta_exploit.h
3  *
4  * Purpose:
5  * Include file containing the function prototypes used in the exploitation of enhanced
6  * metadata for purposes of calculating viewing and solar illumination angles. These
7  * functions operate on the EMETA data type defined in "emeta.h".
8  */
9 #ifndef _EMETA_EXPLOIT_H_
10 #define _EMETA_EXPLOIT_H_
11 
12 #include <limits.h>
13 #include "ias_odl.h" /* IAS_OBJ_DESC definition */
14 #include "emeta.h" /* Definition of EMETA structure */
15 
16 #define SCA_OVERLAP 50 /* Max number of overlapping pixels */
17 
18 typedef struct EMETA_FRAME
19 {
20  int band; /* Band number */
21  int nlines; /* Number of image lines */
22  int nsamps; /* Number of image samples */
23  int code; /* Projection code (1 = UTM or 6 = PS) */
24  int zone; /* Projection zone number */
25  double ul_x; /* Upper left corner X coordinate */
26  double ul_y; /* Upper left corner Y coordinate */
27  double pixsize; /* Pixel size in meters */
28 } EMETA_FRAME;
29 
30 int emeta_read(
31  EMETA *emeta, /* Enhanced metadata structure to load */
32  const char *emeta_filename ); /* Input file name to read */
33 
35  EMETA *emeta, /* Enhanced metadata structure to load */
36  IAS_OBJ_DESC *emeta_odl ); /* Enhanced metadata ODL object */
37 
39  EMETA_SCENE_PROJ *projection, /* Projection structure to load */
40  IAS_OBJ_DESC *emeta_odl ); /* Enhanced metadata ODL object */
41 
43  EMETA *emeta, /* Enhanced metadata structure to load */
44  IAS_OBJ_DESC *emeta_odl ); /* Enhanced metadata ODL object */
45 
47  EMETA_BAND *band_emeta, /* Enhanced metadata band structure to load */
48  IAS_OBJ_DESC *emeta_odl ); /* Enhanced metadata ODL object */
49 
51  double l1t_line, /* Output space line coordinate */
52  double l1t_samp, /* Output space sample coordinate */
53  EMETA *emeta, /* Enhanced metadata structure */
54  int band, /* Current band number */
55  double *satang, /* Satellite viewing zenith/azimuth angles */
56  double *sunang ); /* Solar illumination zenith/azimuth angles */
57 
58 int emeta_find_scas(
59  double l1t_line, /* Input L1T line */
60  double l1t_samp, /* Input L1T sample */
61  EMETA_BAND *eband, /* Enhanced metadata for current band */
62  double *l1r_line, /* Array of output L1R line numbers */
63  double *l1r_samp ); /* Array of output L1R sample numbers */
64 
66  char *root_filename, /* Output root file name */
67  short *sat_zn, /* Array of satellite zenith angles */
68  short *sat_az, /* Array of satellite azimuth angles */
69  short *sun_zn, /* Array of solar zenith angles */
70  short *sun_az, /* Array of solar azimuth angles */
71  EMETA_FRAME *frame ); /* Output image frame information */
72 
73 #endif
int emeta_read_ephemeris(EMETA *emeta, IAS_OBJ_DESC *emeta_odl)
int emeta_read(EMETA *emeta, const char *emeta_filename)
Definition: emeta_exploit.c:21
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second band
int emeta_read_band_meta(EMETA_BAND *band_emeta, IAS_OBJ_DESC *emeta_odl)
subroutine satang(pi, rad, tilt, roll, pitch, yaw, xlon, ylat, senz, sena)
Definition: satang.f:3
int emeta_angles_rpc(double l1t_line, double l1t_samp, EMETA *emeta, int band, double *satang, double *sunang)
double pixsize
Definition: emeta_exploit.h:27
Definition: emeta.h:102
int emeta_find_scas(double l1t_line, double l1t_samp, EMETA_BAND *eband, double *l1r_line, double *l1r_samp)
int emeta_read_file_header(EMETA *emeta, IAS_OBJ_DESC *emeta_odl)
Definition: emeta_exploit.c:78
int emeta_read_projection(EMETA_SCENE_PROJ *projection, IAS_OBJ_DESC *emeta_odl)
int emeta_write_angfile(char *root_filename, short *sat_zn, short *sat_az, short *sun_zn, short *sun_az, EMETA_FRAME *frame)