The WHIPS images are defined utilizing the NetCDF data access software developed by the Unidata Program Center which is managed by the University Corporation for Atmospheric Research (UCAR) in Boulder, Colorado. The NetCDF software was chosen to provide support for platform independent data files. The software is available via anonymous/ftp or the World Wide Web (www.ucar.edu) from UCAR.
The WHIPS sidescan sonar file is defined utilizing the NetCDF dimension, variable, and attribute components. The NetCDF dimensions defines the number of lines (nl) and the number of samples (ns) contained in the two dimensional array which comprises the image data. These dimension variables are specified at the beginning of the data file. The image data is further defined by the image bittype (bittyp). The bittyp is used as a flag by the processing programs to indicate the data type used to store the image data. The bittyp is declared a short integer variable and must contain a value of 8, 16 or 32. A value of 8 indicates byte or character image data. A value of 16 indicates image data of a 16-bit or short integer data type. A value of 32 indicates 32-bit floating point image data. As previously mentioned, the image data are then defined utilizing the nl and ns dimensions and the bittyp variable.
To properly process sidescan sonar data additional information to detail the individual scans is required. This information, referred to as the sidescan sonar header information, includes information such as the date, time, sidescan sonar vehicle attributes and vehicle position. Header information, which is not relevant to the specific sonar system or which may be unavailable, is flagged by inserting the NetCDF infinity value for the particular data type.
Most sidescan header variables were grouped together as one data variable to reduce the read/write access for obtaining the information. For example, it appeared easier to store all the integer date variables together which could be read with one read rather than 4 reads which would have been scattered throughout the data file. Though it would have been preferable to store all the header variables for a given swath together and reduce the file access, it was not possible to mix data variable types.
The sidescan sonar header variables are grouped as listed below:
An example of a small WHIPS sidescan sonar image file was printed using the NetCDF utility program ncdump and is shown below. The example shows the definition of a small sonar image file which is defined as being 5 lines by 3 samples. Note the use of the FloatInf values contained in the pitch, roll, and yaw variables of the ss_attributes data. This demonstrates the use of the NetCDF fill values to indicate that valid data is not available for a specific data variable.
netcdf small_glo { dimensions: nl = 5 ; ns = 3 ; #date_variables = 4 ; #time_variables = 3 ; #ss_attributes = 5 ; latlon = 2 ; depth = 2 ; variables: short bittyp ; byte image(nl, ns) ; short date(nl, #date_variables) ; short time(nl, #time_variables) ; float seconds(nl) ; float ss_attributes(nl, #ss_attributes) ; double latlon(nl, latlon) ; float depths(nl, depth) ; // global attributes: :creation_program = \`glo2whips\' ; :date_variables = \`year, month, day, day_of_year\' ; :time_variables = \`hour, minute, total_minutes\' ; :seconds = \`seconds portion of time variable\' ; :ss_attributes = \`fish_altitude, heading, pitch, roll, yaw\' ; :latlon = \`sonar position: lat/lon signed decimal degrees\' ; :depth_variables = \`corrected_depth, uncorrected_depth\' ; data: bittyp = 8 ; image = 030, 031, 030, 033, 033, 036, 034, 033, 034, 036, 033, 036, 035, 030, 030 ; date = 1987, 2, 25, 56, 1987, 2, 25, 56, 1987, 2, 25, 56, 1987, 2, 25, 56, 1987, 2, 25, 56 ; time = 23, 0, 1380, 23, 0, 1380, 23, 1, 1381, 23, 1, 1381, 23, 2, 1382 ; seconds = 0, 30, 0, 30, 0 ; ss_attributes = 1450, 202, FloatInf, FloatInf, FloatInf, 1461, 203, FloatInf, FloatInf, FloatInf, 1472, 203, FloatInf, FloatInf, FloatInf, 1483, 205, FloatInf, FloatInf, FloatInf, 1495, 203, FloatInf, FloatInf, FloatInf ; latlon = 35.34930038452148, -74.80359649658203, 35.34838104248047, -74.80377197265625, 35.34745025634766, -74.80394744873047, 35.34653091430664, -74.80412292480469, 35.34560012817383, -74.80429840087891 ; depths = 1438, 1450, 1449, 1461, 1460, 1472, 1471, 1483, 1482, 1495 ; }[an error occurred while processing this directive]