ocssw
V2022
|
mtl_geometry.c
Go to the documentation of this file.
68 along_angle = -band_smeta.fascan + (1.0 + npix) / 2.0 * (band_smeta.fascan + band_smeta.rascan) - band_smeta.aoffset;
160 sang = u_los.x / e_a * u_los.x / e_a + u_los.y / e_a * u_los.y / e_a + u_los.z / e_b * u_los.z / e_b;
161 sang = (-pos.x / e_a * u_los.x / e_a - pos.y / e_a * u_los.y / e_a - pos.z / e_b * u_los.z / e_b) / sqrt(sang * scale);
219 sang = u_los.x / e_a * u_los.x / e_a + u_los.y / e_a * u_los.y / e_a + u_los.z / e_b * u_los.z / e_b;
220 sang = (-pos.x / e_a * u_los.x / e_a - pos.y / e_a * u_los.y / e_a - pos.z / e_b * u_los.z / e_b) / sqrt(sang * scale);
325 sang = u_los.x / e_a * u_los.x / e_a + u_los.y / e_a * u_los.y / e_a + u_los.z / e_b * u_los.z / e_b;
326 sang = (-pos.x / e_a * u_los.x / e_a - pos.y / e_a * u_los.y / e_a - pos.z / e_b * u_los.z / e_b) / sqrt(sang * scale);
384 sang = u_los.x / e_a * u_los.x / e_a + u_los.y / e_a * u_los.y / e_a + u_los.z / e_b * u_los.z / e_b;
385 sang = (-pos.x / e_a * u_los.x / e_a - pos.y / e_a * u_los.y / e_a - pos.z / e_b * u_los.z / e_b) / sqrt(sang * scale);
467 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row, ndet, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
473 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row, ndet, &l1t_line[1], &l1t_samp[1]) != SUCCESS) {
478 start_row = (double) smeta.wrs_row - (0.7 * l1t_line[1] - 0.6 * l1t_line[0]) / (l1t_line[1] - l1t_line[0]);
479 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row, ndet, &ul_ls[0], &ul_ls[1]) != SUCCESS) {
494 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row, ndet, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
500 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row, ndet, &l1t_line[1], &l1t_samp[1]) != SUCCESS) {
505 stop_row = (double) smeta.wrs_row + (0.6 * (l1t_line[1] - max_line) + 0.7 * (max_line - l1t_line[0])) / (l1t_line[1] - l1t_line[0]);
506 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row, ndet, &lr_ls[0], &lr_ls[1]) != SUCCESS) {
513 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row, ndet, &ur_ls[0], &ur_ls[1]) != SUCCESS) {
521 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row, ndet, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
529 * ((ur_ls[0] - l1t_line[0])*(ul_ls[1] - l1t_samp[0]) - (ur_ls[1] - l1t_samp[0])*(ul_ls[0] - l1t_line[0]))
530 / ((ur_ls[1] - lr_ls[1])*(ul_ls[0] - l1t_line[0]) - (ur_ls[0] - lr_ls[0])*(ul_ls[1] - l1t_samp[0]));
536 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row, ndet, &ll_ls[0], &ll_ls[1]) != SUCCESS) {
544 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row, ndet, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
552 * ((ll_ls[0] - l1t_line[0])*(lr_ls[1] - l1t_samp[0]) - (ll_ls[1] - l1t_samp[0])*(lr_ls[0] - l1t_line[0]))
553 / ((ll_ls[1] - ul_ls[1])*(lr_ls[0] - l1t_line[0]) - (ll_ls[0] - ul_ls[0])*(lr_ls[1] - l1t_samp[0]));
562 if (project_point(wrsparms, smeta, *dellon, band, sca, stop_row - (*delrow), ndet, &ur_ls[0], &ur_ls[1]) != SUCCESS) {
571 if (project_point(wrsparms, smeta, *dellon, band, sca, start_row + (*delrow), ndet, &ll_ls[0], &ll_ls[1]) != SUCCESS) {
578 dlon = smeta.band_smeta[band_index].pixsize * (max_samp - MAX(MAX(ul_ls[1], ur_ls[1]), MAX(ll_ls[1], lr_ls[1]))
584 radius = cos(d2r * sc_lat) * wrsparms.semimajor / sqrt(1.0 - e2 * sin(d2r * sc_lat) * sin(d2r * sc_lat));
623 (smeta.spacecraft_id == IAS_L1 || smeta.spacecraft_id == IAS_L2 || smeta.spacecraft_id == IAS_L3) )
642 if (project_point_ls(wrsparms, smeta, *dellon, band, start_row, nsamp, nline, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
648 if (project_point_ls(wrsparms, smeta, *dellon, band, start_row, nsamp, nline, &l1t_line[1], &l1t_samp[1]) != SUCCESS) {
653 start_row = (double) smeta.wrs_row - (0.6 * l1t_line[1] - 0.5 * l1t_line[0]) / (l1t_line[1] - l1t_line[0]);
654 // start_row = (double)smeta.wrs_row - (0.8*l1t_line[1] - 0.5*l1t_line[0])/(l1t_line[1] - l1t_line[0]);
655 if (project_point_ls(wrsparms, smeta, *dellon, band, start_row, nsamp, nline, &ul_ls[0], &ul_ls[1]) != SUCCESS) {
669 if (project_point_ls(wrsparms, smeta, *dellon, band, stop_row, nsamp, nline, &l1t_line[0], &l1t_samp[0]) != SUCCESS) {
675 if (project_point_ls(wrsparms, smeta, *dellon, band, stop_row, nsamp, nline, &l1t_line[1], &l1t_samp[1]) != SUCCESS) {
680 stop_row = (double) smeta.wrs_row + (0.5 * (l1t_line[1] - max_line) + 0.6 * (max_line - l1t_line[0])) / (l1t_line[1] - l1t_line[0]);
681 // stop_row = (double)smeta.wrs_row + (0.5*(l1t_line[1] - max_line) + 0.8*(max_line - l1t_line[0]))/(l1t_line[1] - l1t_line[0]);
682 if (project_point_ls(wrsparms, smeta, *dellon, band, stop_row, nsamp, nline, &lr_ls[0], &lr_ls[1]) != SUCCESS) {
691 if (project_point_ls(wrsparms, smeta, *dellon, band, start_row, nsamp, nline, &ur_ls[0], &ur_ls[1]) != SUCCESS) {
700 if (project_point_ls(wrsparms, smeta, *dellon, band, stop_row, nsamp, nline, &ll_ls[0], &ll_ls[1]) != SUCCESS) {
710 dlon = smeta.band_smeta_ls[band_index].pixsize * (max_samp - MAX(MAX(ul_ls[1], ur_ls[1]), MAX(ll_ls[1], lr_ls[1]))
716 radius = cos(d2r * sc_lat) * wrsparms.semimajor / sqrt(1.0 - e2 * sin(d2r * sc_lat) * sin(d2r * sc_lat));
817 if (calc_yaw_steering_gp_ls(wrsparms, pos, vel, slos, smeta.roll_angle, &gp_lat, &gp_lon) < 0) {
979 *lat = atan(tan(gc_lat) * parms.semimajor / parms.semiminor * parms.semimajor / parms.semiminor) / d2r;
982 dnodelon = 360.0 + 180.0 + parms.path1long - (double) (path - 1)*360.0 / (double) parms.numpath;
986 dlon = atan2(tan(d2r * gc_lat) / tan(parms.orbitincl), cos(d2r * cta) / cos(d2r * gc_lat)) / d2r;
1025 dnodelon = 360.0 + 180.0 + parms.path1long - (double) (path - 1)*360.0 / (double) parms.numpath + dellon;
int frame_scene_ls(WRS2 wrsparms, SMETA smeta, double *dellon, double *delrow)
Definition: mtl_geometry.c:591
Definition: smeta.h:95
int smeta_band_number_to_index(SMETA *smeta, int band)
Definition: smeta_geometry.c:205
void pathrow_to_posvel(WRS2 parms, int path, double dellon, double wrsrow, VECTOR *pos, VECTOR *vel)
Definition: mtl_geometry.c:1003
int calc_los(SMETA_BAND band_smeta, int sca, double ndet, VECTOR *los)
Definition: mtl_geometry.c:19
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
Definition: HOWTO_Add_a_product.txt:42
Definition: mtl_geometry.h:35
int smeta_proj_to_l1t(SMETA *smeta, int band, double proj_x, double proj_y, double *l1t_line, double *l1t_samp)
Definition: smeta_geometry.c:73
void pathrow_to_latlon(WRS2 parms, int path, double wrsrow, double *lat, double *lon)
Definition: mtl_geometry.c:959
Definition: mtl_geometry.h:21
int calc_yaw_steering_gp(WRS2 parms, VECTOR pos, VECTOR vel, VECTOR i_los, double roll, double *gp_lat, double *gp_lon)
Definition: mtl_geometry.c:100
int calc_yaw_steering_gp_ls(WRS2 parms, VECTOR pos, VECTOR vel, VECTOR i_los, double roll, double *gp_lat, double *gp_lon)
Definition: mtl_geometry.c:265
Definition: smeta.h:80
int frame_scene(WRS2 wrsparms, SMETA smeta, double *dellon, double *delrow)
Definition: mtl_geometry.c:419
int smeta_geodetic_to_ecf2lsr(double lat, double lon, double ecf2lsr[3][3])
Definition: smeta_geometry.c:48
int project_point_ls(WRS2 wrsparms, SMETA smeta, double dellon, int band, double frow, double npix, double ndet, double *l1t_line, double *l1t_samp)
Definition: mtl_geometry.c:781
int get_ecfsun(WRS2 wrsparms, SMETA smeta, double dellon, VECTOR *ecfsun)
Definition: mtl_geometry.c:849
int get_ecfsun_ls(WRS2 wrsparms, SMETA smeta, double dellon, VECTOR *ecfsun)
Definition: mtl_geometry.c:900
int smeta_geodetic_to_proj(SMETA_SCENE_PROJ proj, double lat, double lon, double *proj_x, double *proj_y)
Definition: smeta_geometry.c:158
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464
Definition: smeta.h:118
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned on(as it will be in Near-Real-Time processing).
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
int calc_los_ls(SMETA_BAND_LS band_smeta, double frow, double npix, double ndet, VECTOR *los)
Definition: mtl_geometry.c:52
int project_point(WRS2 wrsparms, SMETA smeta, double dellon, int band, int sca, double frow, double ndet, double *l1t_line, double *l1t_samp)
Definition: mtl_geometry.c:722