]> Pileus Git - ~andy/rsl/blobdiff - src/rainbow_to_radar.c
Fix more errors
[~andy/rsl] / src / rainbow_to_radar.c
index 409ecdf26c8c88b6a11a4f77728b7ba657b29a96..5dc0a28269081c3f9a0010cdcffe3d5e07aa0780 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include "rsl.h"
 #include "rainbow.h"
 
@@ -74,6 +75,8 @@ Radar *RSL_rainbow_to_radar(char *infile)
     Rainbow_hdr rainbow_hdr;
     struct dms latdms, londms;
 
+    void read_rainbow_header(Rainbow_hdr *, FILE *);
+
     /* These next lines allow program to read from a regular file, a
      * compressed file, or standard input.  I lifted them from RSL_uf_to_radar
      * by John Merritt.
@@ -175,13 +178,14 @@ int rainbow_data_to_radar(Radar *radar, Rainbow_hdr rainbow_hdr, FILE *fp)
      * and sweeps continues for the remainder of sweeps in the volume scan.
      */
 
-    int iray, isweep, nread, nsweeps, nrays, nbins, vol_index;
+    int iray, isweep, nread, nsweeps, nrays, nbins;
     unsigned char *rainbow_ray;
     Volume *v;
     Sweep *sweep;
     Ray *ray;
     int i;
     float azim_rate, beam_width, dz, elev_angle, prf, unam_rng;
+    int vol_index = VR_INDEX;
 
     beam_width = 1.0; /* for now */
 
@@ -227,7 +231,7 @@ int rainbow_data_to_radar(Radar *radar, Rainbow_hdr rainbow_hdr, FILE *fp)
        fprintf(stderr,"WARNING: number of rays computed is not the number "
                "expected.\n");
        fprintf(stderr,"Computed = nrays: "
-           "azstart = %d, az_stop = %d, az_step = %%f\n",
+           "azstart = %d, az_stop = %d, az_step = %f\n",
            rainbow_hdr.az_start, rainbow_hdr.az_stop, rainbow_hdr.az_step);
        fprintf(stderr,"Expected 360\n");
     }