OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
GEO_earth.h File Reference
#include "PGS_EPH.h"
#include "smfio.h"
#include "GEO_parameters.h"
#include "mapi.h"
#include "GEO_geo.h"
#include "GEO_global_arrays.h"
Include dependency graph for GEO_earth.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EARTH_MODEL   "WGS84"
 
#define BAD_GEOID   -9999
 

Functions

PGSt_SMF_status GEO_aggregate (int32, uint16, double, unsigned char[][MAX_PADDED], double[][MAX_PADDED][3], double[][3], double[][MAX_PADDED][3], uint32[][2], uint8[][MAX_PADDED], double[][MAX_FRAMES][3], double[][MAX_FRAMES][3], uint8[][MAX_FRAMES], double[][3], int8[][DETECTORS_QKM][SAMPLES_QKM], uint32[][MAX_FRAMES], uint8[][MAX_FRAMES], uint8[][MAX_FRAMES])
 
PGSt_SMF_status GEO_interp_ECR (PGSt_double const base_time, PGSt_integer const numValues, const PGSt_double offsets[], GEO_param_struct const *params, char asciiUTC[], sc_state_struct sc_state[], double T_sc2ecr[][3][3], double T_inst2ecr[][3][3], double positionECR[][3], double velocityECR[][3], PGSt_double rpy[], uint32 sample_quality[][2])
 
PGSt_SMF_status GEO_interp_ephemeris_attitude (PGSt_integer numValues, char asciiUTC[], PGSt_double target_time, const PGSt_double offsets[], GEO_param_struct const *params, sc_state_struct sc_state[], uint32 qualityFlags[][2], PGSt_scTagInfo *scTagInfo)
 
void * GEO_DEMalloc (size_t)
 
int GEO_close_DEM (void)
 
PGSt_SMF_status GEO_ellip_position (int const scan_number, int const sample_number, int const num_detectors, double u_inst[][3], double ecr_sc_sample_position[][3], double ecr_sc_velocity[][3], double T_inst2ecr[][3][3], double ecr_sample_position[][MAX_PADDED][3], double ellip_sample_position[][MAX_PADDED][3], unsigned char sample_flags[][MAX_PADDED], double sample_view_vec[][MAX_PADDED][3])
 
PGSt_SMF_status GEO_terrain_correct (int const sample_number, int const num_detectors, double sample_view_vec[][MAX_PADDED][3], double ecr_sample_position[][MAX_PADDED][3], double ellip_sample_position[][MAX_PADDED][3], unsigned char sample_flags[][MAX_PADDED], double terrain_sample_position[][MAX_PADDED][3])
 
PGSt_SMF_status GEO_hires (uint16 N_samp, int padded_samples, double hires_scale, double terrain_sample_position[][MAX_PADDED][3], double ecr_sample_position[][MAX_PADDED][3], double ecr_frame_position[][MAX_FRAMES][3], uint8 sample_flags[][MAX_PADDED], uint8 frame_flags[][MAX_FRAMES], int8 hires_offsets[][DETECTORS_QKM][SAMPLES_QKM])
 
PGSt_SMF_status GEO_initialize_DEM (void)
 
int GEO_latlon2height (double const lat, double const lon, double *const h)
 
int GEO_read_DEM (double lat, double lon, int *const hgtmin, int *const hgtmax)
 
PGSt_SMF_status GEO_earth_location (int const, int const, GEO_param_struct const *, double, l1a_data_struct *, double[][3], double[][3], double[][3][3], unsigned char[][MAX_PADDED], double[][MAX_PADDED][3], double[][MAX_PADDED][3])
 
PGSt_SMF_status GEO_get_ephatt_inputs (PGSt_PC_Logical file_logical, PGSt_integer file_version, char universal_references[][PGSd_UR_FIELD_SIZE])
 
PGSt_SMF_status GEO_get_T_inst2ecr (PGSt_integer numValues, char asciiutc[], const PGSt_double offsets[], sc_state_struct const sc_state[], double sol_elev_cor[][3], PGSt_integer const eulerAngleOrder[], double T_sc2ecr[][3][3], double T_inst2ecr[][3][3], double ecr_position[][3], double ecr_velocity[][3], PGSt_double rpy[])
 
