X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=src%2Fwsr88d_to_radar.c;h=a29054559bc11a7bfdeb407fe8d946356e19c4be;hb=dd2c9b42e69e72e536a4176316ea1e825485a88f;hp=6966143ff14777a519fe5bbd22fbdedb9a23fe85;hpb=5ef44003b45c7eb13fd3f7c86a933dba4c21a190;p=~andy%2Frsl diff --git a/src/wsr88d_to_radar.c b/src/wsr88d_to_radar.c index 6966143..a290545 100644 --- a/src/wsr88d_to_radar.c +++ b/src/wsr88d_to_radar.c @@ -234,6 +234,7 @@ Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file) char *the_file; int expected_msgtype = 0; char version[8]; + int vnum; extern int rsl_qfield[]; /* See RSL_select_fields in volume.c */ extern int *rsl_qsweep; /* See RSL_read_these_sweeps in volume.c */ @@ -295,24 +296,16 @@ Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file) /* * Get the expected digital radar message type based on version string * from the Archive II header. The message type is 31 for Build 10, and 1 - * for prior builds. Note that we consider AR2V0001 to be message type 1, - * because it has been in the past, but with Build 10 this officially - * becomes the version number for Evansville (KVWX), which will use message - * type 31. This could be a problem if RSL is used to process KVWX. + * for prior builds. */ if (n > 0) { strncpy(version, wsr88d_file_header.title.filename, 8); - if (strncmp(version,"AR2V0007",8) == 0 || - strncmp(version,"AR2V0006",8) == 0 || - strncmp(version,"AR2V0004",8) == 0 || - strncmp(version,"AR2V0003",8) == 0 || - strncmp(version,"AR2V0002",8) == 0) { - expected_msgtype = 31; - } - else if (strncmp(version,"ARCHIVE2",8) == 0 || - strncmp(version,"AR2V0001",8) == 0) { - expected_msgtype = 1; + if (strncmp(version,"AR2V",4) == 0) { + sscanf(version, "AR2V%4d", &vnum); + if (vnum > 1) expected_msgtype = 31; + else expected_msgtype = 1; } + else if (strncmp(version,"ARCHIVE2",8) == 0) expected_msgtype = 1; } if (n <= 0 || expected_msgtype == 0) { @@ -331,9 +324,7 @@ Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file) if (expected_msgtype == 31) { - /* Get radar for message type 31. */ - nvolumes = 6; radar = wsr88d_load_m31_into_radar(wf); if (radar == NULL) return NULL; } @@ -441,6 +432,6 @@ Radar *RSL_wsr88d_to_radar(char *infile, char *call_or_first_tape_file) free(sitep); - radar = RSL_prune_radar(radar); + if (wsr88d_merge_split_cuts_is_set()) radar = wsr88d_merge_split_cuts(radar); return radar; }