Go to the documentation of this file.
4 static int32 nwave = -1;
5 static int32 nwaveIR = -1;
6 static int32 nwaveVIS = -1;
7 static int32 *wave =
NULL;
26 if (inprod[0] ==
'\0') {
31 while (*tmp_ptr !=
'\0') {
32 if (isupper(*tmp_ptr)) *tmp_ptr = tolower(*tmp_ptr);
35 if ((tmp_ptr = strstr(tmp_str,
"default")) !=
NULL) {
39 tmp_str[
k -
i] =
'\0';
40 strcat(tmp_str, defprod);
41 strcat(tmp_str, inprod +
k -
i + 7);
49 if (tmp_str[0] !=
'\0') {
52 while (tmp_str[
i] ==
' ' || tmp_str[
i] ==
',')
54 if (tmp_str[
i] ==
'\0')
57 while (tmp_str[
i] !=
' ' &&
63 if (strstr(&tmp_str[
k],
"l2_flags") == &tmp_str[
k])
65 strncpy(outprod[tot_prod], &tmp_str[
k],
i -
k);
66 outprod[tot_prod][
i -
k] =
'\0';
68 if (tmp_str[
i] ==
'\0')
77 for (
i = 0;
i < tot_prod;
i++) {
78 if ((tmp_ptr = strstr(outprod[
i],
"_nnn")) !=
NULL) {
81 for (
k = tot_prod - 1;
k >
i;
k--)
82 strcpy(outprod[
k + nwave - 1], outprod[
k]);
83 tot_prod = tot_prod + nwave - 1;
95 for (iw = 0; iw < nwave; iw++) {
97 sprintf(wavestr,
"%d", (
int) wave[iw]);
98 outprod[
i + iw][0] =
'\0';
99 strcat(outprod[
i + iw],
prefix);
100 strcat(outprod[
i + iw], wavestr);
101 strcat(outprod[
i + iw], suffix);
108 for (
i = 0;
i < tot_prod;
i++) {
109 if ((tmp_ptr = strstr(outprod[
i],
"_vvv")) !=
NULL) {
112 for (
k = tot_prod - 1;
k >
i;
k--)
113 strcpy(outprod[
k + nwaveVIS - 1], outprod[
k]);
114 tot_prod = tot_prod + nwaveVIS - 1;
124 outprod[
i][0] =
'\0';
126 for (iw = 0; iw < nwaveVIS; iw++) {
128 sprintf(wavestr,
"%d", (
int) wave[iw]);
129 outprod[
i + iw][0] =
'\0';
130 strcat(outprod[
i + iw],
prefix);
131 strcat(outprod[
i + iw], wavestr);
132 strcat(outprod[
i + iw], suffix);
138 for (
i = 0;
i < tot_prod;
i++) {
139 if ((tmp_ptr = strstr(outprod[
i],
"_iii")) !=
NULL) {
142 for (
k = tot_prod - 1;
k >
i;
k--)
143 strcpy(outprod[
k + nwaveIR - 1], outprod[
k]);
144 tot_prod = tot_prod + nwaveIR - 1;
154 outprod[
i][0] =
'\0';
156 for (iw = 0; iw < nwaveIR; iw++) {
158 sprintf(wavestr,
"%d", (
int) wave[iw + nwave]);
159 outprod[
i + iw][0] =
'\0';
160 strcat(outprod[
i + iw],
prefix);
161 strcat(outprod[
i + iw], wavestr);
162 strcat(outprod[
i + iw], suffix);
169 for (
i = 0;
i < tot_prod;
i++) {
170 for (
j =
i + 1;
j < tot_prod;
j++) {
171 if (strcmp(outprod[
i], outprod[
j]) == 0) {
172 for (
k =
j + 1;
k < tot_prod;
k++) {
int32 prodlist(int32 sensorID, int32 evalmask, const char *inprod, const char *defprod, char outprod[L1_MAXPROD][32])
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 and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy(l2prod->name_prefix, "myprod", UNITLEN)
int32_t rdsensorinfo(int32_t, int32_t, const char *, void **)
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
int32_t sensorID[MAXNFILES]