101 const size_t len_bufchd = 96;
102 const size_t len_bufpcd = 320;
103 const size_t len_bufblk = 64;
104 unsigned char *bufchd, *bufpcd, *bufblk, *bufdat;
106 float s_az, e_az, s_el, e_el;
107 float tx_pilot,return_pilot;
108 int i,
j,
k, iss, i0, i1, i2, i3, rnum, aznum, elnum;
109 int r_byte, irb, irb1, irb2;
110 int ios_obs, ios_spec, ios_loc, ios_rt, ios_mesh;
111 int ideg, ibunshi, ibunbo;
112 int prf, hit_num, long_pulse;
113 const float ideg2deg = (180.0 / 8192.0);
122 for(
k = 0;
k < elnum;
k++) {
125 if(buf_offset == bufsize) {
128 }
else if(buf_offset + len_bufchd > bufsize) {
129 printf(
"# abnormal record length in common header\n");
132 bufchd = buf + buf_offset;
133 buf_offset += len_bufchd;
135 hd->
s_yr = 1000 * (bufchd[20] >> 4) + 100 * (bufchd[20] & 15) + 10 * (bufchd[21] >> 4) + (bufchd[21] & 15);
136 hd->
s_mn = 10 * (bufchd[22] >> 4) + (bufchd[22] & 15);
137 hd->
s_dy = 10 * (bufchd[23] >> 4) + (bufchd[23] & 15);
138 hd->
s_hr = 10 * (bufchd[24] >> 4) + (bufchd[24] & 15);
139 hd->
s_mi = 10 * (bufchd[25] >> 4) + (bufchd[25] & 15);
140 hd->
s_sc = 10 * (bufchd[26] >> 4) + (bufchd[26] & 15);
141 hd->
e_yr = 1000 * (bufchd[28] >> 4) + 100 * (bufchd[28] & 15) + 10 * (bufchd[29] >> 4) + (bufchd[29] & 15);
142 hd->
e_mn = 10 * (bufchd[30] >> 4) + (bufchd[30] & 15);
143 hd->
e_dy = 10 * (bufchd[31] >> 4) + (bufchd[31] & 15);
144 hd->
e_hr = 10 * (bufchd[32] >> 4) + (bufchd[32] & 15);
145 hd->
e_mi = 10 * (bufchd[33] >> 4) + (bufchd[33] & 15);
146 hd->
e_sc = 10 * (bufchd[34] >> 4) + (bufchd[34] & 15);
147 hd->
data_size = 0x10000 * bufchd[10] + 0x100 * bufchd[9] + bufchd[8];
150 if(buf_offset + len_bufpcd > bufsize) {
151 printf(
"# abnormal record length in polar-coords-data header\n");
154 bufpcd = buf + buf_offset;
155 buf_offset += len_bufpcd;
164 hd->
el_num = bufpcd[ios_obs + 10];
236 for(
j = 0;
j < aznum;
j++) {
239 if(buf_offset + len_bufblk > bufsize) {
240 printf(
"# abnormal record length in data block\n");
243 bufblk = buf + buf_offset;
244 buf_offset += len_bufblk;
251 long_pulse = bufblk[34];
271 bufdat = buf + buf_offset;
279 for(
i = 0;
i < rnum;
i++) {
283 for(
i = 0;
i < rnum;
i++) {