1 diff -w -ru rsl-v1.40/wsr88d_m31.c rsl-v1.40.test/wsr88d_m31.c
2 --- rsl-v1.40/wsr88d_m31.c 2008-10-08 23:43:03.000000000 +0000
3 +++ rsl-v1.40.test/wsr88d_m31.c 2009-05-14 10:06:23.000000000 +0000
5 m1_ray.vol_cpat = vcp_data.vcp;
6 m1_ray.elev_num = ray_hdr.elev_num;
7 m1_ray.unam_rng = wsr88d_ray.unamb_rng;
8 + m1_ray.nyq_vel = wsr88d_ray.nyq_vel; // TODO: is this correct?
9 if (ray_hdr.azm_res != 1)
10 ray->h.beam_width = 1.0;
11 else ray->h.beam_width = 0.5;
13 radar->v[vol_index]->sweep[isweep]->ray[iray] = ray;
14 radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1;
16 + free(wsr88d_ray.ref->data);
17 + free(wsr88d_ray.ref);
20 if (wsr88d_ray.ray_hdr.dbptr_vel > 0) {
22 wsr88d_load_ray_hdr(wsr88d_ray, ray);
23 radar->v[vol_index]->sweep[isweep]->ray[iray] = ray;
24 radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1;
25 + free(wsr88d_ray.vel->data);
26 + free(wsr88d_ray.vel);
29 if (wsr88d_ray.ray_hdr.dbptr_sw > 0) {
31 wsr88d_load_ray_hdr(wsr88d_ray, ray);
32 radar->v[vol_index]->sweep[isweep]->ray[iray] = ray;
33 radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1;
34 + free(wsr88d_ray.sw->data);
35 + free(wsr88d_ray.sw);
40 * at the WSR-88D Radar Operations Center web site.
43 - n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr);
45 - /* printf("msgtype = %d\n", msghdr.msg_type); */
46 - msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg);
49 radar = RSL_new_radar(MAX_RADAR_VOLUMES);
51 while (! end_of_vos) {
52 + /* Read current header */
53 + n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr);
55 + fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: ");
56 + if (feof(wf->fptr) != 0) fprintf(stderr,
57 + "Unexpected end of file.\n");
58 + else fprintf(stderr,"Failed reading msghdr.\n");
59 + fprintf(stderr,"Current sweep number: %d\n"
60 + "Last ray read: %d\n", isweep+1, iray);
61 + wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
65 + /* printf("msgtype = %d\n", msghdr.msg_type); */
66 + msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg);
68 if (msghdr.msg_type == 31) {
69 if (little_endian()) wsr88d_swap_m31_hdr(&msghdr);
72 /* Load this ray into radar structure ray. */
73 wsr88d_load_ray_into_radar(wsr88d_ray, isweep, iray, radar);
76 + /* Check for end of sweep */
77 + if (wsr88d_ray.ray_hdr.radial_status == END_OF_ELEV) {
78 + wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
83 + if (wsr88d_ray.ray_hdr.radial_status == END_VOS) {
84 + //wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
88 else { /* msg_type not 31 */
89 n = fread(&non31_seg_remainder, sizeof(non31_seg_remainder), 1,
91 radar->h.vcp = vcp_data.vcp;
92 /* printf("VCP = %d\n", vcp_data.vcp); */
94 + /* TODO: check for end of sweep/volume */
97 - /* Check for end of sweep */
98 - if (wsr88d_ray.ray_hdr.radial_status == END_OF_ELEV) {
99 - wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
104 - if (wsr88d_ray.ray_hdr.radial_status != END_VOS) {
105 - n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr);
107 - fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: ");
108 - if (feof(wf->fptr) != 0) fprintf(stderr,
109 - "Unexpected end of file.\n");
110 - else fprintf(stderr,"Failed reading msghdr.\n");
111 - fprintf(stderr,"Current sweep number: %d\n"
112 - "Last ray read: %d\n", isweep+1, iray);
113 - wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
118 + if (feof(wf->fptr) != 0)
120 - wsr88d_load_sweep_header(radar, isweep, wsr88d_ray);
122 - if (feof(wf->fptr) != 0) end_of_vos = 1;
126 diff -w -ru rsl-v1.40/wsr88d_to_radar.c rsl-v1.40.test/wsr88d_to_radar.c
127 --- rsl-v1.40/wsr88d_to_radar.c 2008-07-30 22:41:20.000000000 +0000
128 +++ rsl-v1.40.test/wsr88d_to_radar.c 2009-05-14 10:07:09.000000000 +0000
130 radar->h.lpulse = sitep->lpulse;
132 radar = RSL_prune_radar(radar);