2 * RADTEC Version 3.20 data structures.
10 NASA/TRMM, Code 910.1.
11 This is the TRMM Office Radar Software Library.
14 Space Applications Corporation
17 This library is free software; you can redistribute it and/or
18 modify it under the terms of the GNU Library General Public
19 License as published by the Free Software Foundation; either
20 version 2 of the License, or (at your option) any later version.
22 This library is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 Library General Public License for more details.
27 You should have received a copy of the GNU Library General Public
28 License along with this library; if not, write to the Free
29 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 * An integer word in RADTEC is 16 bits, however, floats and doubles
35 * are 32 and 64 bits respectively.
46 } Video_calibration; /* 16 bytes */
50 short reference_range;
53 } Radar_calibration; /* 20 bytes */
56 Video_calibration video_cal;
57 Radar_calibration radar_cal;
58 } Log_video_transmitter; /* 36 bytes */
60 typedef Log_video_transmitter Doppler_transmitter;
63 short doppler_velocity_range; /* 0=0-16, 1=0-32 */
64 short ground_clutter_filter_status;
65 short adtnl_log_gc_filter_status;
66 short adtnl_lin_gc_filter_status;
70 short version; /* Version number multiplied by 100. 320 means 3.20 */
71 short scan_type; /* 1=PPI, 2=RHI */
72 short scan_mode; /* Recording mode. 0=Log Video, 1=Doppler */
73 short seqno; /* Sequence number of this data file. */
74 short month; /* 1-12 */
76 short year; /* YYYY */
77 short hour; /* 0-23 */
80 float az_el; /* RHI azimuth or PPI elevation in degrees. */
81 double azim_resolution;
83 double elev_resolution;
85 double site_elevation;
87 double site_longitude;
88 float skip; /* In microseconds, 1-1024. */
89 float range_bin_size; /* In microseconds, 1-1024. */
90 short num_range_bins; /* 16-240. */
91 short num_integrations; /* # of integrations comprising each ray. 1-1024. */
92 short num_rays; /* Number of rays. */
93 Log_video_transmitter log_video;
94 Doppler_transmitter doppler;
95 short model; /* Processor model. 0=none, 1=750, 2=940, 3=950. */
96 Model_info model_info;
97 char spare[12]; /* Fill to 200 bytes. */
101 short ray_num; /* Ray number. 0-n */
102 float azim_angle; /* Azimuth angle in degrees. */
103 float elev_angle; /* Elevation angle in degrees. */
104 short hour; /* 0-23 */
105 short min; /* 0-59 */
106 short sec; /* 0-59 */
109 typedef float Radtec_dbz[240];
111 Radtec_ray_header *h; /* May be set during reading of data. Can
112 * be safely ignored. However, you'd have
113 * to maintain two arrays -- headers and rays.
124 void radtec_free_file(Radtec_file *rfile);
125 Radtec_file *radtec_read_file(char *infile);
126 void radtec_print_header(Radtec_header *h);
127 void radtec_print_ray_header(Radtec_ray_header *h);
129 unsigned int _explode(
130 unsigned int (*read_buf)(char *buf, unsigned int *size, void *param),
131 void (*write_buf)(char *buf, unsigned int *size, void *param),
135 unsigned long _crc32(
138 unsigned long *old_crc);