OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
epr_ptrarray.h
Go to the documentation of this file.
1 /*
2  * $Id: epr_ptrarray.h,v 1.1.1.1 2004-10-28 19:22:23 norman Exp $
3  *
4  * Copyright (C) 2002 by Brockmann Consult (info@brockmann-consult.de)
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation. This program is distributed in the hope it will
9  * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
10  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16  */
17 
18 #ifndef EPR_PTRARRAY_H_INCL
19 #define EPR_PTRARRAY_H_INCL
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include <stdlib.h>
26 
31 struct EPR_PtrArray {
33  unsigned int capacity;
35  unsigned int length;
37  void** elems;
38 };
39 
40 typedef struct EPR_PtrArray EPR_SPtrArray;
41 
49 EPR_SPtrArray* epr_create_ptr_array(unsigned int capacity);
50 
51 
61 void epr_free_ptr_array(EPR_SPtrArray* ptr_array);
62 
63 
73 void epr_free_char_ptr_array(EPR_SPtrArray* char_ptr_array);
74 
84 int epr_add_ptr_array_elem(EPR_SPtrArray* ptr_array, void* elem);
85 
86 
96 int epr_grow_ptr_array(EPR_SPtrArray* ptr_array, unsigned int capacity);
97 
98 
104 unsigned int epr_get_ptr_array_length(const EPR_SPtrArray* ptr_array);
105 
106 
112 unsigned int epr_get_ptr_array_capacity(const EPR_SPtrArray* ptr_array);
113 
114 
121 void* epr_get_ptr_array_elem_at(const EPR_SPtrArray* ptr_array, unsigned int index);
122 
123 
124 #ifdef __cplusplus
125 } /* extern "C" */
126 #endif
127 #endif /* #ifndef EPR_PTRARRAY_H_INCL */
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
unsigned int epr_get_ptr_array_capacity(const EPR_SPtrArray *ptr_array)
unsigned int length
Definition: epr_ptrarray.h:35
void epr_free_ptr_array(EPR_SPtrArray *ptr_array)
Definition: epr_ptrarray.c:51
unsigned int epr_get_ptr_array_length(const EPR_SPtrArray *ptr_array)
Definition: epr_ptrarray.c:115
unsigned int capacity
Definition: epr_ptrarray.h:33
EPR_SPtrArray * epr_create_ptr_array(unsigned int capacity)
Definition: epr_ptrarray.c:29
int epr_add_ptr_array_elem(EPR_SPtrArray *ptr_array, void *elem)
Definition: epr_ptrarray.c:75
void ** elems
Definition: epr_ptrarray.h:37
void * epr_get_ptr_array_elem_at(const EPR_SPtrArray *ptr_array, unsigned int index)
Definition: epr_ptrarray.c:122
int epr_grow_ptr_array(EPR_SPtrArray *ptr_array, unsigned int capacity)
Definition: epr_ptrarray.c:91
void epr_free_char_ptr_array(EPR_SPtrArray *char_ptr_array)
Definition: epr_ptrarray.c:65