ocssw  1.0
/disk01/web/ocssw/build/src/geogen_modis/GEO_input.h (r8096/r7924)
Go to the documentation of this file.
00001 /* file: GEO_input.h */
00002 
00003 /*
00004 !C-INC*************************************************************************
00005 
00006 !Description:   the header file for the input functions in the Level-1A
00007             geolocation software
00008 
00009 !Input Parameters: N/A
00010 
00011 !Output Parameters: N/A
00012 
00013 !Revision History:
00014 $Log: GEO_input.h,v $
00015 Revision 6.4  2010/06/18 20:41:41  kuyper
00016 Changed GEO_prepare_ancil_data(), GEO_prepare_l1a_data(), and
00017   GEO_read_L1Apacket_data() to return a status code.
00018 Corrected parameters that were pointers to array by removing
00019   their leading 'const' qualifiers.
00020 
00021 Revision 6.3  2010/04/23 18:32:29  kuyper
00022 Removed parameter from GEO_prepare_ancil_data().
00023 
00024 James Kuyper    James.R.Kuyper@NASA.gov
00025 
00026 Revision 6.2  2010/04/08 18:42:06  kuyper
00027 Helped address Bug 2472 by adding argument to GEO_prepare_ancil_data.
00028 Simplified interface to GEO_prepare_mirr_data.
00029 
00030 Revision 6.1  2010/03/15 20:53:31  gbritz
00031 Add ephemeris/attitude quality information to MOD03 file.
00032 
00033 Georgios Britzolakis georgios.britzolakis-1@nasa.gov
00034 
00035 Revision 5.1  2005/03/16 21:35:19  kuyper
00036 Changed header guard macro name to avoid reserved name space.
00037 
00038 Revision 4.2  2003/08/07 18:48:39  kuyper
00039 Removed never-implemented extra argument.
00040 
00041 Revision 4.1  2003/03/13 22:11:08  kuyper
00042 Added frame_data parameter to GEO_prepare_mirr_data().
00043 Added average temperatures parameter to GEO_read_L1Apacket_data().
00044 Added GEO_read_L1Atemp_data().
00045 
00046 Revision 3.7  2001/04/13 15:52:48  kuyper
00047 Reverted earth_encoder_times back to uint16.
00048 
00049  * Revision 3.6  2001/04/03  00:24:15  kuyper
00050  * Changed mirr_params parameter of GEO_prepare_mirr_data to 'const *'.
00051  *
00052  * Revision 3.5  2001/04/02  20:36:15  kuyper
00053  * Removed 'const' from 'l1a_file' parameter; it's not const.
00054  *
00055  * Revision 3.4  2001/03/31  16:06:25  seaton
00056  * Changed type from uint16 to int16 for earth_encoder_times in GEO_read_L1Apacket_data.c
00057  *
00058  * Revision 3.3  2001/03/31  15:29:11  seaton
00059  * Changed declaration for GEO_prepare_l1a_data for geo_params.
00060  *
00061  * Revision 3.2  2001/03/28  18:20:10  vlin
00062  * data type of view_sector_start is changed to int16
00063  *
00064  * Revision 3.1  2001/03/20  22:33:35  kuyper
00065  * Changed *params to const for GEO_cumulate_GRing.
00066  *
00067  * Revision 2.9  2001/03/14  18:03:42  seaton
00068  * Added new arguments to function GEO_read_L1Apacket_data.c
00069  *
00070  * Revision 2.8  2001/03/06  20:15:45  vlin
00071  *      GEO_prepare_mirr_data() updated & GEO_cumulate_GRing() added
00072  *
00073 
00074         4/5/95
00075         Ruiming Chen
00076         Finished coding
00077 
00078 !Team-unique Header:
00079             This software is developed by the MODIS Science Data Support
00080             Team for the National Aeronautics and Space Administration,
00081             Goddard Space Flight Center, under contract NAS5-32373.
00082 
00083 !END***************************************************************************
00084 */
00085 
00086 #ifndef GEO_INPUT_H
00087 #define GEO_INPUT_H
00088 #include "hdfi.h"
00089 #include "PGS_PC.h"
00090 #include "PGS_IO_L0.h"
00091 #include "mapi.h"
00092 #include "GEO_parameters.h"
00093 
00094 enum {SC_PRIOR, SC_CURRENT};
00095 
00096 typedef struct{
00097     uint8   second_header[MAX_SCAN_NUMBER]
00098         [sizeof( ((PGSt_IO_L0_SecPktHdrEOS_AM *)NULL)->scTime)];
00099     int32   posvel[MAX_SCAN_NUMBER][6];
00100     int16   attit_angvel[MAX_SCAN_NUMBER][6];
00101 } sc_ancil_struct;
00102 
00103 /* function prototype */
00104 
00105 PGSt_SMF_status GEO_prepare_ancil_data( 
00106     /* Prepare ancillary data for one granule */
00107     int const           number_of_scans,
00108     const GEO_param_struct      * params,
00109     const sc_ancil_struct       sc_ancillary_data[2],
00110     const uint16            ss_cp_mode[]
00111 );
00112 
00113 PGSt_SMF_status GEO_prepare_l1a_data(
00114     /* Read and prepare L1a data for one granule */
00115     MODFILE * const l1a_file,
00116     GEO_param_struct const * geo_params,
00117     l1a_data_struct * const l1a_data
00118 );
00119 
00120 PGSt_SMF_status GEO_prepare_mirr_data( /* Prepare mirror data for one granule */
00121     uint16 [MAX_SCAN_NUMBER][ENCODER_LENGTH],
00122     int16 [MAX_SCAN_NUMBER][SECTOR_LENGTH],
00123     const mirror_preparation_struct * const,
00124     double const,
00125     l1a_data_struct *
00126 );
00127 
00128 int GEO_read_L1AECS_metadata(
00129        MODFILE * const l1a_file,
00130        ECS_metadata_struct * const ECS_metadata
00131        );
00132 
00133 PGSt_SMF_status GEO_read_L1Apacket_data(
00134     MODFILE * l1a_file,
00135     int const number_of_scans,
00136     uint16 earth_encoder_times[MAX_SCAN_NUMBER][ENCODER_LENGTH],
00137     sc_ancil_struct sc_ancillary_data[2],
00138     int16 view_sector_start[MAX_SCAN_NUMBER][SECTOR_LENGTH],
00139     uint16 FRside[MAX_SCAN_NUMBER][ELEC_SIDES],
00140     uint16 SAside[MAX_SCAN_NUMBER][ELEC_SIDES],
00141     uint16 ss_cp_mode[]
00142 );
00143 
00144 int GEO_read_L1Ascan_metadata(
00145     MODFILE  * const l1a_file,
00146     int const number_of_scans,
00147     l1a_metadata_struct const * const granule_metadata,
00148     frame_data_struct frame_data[MAX_SCAN_NUMBER],
00149     int16 mirr_side[MAX_SCAN_NUMBER]
00150     );
00151 
00152 int GEO_read_L1Aspecific_metadata(
00153     MODFILE             * const l1a_file,
00154     l1a_metadata_struct * const granule_metadata,
00155     int             * const number_of_scans
00156     );
00157 
00158 PGSt_SMF_status GEO_read_L1Atemp_data(
00159     const GEO_param_struct  * const,
00160     MODFILE         * const,
00161     int         const,
00162     float32         []
00163     );
00164 
00165 PGSt_SMF_status GEO_cumulate_GRing(
00166     GEO_param_struct const  * const params,
00167     int32 const         num_frames,
00168     frame_state_struct const    sc_ev_frame_state[],
00169     unsigned char       pixel_flags[MAX_DETECTORS][MAX_SCAN_SAMPLE],
00170     double      ecr_sample_position[MAX_DETECTORS][MAX_SCAN_SAMPLE][3]
00171 );
00172 
00173 #endif