Transmit pulse sample datagram description
The transmit pulse sample datagram contains sample data from the transmit pulse duration from each "ping".The datagram may have different size and contain different kinds of data, depending on the DataType parameter. This is a binary datagram. The type is RAW4. This datagram will always be on complex format. Otherwise refer to RAW3 for Format and Description.
Format
struct SampleDatagram
  {
  DatagramHeaderDgHeader;
  char ChannelID[128];
  short Datatype;
  char Spare[2];
  long Offset;
  long Count;
  byte Samples[];
  };
Description
•  DatagramHeader DgHeader: This is the binary datagram in use.
•  ChannelID[128]: This is the channel identification.
•  Datatype:
–  Bit 2 = ComplexFloat16
–  Bit 3 = ComplexFloat32
–  Bit 8 - 10 = Number of Complex per Samples
•  Spare[2]: This is a parameter for future expansions
•  Offset: This is the first sample number.
•  Count: This is the total number of samples.
•  Samples[]: These are the received sample values.
The number of values in Samples[] depends on the value of Count and the Datatype.
The sample values S(i,n) are arranged as:
Real(S(1,1)), Imag(S(1,1)),
Real(S(2,1)), Imag(S(2,1)),
Real(S(3,1)), Imag(S(3,1)),
Real(S(4,1)), Imag(S(4,1)),
Real(S(1,2)), Imag(S(1,2)), ...
Example
We have a DataType decimal value of 1032.
Decimal number 1032 = Hexadecimal 0408 = Binary 0000 0100 0000 1000.
•  Bit 3 is set to "1", so this is ComplexFloat32 data.
•  Bits 8 to 10 are 100, which means that we have four complex values per sample.
The decimal value of 1032 means that Samples[] contains ComplexFloat32 samples. Each sample consists of four complex numbers (one from each of the four transducer sectors). In this case Samples[] consists of 4*2*Count values of 32 bit floats. This is because each sample consists of four complex numbers, and each of these consists of one real part and one imaginary part.
When present this datagram always follows a corresponding Parameter XML datagram for a specific channel, in the datagram sequence. All the following conditions must be met before including this parameter in a raw file are.
•  The WBT transceiver and the channel must be running in echosounder mode.
•  Selected pulse form for the channel is CW, continuous wave.
•  The following options are selected in the Stored sample data for WBTs running CW in the File Setup page in the Output dialog box.
Reduced sampling rate Power/angles samples (Further reduced file size), or Power/Angle samples (Reduced file size)
The datagram contains complex samples received corresponding to the transmitted pulse. This ensures more precise information regarding the transmitted pulse when storing power/angle samples instead of complex samples. Storing complex samples calls for larger files and hence the transmit pulse sample datagrams may be a better choice for calculating impendance.
The number of samples contained in the datagram is determined by the pulse duration and sample interval. The relationship between these can be described:
Number of transmit pulse samples = Pulse Duration / Sample interval
Record of changes
•  1.24: New