2 /* Darwin data structures and parameters
5 * Applied Research Corp.
9 * added tg_file_str structure 09 Jun 93 ...Mike
11 * updated with new tg_ray_data structure 5/6/93 ...Mike
12 * This structure is intended to supercede rp_ray
14 * updated for use with libtg 8/13/92
26 #define TG_END_DATA -3
27 #define TG_REC_NOSEQ -4
28 #define TG_RAY_NOTYPE -5
29 #define TG_RAY_READ_ERR -6
31 #define TG_HDSIZE 1280
32 #define TG_RECSIZE 4096
39 /* field indices for tg_ray_data.da_inv */
40 #define TG_DM_IND 0 /* uncorrected reflectivity */
41 #define TG_DZ_IND 1 /* corrected reflectivity */
42 #define TG_VR_IND 2 /* radial velocity */
43 #define TG_SW_IND 3 /* spectral width */
45 /* missing data flag */
46 #define TG_NO_DATA 0x1000
56 /****** rp_ray is the old, outdated structure in which to
57 store (toga format-encoded) ray data. I have removed references
58 to it in the toga library libtg.a .
59 Use instead the tg_ray_data structure below, in which decoded
60 ray data is stored....Mike */
65 short bin[1800]; /* raw (encoded) ray data in toga format */
71 float azm; /* azimuth angle */
72 float elev; /* elevation angle */
73 /* time */ /* time of some sort (not done yet) */
74 int da_inv[4]; /* data inventory */
75 short num_bins[4]; /* number of bins */
76 float start_km[4]; /* start range of data in km*/
77 float interval_km[4]; /* interval of range bins in km */
78 float data[4][1024]; /* real value data */
85 short axrat; /* axial ratio in signed hundredths */
86 short ort_hor; /* orientation ccw of horizontal in degrees */
87 short pw_div_bits; /* power divider bits (A) in low 7 bits */
88 short delay_bits; /* delay bits (P) in low 7 bits */
95 /* storm id : word 1*/
102 /* time of start of scan : word 6*/
113 /* transmit polarization 1.1 : word 13*/
119 /* transmit polarization 1.2 : word 17*/
125 /* status bits : word 21*/
129 short strng; /* start range */
130 short numbin; /* number of data bins */
131 short rnginc; /* range increment between bins */
132 short rngjit; /* range jitter boollean */
133 short numcbin; /* number of range cal bins */
134 short strtcal1; /* start range of cal bins #1 */
135 short strtcal2; /* start range if cak bubs #2 */
136 short stepcal; /* step between cal bins 1 & 3 and 2 & 4 */
137 short azmleft; /* azimuth left, min azimuth */
138 short azmrght; /* azimuth right, max azimuth */
139 short elev_low; /* elevation low */
140 short elev_hgh; /* elevation high */
143 short at_angres; /* attempted angular res */
144 short numfix_ang; /* num fixed angles used */
145 short angfix[20]; /* angles used for fixed coordinate */
148 short rlparm; /* real time display parameters */
149 short signois; /* signal to noise threshold */
150 short sigcltr; /* signal to clutter threshold */
151 short thrsh_flg; /* threshold flags */
154 short numdsp; /* number of doppler signal processors working */
155 short numwrd; /* number of words which are difined in ray header */
158 short scanmod; /* scan mode */
159 char filename[16]; /* file name if scan mode is file (value 4)*/
163 short transiz; /* number of samp per proc interval (transform size) */
164 short spconf; /* signal processor configuration */
167 short sufchar; /* suffix character of data base directory */
170 short recsat1; /* receiver saturation or */
171 short recsat2; /* 0 if standard rang-dependent STC was used */
173 /*words 77 to 88 : bias levels set to zeor if not applicable */
176 short dsp1cor_log; /* co rec dsp 1, log rec noise level */
177 short dsp1cor_iad; /* co rec dsp 1, "I" a/d offset */
178 short dsp1cor_qad; /* co rec dsp 1, "Q" a/d offset */
181 short dsp1crr_log; /* cross rec dsp 1, log rec noise level */
182 short dsp1crr_iad; /* cross rec dsp 1, "I" a/d offset */
183 short dsp1crr_qad; /* cross rec dsp 1, "Q" a/d offset */
186 short dsp2cor_log; /* co rec dsp 2, log rec noise level */
187 short dsp2cor_iad; /* co rec dsp 2, "I" a/d offset */
188 short dsp2cor_qad; /* co rec dsp 2, "Q" a/d offset */
191 short dsp2crr_log; /* cross rec dsp 2, log rec noise level */
192 short dsp2crr_iad; /* cross rec dsp 2, "I" a/d offset */
193 short dsp2crr_qad; /* cross rec dsp 2, "Q" a/d offset */
196 short wavelen; /* wavelength in hundredths of cm */
197 short pulsewd; /* pulse width in hundredths of microsec. */
198 short hortran_pow; /* horizontal transmit power */
199 short vertran_pow; /* vertical transmit power */
202 short high_zero; /* height of zeroing in kilomiters */
203 short sitelat; /* latitude in .01 deg (if zero see words 108-111)*/
204 short sitelong; /* longitude in .01 deg (if zero see words 108-111)*/
205 short time_zone; /* time zone of rec time, minutes ahead of GMT */
208 short zm_dsp1_mas; /* Z slope, dsp 1, master board */
209 short zm_dsp1_slv; /* Z slope, dsp 1, slave board */
210 short zm_dsp2_mas; /* Z slope, dsp 2, master board */
211 short zm_dsp2_slv; /* Z slope, dsp 2, slave board */
214 short minz_dsp1_mas; /* minimum detectable Z, dsp 1, master */
215 short minz_dsp1_slv; /* minimum detectable Z, dsp 1, slave */
216 short minz_dsp2_mas; /* minimum detectable Z, dsp 2, master */
217 short minz_dsp2_slv; /* minimum detectable Z, dsp 2, slave */
220 short num_pol; /* number of polarization pairs used above 1 */
223 short exinfo_rayhd; /* extra information in ray header */
224 /* bit 0 : IFF data available */
225 /* bit 1 : roll available */
226 /* bit 2 : pitch available */
227 /* bit 3 : heading available */
230 short len_exhd; /* length of extended ray header ( 0 means 20 words) */
233 short lat_deg; /* latitude degrees */
234 short lat_hun_min; /* latitude in .01 minutes */
235 short lon_deg; /* longitude degrees */
236 short lon_hun_min; /* longitude in .01 minutes */
239 short alt_atn; /* altitude of antenna in meters above sea level*/
240 short alt_grn; /* altitude of ground at radar site in meters */
243 short vel_plat; /* speed of platform from senser in .01 meters/sec */
244 short vel_cor; /* velocity value loaded into dsp for vel correction */
245 short head_plat; /* heading of platform from sensor in .1 degrees */
246 short head_dsp; /* heading loaded into dsp */
249 short set_plat; /* set of platform (signed 1/10 degrees) */
250 short drift_plat; /* drift of platform (1/100 meters per sec */
251 short ok_plat; /* ok flags for words 108 to 120 */
252 /* bit 0: navigator input ok */
253 /* bit 1: navigator used for lat, long */
254 /* bit 2: navigator used for altitude */
255 /* bit 3: navigator used for speed and heading */
256 /* bit 4: mavigator used for set and drift */
263 tg_tran_pol_str tp21; /* transmit polarization 2.1 */
264 tg_tran_pol_str tp22; /* transmit polarization 2.2 */
267 tg_tran_pol_str tp31; /* transmit polarization 3.1 */
268 tg_tran_pol_str tp32; /* transmit polarization 3.2 */
271 tg_tran_pol_str tp41; /* transmit polarization 4.1 */
272 tg_tran_pol_str tp42; /* transmit polarization 4.2 */
275 tg_tran_pol_str tp51; /* transmit polarization 5.1 */
276 tg_tran_pol_str tp52; /* transmit polarization 5.2 */
279 tg_tran_pol_str tp61; /* transmit polarization 6.1 */
280 tg_tran_pol_str tp62; /* transmit polarization 6.2 */
283 tg_tran_pol_str tp71; /* transmit polarization 7.1 */
284 tg_tran_pol_str tp72; /* transmit polarization 7.2 */
287 tg_tran_pol_str tp81; /* transmit polarization 8.1 */
288 tg_tran_pol_str tp82; /* transmit polarization 8.2 */
329 /* tg_file_str contains all info relevant to one open toga data file */
335 short dec_buf[32768]; /*** Buffer and pointers for tg_read_map_bytes. */
337 int buf_end; /****************/
338 tg_data_rec_str recbuf; /*** buffer and indices for tg_read_rec_bytes. */
341 int recnum; /*************/
342 tg_map_head_str map_head;
343 tg_ray_head_str ray_head;