PGSt_SMF_status GEO_set_T_inst2sc (const internal_coord_trans_struct *const, const ECS_metadata_struct *const)
 
PGSt_SMF_status GEO_solar_and_lunar_vectors (PGSt_double const frame_time[], frame_data_struct const *const frame_data, GEO_param_struct const *const geo_params, fill_values_struct const *const fill_values, celestial_bodies_struct *const cb_vectors)
 
PGSt_SMF_status GEO_get_GRing_points (GEO_GRing_struct *const GRing_points)
 
int GEO_get_geoid (double latitude, double longitude)
 
PGSt_double GEO_get_ancil_packet_time (PGSt_double in_time)
 
PGSt_SMF_status GEO_check_ea_headers (PGSt_double in_time, PGSt_scTagInfo *scTagInfo)
 

Macro Definition Documentation

◆ BAD_GEOID

#define BAD_GEOID   -9999

Definition at line 119 of file GEO_earth.h.

◆ EARTH_MODEL

#define EARTH_MODEL   "WGS84"

Definition at line 118 of file GEO_earth.h.

Function Documentation

◆ GEO_aggregate()

PGSt_SMF_status GEO_aggregate ( int32  ,
uint16  ,
double  ,
unsigned char  [][MAX_PADDED],
double  [][MAX_PADDED][3],
double  [][3],
double  [][MAX_PADDED][3],
uint32  [][2],
uint8  [][MAX_PADDED],
double  [][MAX_FRAMES][3],
double  [][MAX_FRAMES][3],
uint8  [][MAX_FRAMES],
double  [][3],
int8  [][DETECTORS_QKM][SAMPLES_QKM],
uint32  [][MAX_FRAMES],
uint8  [][MAX_FRAMES],
uint8  [][MAX_FRAMES] 
)

◆ GEO_check_ea_headers()

PGSt_SMF_status GEO_check_ea_headers ( PGSt_double  in_time,
PGSt_scTagInfo *  scTagInfo 
)

Definition at line 13 of file GEO_check_ea_headers.c.

◆ GEO_close_DEM()

int GEO_close_DEM ( void  )

Definition at line 1093 of file GEO_DEM.c.

◆ GEO_DEMalloc()

void* GEO_DEMalloc ( size_t  )

Definition at line 321 of file GEO_DEM.c.

◆ GEO_earth_location()

PGSt_SMF_status GEO_earth_location ( int const  ,
int const  ,
GEO_param_struct const ,
double  ,
l1a_data_struct ,
double  [][3],
double  [][3],
double  [][3][3],
unsigned char  [][MAX_PADDED],
double  [][MAX_PADDED][3],
double  [][MAX_PADDED][3] 
)

◆ GEO_ellip_position()

PGSt_SMF_status GEO_ellip_position ( int const  scan_number,
int const  sample_number,
int const  num_detectors,
double  u_inst[][3],
double  ecr_sc_sample_position[][3],
double  ecr_sc_velocity[][3],
double  T_inst2ecr[][3][3],
double  ecr_sample_position[][MAX_PADDED][3],
double  ellip_sample_position[][MAX_PADDED][3],
unsigned char  sample_flags[][MAX_PADDED],
double  sample_view_vec[][MAX_PADDED][3] 
)

Definition at line 8 of file GEO_ellip_position.c.

◆ GEO_get_ancil_packet_time()

PGSt_double GEO_get_ancil_packet_time ( PGSt_double  in_time)

Definition at line 168 of file GEO_ephem_attit.c.

◆ GEO_get_ephatt_inputs()

PGSt_SMF_status GEO_get_ephatt_inputs ( PGSt_PC_Logical  file_logical,
PGSt_integer  file_version,
char  universal_references[][PGSd_UR_FIELD_SIZE] 
)

C****************************************************************************

!Description:
A routine for extracting from files in the SDP Toolkit's ephemeris or attitude file formats the names of the input files used to create them.

