7 Data formats
The acoustic data is stored in binary formatted files external to the DBMS. The files are in the format produced by the CREST echosounder system - see [Coombs et al. 2003] for a discussion of this echosounder. The acoustic data is stored in the files in a ’message’ format that consists of a header that defines the type of data that follows in the body part of the message. Multiple messages are stored in one file.
7.1 Header format
The message format files consist of 16 bit integers grouped into messages. Each message begins with a 12 byte (6 x 16 bit unsigned integers) header, defined as follows:
| Bytes |
Name |
Description |
| 0-1 |
type |
defines the type of the data associated with this header |
| 2-3 |
seqno |
sets the sequence number of this message. Typically starts at 1 at the beginning of the file and increments or stays the same for successive messages. |
| 4-5 |
spare |
a spare field, currently only used with towbody telemetry data |
| 6-7 |
origin |
the origin of this message |
| 8-9 |
target |
the intended destination of this message |
| 10-11 |
length |
the length of the body part of this message in bytes |
The next message header begins ’length’ bytes past the end of the current message header. This repeats until the end of the file. The format of the message body is determined by the value in the ’type’ field of the header.
7.2 Header type 32
The vast majority of the data collected is processed acoustic data and has always been stored in a ’bundled’ format. The header ’type’ value that indicates ’bundled’ format is 32. Acoustic data is collected via an analog-to-digital converter and the term used for the value obtained from the a/d converter is ’sample’. When acoustic data is collected a threshold is applied and samples below the threshold are set to zero. The bundled data format just records the non-zero samples. A series of samples that do not contain a zero valued sample is called an ’echo’. Hence, the bundled data format stores samples in groups of echoes thus:
| Bytes |
Description |
| 0-1 |
number of echoes in this message body |
| 2-3 |
sample number of first sample in echo |
| 4-5 |
number of samples in echo |
| 6-7 |
real part of sample |
| 8-9 |
imag part of sample |
| 10-11 |
real part of sample |
| 12-13 |
imag part of sample |
| 14-15 |
. . . |
| 16-17 |
. . . |
| . . . |
sample number of first sample in next echo |
| . . . |
number of samples in echo |
| . . . |
real part of sample |
| . . . |
imag part of sample |
| . . . |
. . . |