4 void hdr_2_gattr(HEADER2_TYPE header2, gattr_struc *gattr)
32 gattr->start_year = header2.starting_yr;
33 gattr->start_day = header2.starting_day;
34 gattr->start_msec = header2.start_msec;
36 time_str(header2.starting_yr, header2.starting_day, header2.start_msec,
41 time_str(header2.scene_cntr_yr, header2.scene_cntr_doy,
42 header2.scene_cntr_msec, gattr->center_time);
44 gattr->orbit = (
unsigned short) header2.orbit;
45 gattr->gain = header2.gain;
46 gattr->thresh = header2.threshold;
47 gattr->tilt = header2.tilt / 1000.;
49 gattr->center_lat = header2.lat_cntr / 100. - 90.;
50 us = (
unsigned short) header2.long_cntr;
51 gattr->center_lon = (us > 18000) ? us / 100. - 360. : us / 100.;
53 gattr->pix_per_scan = 1968;
54 gattr->scan_lines = header2.no_of_scans;
61 gattr->limits[0] = (header2.lat_crnr_litl > header2.lat_crnr_litr) ?
62 header2.lat_crnr_litl / 100. : header2.lat_crnr_litr / 100.;
64 gattr->limits[1] = (header2.lat_crnr_fitl < header2.lat_crnr_fitr) ?
65 header2.lat_crnr_fitl / 100. : header2.lat_crnr_fitr / 100.;
67 gattr->limits[2] = (header2.long_crnr_fitl < header2.long_crnr_litl) ?
68 header2.long_crnr_fitl / 100. : header2.long_crnr_litl / 100.;
70 gattr->limits[3] = (header2.long_crnr_fitr > header2.long_crnr_litr) ?
71 header2.long_crnr_fitr / 100. : header2.long_crnr_litr / 100.;
76 for (
i = 0;
i < 6;
i++) {
84 gattr->roll = header2.cntr_roll / 1000.;
85 gattr->pitch = header2.cntr_pitch / 1000.;
86 gattr->yaw = header2.cntr_yaw / 1000.;
90 gattr->ilt_flags = header2.ilt_flags;
91 gattr->parm_presence = header2.parameter_presence;
92 gattr->n_miss_scans = header2.no_of_missing_scans_all;
93 for (
i = 0;
i < 6;
i++)
94 gattr->n_scan_mis_chan[
i] = header2.no_of_missing_scans[
i];
95 gattr->n_hdt_sync_loss = header2.no_of_hdt_sync_losses;
96 gattr->n_hdt_parity_err = header2.no_of_hdt_parity_errs;
97 gattr->n_wbvt_sync_loss = header2.no_of_wbvt_sync_losses;
98 gattr->n_wbvt_slips = header2.no_of_wbvt_bit_slips;