!Input Parameters: file_logical Identifies the file type to be read. file_version Identifies which one of those files to read.

!Output Parameters: universal_references An array for storing the universal reference strings extracted from that file.

Return Values: MODIS_E_BAD_INPUT_ARG If universal_references is null. MODIS_E_GEO If an SDP Toolkit subroutine failed. PGS_E_UNIX If a POSIX subroutine failed. PSG_S_SUCCESS Otherwise

Externally Defined: errno <errno.h> MODIS_E_BAD_INPUT_ARG "PGS_MODIS_35251.h" MODIS_E_GEO "PGS_MODIS_35251.h" PGS_E_UNIX "PGS_SMF.h" PSG_S_SUCCESS ` "PGS_SMF.h" PGSd_IO_Gen_Read "PGS_IO_Gen.h" PGSd_UR_FIELD_SIZE "PGS_EPH.h"

Called by: GEO_write_input_metadata() "GEO_output.h"

Routines Called: PGS_IO_Gen_Close() "PGS_IO.h" PGS_IO_Gen_Open() "PGS_IO.h" byteswap() "PGS_EPH_getEphemRecords.c"

!Revision History:

Log
GEO_get_ephatt_inputs.c,v

Revision 6.2 2010/06/29 19:47:10 kuyper Corrected order of arguments to fread(). Added an endianness check.

Revision 6.1 2010/05/27 21:15:34 kuyper Initial revision, MOD_PR03 6.0.3.

James Kuyper Jr. James.nosp@m..R.K.nosp@m.uyper.nosp@m.@nas.nosp@m.a.gov

!Team-unique Header: This software is developed by the MODIS Science Data Support Team for the National Aeronautics and Space Administration, Goddard Space Flight Center, under contract NAS5-32373.

References and Credits

Design Notes The ephemeris and attitude files were designed to have the same layout, at least with regard to all of the fields used by this program. The layout is defined by a C struct type. As such, it is inherently non-portable, because the C standard gives implementations a great deal of latitude for deciding how to lay out fields in a structure. However, the SDP Toolkit's own routines use this same approach, so if this rountine can't access those files correctly, neither will the Toolkit's routines. !END**************************************************************************

Definition at line 12 of file GEO_get_ephatt_inputs.c.

◆ GEO_get_geoid()

int GEO_get_geoid ( double  latitude,
double  longitude 
)

Definition at line 10 of file GEO_get_geoid.c.

◆ GEO_get_GRing_points()

PGSt_SMF_status GEO_get_GRing_points ( GEO_GRing_struct *const  GRing_points)

Definition at line 295 of file GEO_get_GRing_points.c.

◆ GEO_get_T_inst2ecr()

PGSt_SMF_status GEO_get_T_inst2ecr ( PGSt_integer  numValues,
char  asciiutc[],
const PGSt_double  offsets[],
sc_state_struct const  sc_state[],
double  sol_elev_cor[][3],
PGSt_integer const  eulerAngleOrder[],
double  T_sc2ecr[][3][3],
double  T_inst2ecr[][3][3],
double  ecr_position[][3],
double  ecr_velocity[][3],
PGSt_double  rpy[] 
)

Definition at line 249 of file GEO_get_T_inst2ecr.c.

◆ GEO_hires()

PGSt_SMF_status GEO_hires ( uint16  N_samp,
int  padded_samples,
double  hires_scale,
double  terrain_sample_position[][MAX_PADDED][3],
double  ecr_sample_position[][MAX_PADDED][3],
double  ecr_frame_position[][MAX_FRAMES][3],
uint8  sample_flags[][MAX_PADDED],
uint8  frame_flags[][MAX_FRAMES],
int8  hires_offsets[][DETECTORS_QKM][SAMPLES_QKM] 
)

C****************************************************************************

!Description:
Routine for calculating high resolution offsets that can be applied to bilinear interpolation of the low resolution positions, to give the high resolution positions.

!Input Parameters: N_samp Number of samples per frame for band padded_samples Total number of samples calculated. hires_scale Scale factor used for high resolution offsets. terrain_sample_position High resolution positions in geodetic coordinates. ecr_sample_position High resolution positions in ECR coordinates. ecr_frame_position Low resolution positions in ECR coordinates. sample_flags High resolution pixel flags frame_flags Low resolution pixel flags

!Output Parameters: hires_offsets High resolution scan, track, and height offsets.

Return values: MODIS_E_GEO_BAD_INPUT_ARG If any pointer argument is null. PGS_S_SUCCESS Otherwise

Externally Defined: DETECTORS_QKM "GEO_geo.h" DETECTORS_1KM "GEO_geo.h" INVALID_INPUT_DATA "GEO_geo.h" HIRES_FVALUE "GEO_geo.h" MAX_FRAMES "GEO_geo.h" MODIS_E_GEO_BAD_INPUT_ARG "PGS_MODIS_35251.h" MAX_PADDED "GEO_geo.h" PGS_S_SUCCESS "PGS_SMF.h"

Called by: GEO_aggregate "GEO_earth.h"

Routines Called: GEO_calculate_offsets "GEO_hires.c" GEO_triple_product "GEO_hires.c"

!Revision History: See top of file.

!Team-unique Header: This software is developed by the MODIS Science Data Support Team for the National Aeronautics and Space Administration, Goddard Space Flight Center, under contract NAS5-32373.

References and Credits N/A

Design Notes See PDL. !END**************************************************************************

Definition at line 205 of file GEO_hires.c.

◆ GEO_initialize_DEM()

PGSt_SMF_status GEO_initialize_DEM ( void  )

Definition at line 134 of file GEO_DEM.c.

◆ GEO_interp_ECR()

PGSt_SMF_status GEO_interp_ECR ( PGSt_double const  base_time,
PGSt_integer const  numValues,
const PGSt_double  offsets[],
GEO_param_struct const params,
char  asciiUTC[],
sc_state_struct  sc_state[],
double  T_sc2ecr[][3][3],
double  T_inst2ecr[][3][3],
double  positionECR[][3],
double  velocityECR[][3],
PGSt_double  rpy[],
uint32  sample_quality[][2] 
)

Definition at line 4 of file GEO_interp_ECR.c.

◆ GEO_interp_ephemeris_attitude()

PGSt_SMF_status GEO_interp_ephemeris_attitude ( PGSt_integer  numValues,
char  asciiUTC[],
PGSt_double  target_time,
const PGSt_double  offsets[],
GEO_param_struct const params,
sc_state_struct  sc_state[],
uint32  qualityFlags[][2],
PGSt_scTagInfo *  scTagInfo 
)

◆ GEO_latlon2height()

int GEO_latlon2height ( double const  lat,
double const  lon,
double *const  h 
)

Definition at line 944 of file GEO_DEM.c.

◆ GEO_read_DEM()

int GEO_read_DEM ( double  lat,
double  lon,
int *const  hgtmin,
int *const  hgtmax 
)

Definition at line 395 of file GEO_DEM.c.

◆ GEO_set_T_inst2sc()

PGSt_SMF_status GEO_set_T_inst2sc ( const internal_coord_trans_struct * const  ,
const ECS_metadata_struct * const   
)

Definition at line 104 of file GEO_get_T_inst2ecr.c.

◆ GEO_solar_and_lunar_vectors()

PGSt_SMF_status GEO_solar_and_lunar_vectors ( PGSt_double const  frame_time[],
frame_data_struct const *const  frame_data,
GEO_param_struct const *const  geo_params,
fill_values_struct const *const  fill_values,
celestial_bodies_struct *const  cb_vectors 
)

Definition at line 11 of file GEO_solar_and_lunar_vectors.c.

◆ GEO_terrain_correct()

PGSt_SMF_status GEO_terrain_correct ( int const  sample_number,
int const  num_detectors,
double  sample_view_vec[][MAX_PADDED][3],
double  ecr_sample_position[][MAX_PADDED][3],
double  ellip_sample_position[][MAX_PADDED][3],
unsigned char  sample_flags[][MAX_PADDED],
double  terrain_sample_position[][MAX_PADDED][3] 
)

Definition at line 8 of file GEO_terrain_correct.c.