X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=wsr88d_m31.c;fp=wsr88d_m31.c;h=2ae2143ee936d4ec589300a4cd045563a9a69438;hb=01560cc947c59aa600473158dfe26ea0dfaf0823;hp=3cd4f4cfb86418cbcc74a2065e3b2aabd3a391eb;hpb=da18c5859f2c4b449544ed9c5d2a96a53d43f377;p=~andy%2Frsl diff --git a/wsr88d_m31.c b/wsr88d_m31.c index 3cd4f4c..2ae2143 100644 --- a/wsr88d_m31.c +++ b/wsr88d_m31.c @@ -392,11 +392,14 @@ void wsr88d_load_ray_into_radar(Wsr88d_ray_m31 *wsr88d_ray, int isweep, int vol_index, waveform; char *type_str; - int keep_hi_prf_dz = 0; /* TODO: implement an interface for this. */ + extern int rsl_qfield[]; /* See RSL_select_fields in volume.c */ enum waveforms {surveillance=1, doppler_w_amb_res, doppler_no_amb_res, batch}; + int merging_split_cuts; + + merging_split_cuts = wsr88d_merge_split_cuts_is_set(); nfields = wsr88d_ray->ray_hdr.data_block_count - nconstblocks; field_offset = (int *) &wsr88d_ray->ray_hdr.radial_const; do_swap = little_endian(); @@ -418,6 +421,10 @@ void wsr88d_load_ray_into_radar(Wsr88d_ray_m31 *wsr88d_ray, int isweep, iray); return; } + + /* Is this field in the selected fields list? */ + if (!rsl_qfield[vol_index]) continue; + switch (vol_index) { case DZ_INDEX: f = DZ_F; invf = DZ_INVF; type_str = "Reflectivity"; break; @@ -435,13 +442,17 @@ void wsr88d_load_ray_into_radar(Wsr88d_ray_m31 *wsr88d_ray, int isweep, waveform = vcp_data.waveform[isweep]; - /* Ignore short-range reflectivity from velocity split cuts unless - * keep_hi_prf_dz is set. The indicators for this type of - * reflectivity are surveillance mode of 0 and elevation angle - * below 6 degrees. + /* If this field is reflectivity, check to see if it's from the velocity + * sweep in a split cut. If so, we normally skip it since we already + * have reflectivity from the surveillance sweep. It is kept only when + * the user has turned off merging of split cuts. We skip over this + * field if all of the following are true: surveillance PRF number is 0, + * waveform is Contiguous Doppler with Ambiguity Resolution (range + * unfolding), and we're merging split cuts. */ if (vol_index == DZ_INDEX && (vcp_data.surveil_prf_num[isweep] == 0 && - vcp_data.fixed_angle[isweep] < 6.0 && !keep_hi_prf_dz)) + vcp_data.waveform[isweep] == doppler_w_amb_res && + merging_split_cuts)) continue; /* Load the data for this field. */ @@ -543,6 +554,7 @@ Radar *wsr88d_load_m31_into_radar(Wsr88d_file *wf) msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg); radar = RSL_new_radar(MAX_RADAR_VOLUMES); + memset(&wsr88d_ray, 0, sizeof(Wsr88d_ray_m31)); /* Initialize to be safe. */ while (! end_of_vos) { if (msghdr.msg_type == 31) {