IMCInter Module Communication
v5.5.11

Sonar Data

SonarData ID 276Periodic
Payload
≥ 18 bytes, variable
Packet
≥ 40 bytes
Source
vehicle
Category
Sensors

This message contains the data acquired by a single sonar measurement. The following describes the format used to fill the data field used in this message. (Byte order is little endian.)

Sidescan:

DataNameType
ARanges datauintX_t
imc_sidescan.png
  • The type uintX_t will depend on the number of bits per unit, and it should be a multiple of 8.
  • Furthermore, for now, 32 bits is the highest value of bits per unit supported.

Multibeam:

IndexSectionNameTypeComments
1H1Number of pointsuint16_tNumber of data points
2H2Start anglefp32_tIn radians
3H3Flagsuint8_tRefer to next table
4H4 ?Angle scale factorfp32_tUsed for angle steps in radians
5H5 ?Intensities scale factorfp32_t
6D1 ?Angle steps[H1]uint16_tValues in radians
7D2Ranges[H1]uintX_tRanges data points (scale factor from common field "Scaling Factor")
8D3 ?Intensities[H1]uintX_tIntensities data points
SectionFlag LabelBit
H3.1Intensities flag0
H3.2Angle step flag1
imc_multibeam.png

Notes:

  • Each angle at step i can be calculated is defined by:
angle[i] = H2_start_angle + (32-bit sum of D1_angle_step[0] through D1_angle_step[i]) * H4_scaling_factor
  • If bit H4.1 is not set then sections H5 and D3 won't exist.
  • If bit H4.2 is not set then sections H4 and D1 won't exist. In case this bit is set, then the angle steps is read from field "Beam Width" from "Beam Configuration".
  • The type uintX_t will depend on the number of bits per unit, and it should be a multiple of 8.
  • Furthermore, for now, 32 bits is the highest value of bits per unit supported.

How to write ranges and intensities data:

data_unit = (Integer) (data_value / scale_factor);
bytes_per_unit = bits_per_unit / 8;
LOOP: i = 0, until i = bytes_per_unit
    byte[i] = (data_unit >> 8 * i) & 0xFF);

write(byte);

Common:

#Fields

Offset FieldTypeUnitRangeDescription
0 #typeType uint8_t Enumerated –

Type of sonar.

0ST_SIDESCANSidescan
1ST_ECHOSOUNDEREcho Sounder
2ST_MULTIBEAMMultibeam
3ST_PENCILBEAMPencil Beam
1 #frequencyFrequency uint32_t Hz –

Operating frequency.

5 #min_rangeMinimum Range uint16_t m –

Minimum range.

7 #max_rangeMaximum Range uint16_t m –

Maximum range.

9 #bits_per_pointBits Per Data Point uint8_t bit –

Size of the data unit. (Should be multiple of 8)

10 #scale_factorScaling Factor fp32_t – –

Scaling factor used to multiply each data unit to restore the original floating point value.

14 #beam_configBeam Configuration message-list<BeamConfig> – –

Beam configuration of the device.

var #dataData rawdata – –

Data acquired by the measurement.

#References

Carried inline by: