|
ocssw
1.0
|
00001 #include "l1czcs.h" 00002 00003 void cz_sd_set( l1_data_struc *l1_data, gattr_struc *gattr ) 00004 /******************************************************************* 00005 00006 cz_sd_set 00007 00008 purpose: Propagate lat, lon extremes and some global 00009 attribute values into the line-by-line values 00010 00011 Returns type: void 00012 00013 Parameters: (in calling order) 00014 Type Name I/O Description 00015 ---- ---- --- ----------- 00016 l1_data_struc * l1_data I arrays data counts, lat, lons 00017 gattr_struc * gattr I/O structure with final 00018 attributes 00019 00020 Modification history: 00021 Programmer Date Description of change 00022 ---------- ---- --------------------- 00023 W. Robinson 7-Sep-2004 Original development 00024 00025 *******************************************************************/ 00026 { 00027 int i, j, nctlpix, nlin, ctr_ctl_pt; 00028 /* 00029 * set up some sizes 00030 */ 00031 nctlpix = gattr->n_ctl_pt; 00032 nlin = gattr->scan_lines; 00033 ctr_ctl_pt = ( nctlpix - 1 ) / 2; 00034 /* 00035 * set up the lat, lon, tilt, attitude, slope, intercept and gain per line 00036 */ 00037 for ( i = 0; i < nlin; i++ ) 00038 { 00039 l1_data->slat[i] = l1_data->ctl_pt_lat[ i * nctlpix ]; 00040 l1_data->slon[i] = l1_data->ctl_pt_lon[ i * nctlpix ]; 00041 l1_data->clat[i] = l1_data->ctl_pt_lat[ i * nctlpix + ctr_ctl_pt ]; 00042 l1_data->clon[i] = l1_data->ctl_pt_lon[ i * nctlpix + ctr_ctl_pt ]; 00043 l1_data->elat[i] = l1_data->ctl_pt_lat[ i * nctlpix + nctlpix - 1 ]; 00044 l1_data->elon[i] = l1_data->ctl_pt_lon[ i * nctlpix + nctlpix - 1 ]; 00045 00046 l1_data->tilt[i] = gattr->tilt; 00047 l1_data->att_ang[ i*3 ] = gattr->yaw; 00048 l1_data->att_ang[ i*3 + 1 ] = gattr->roll; 00049 l1_data->att_ang[ i*3 + 2 ] = gattr->pitch; 00050 for( j = 0; j < 6; j++ ) 00051 { 00052 l1_data->slope[ i*6 + j ] = gattr->slope[j]; 00053 l1_data->intercept[ i*6 + j ] = gattr->intercept[j]; 00054 } 00055 l1_data->gain[i] = (short) gattr->gain; 00056 } 00057 return; 00058 }
1.7.6.1