OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
smeta_api.h
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <math.h>
5 #include <limits.h>
6 #include "ias_math.h"
7 #include "ias_logging.h" /* IAS logging library */
8 #include "mtl_geometry.h" /* MTL file geometric operations */
9 #include "mtl_grid.h" /* MTL grid generation functions */
10 #include "smeta_exploit.h" /* EMETA file read routine */
11 #include "smeta_geometry.h" /* Geometric operations using EMETA structure */
12 
13 #ifndef _SMETA_API_
14 #define _SMETA_API_
15 
16 /* Initialize Metadata Access */
17 int smeta_init(
18  char *smeta_filename ); /* Product metadata file name */
19 
20 /* Connect to scene ID text string */
21 char *smeta_file_name();
22 
23 /* Retrieve scene framing information from the SMETA structure */
24 int smeta_get_frame(
25  int band, /* Input band number */
26  META_FRAME *frame ); /* Output image frame info */
27 
28 
29 /* Calculate view and sun angles for a L1T pixel for L5 and L7 satellites*/
30 int smeta_calc_ls(
31  int in_line, /* L1T line coordinate */
32  int in_samp, /* L1T sample coordinate */
33  int in_band, /* Spectral band number */
34  short *sat_zn, /* Satellite zenith angle */
35  short *sat_az, /* Satellite azimuth angle */
36  short *sun_zn, /* Solar zenith angle */
37  short *sun_az ); /* Solar azimuth angle */
38 
39 /* Calculate view and sun angles for a L1T pixel for OLI */
40 int smeta_calc(
41  int in_line, /* L1T line coordinate */
42  int in_samp, /* L1T sample coordinate */
43  int in_band, /* Spectral band number */
44  /* Sudipta new addition for OLI to extract SCA and Det numbers */
45  short *sca_num, /* SCA number */
46  short *det_num, /* Detector number */
47  /* End Sudipta new addition for OLI */
48  double *sat_zn, /* Satellite zenith angle */
49  double *sat_az, /* Satellite azimuth angle */
50  double *sun_zn, /* Solar zenith angle */
51  double *sun_az ); /* Solar azimuth angle */
52 
53 /* Disconnect from the MTL interface */
54 void smeta_close();
55 
56 #endif
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
char * smeta_file_name()
Definition: smeta_api.c:124
void smeta_close()
Definition: smeta_api.c:238
int smeta_get_frame(int band, META_FRAME *frame)
Definition: smeta_api.c:129
int smeta_init(char *smeta_filename)
Definition: smeta_api.c:11
int smeta_calc_ls(int in_line, int in_samp, int in_band, short *sat_zn, short *sat_az, short *sun_zn, short *sun_az)
Definition: smeta_api.c:204
int smeta_calc(int in_line, int in_samp, int in_band, short *sca_num, short *det_num, double *sat_zn, double *sat_az, double *sun_zn, double *sun_az)
Definition: smeta_api.c:164