SonarData class abstract

Sonar Data class

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:

+------+-------------------+-----------+ | Data | Name | Type | +======+===================+===========+ | A | Ranges data | uintX_t | +------+-------------------+-----------+

.. figure:: ../images/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:

+------+--------+-------------------------+---------+----------------------------------------------------------------------+ | Index| Section| Name | Type | Comments | +======+========+=========================+=========+======================================================================+ | 1 | H1 | Number of points | uint16_t| Number of data points | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 2 | H2 | Start angle | fp32_t | In radians | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 3 | H3 | Flags | uint8_t | Refer to next table | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 4 | H4 ? | Angle scale factor | fp32_t | Used for angle steps in radians | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 5 | H5 ? | Intensities scale factor| fp32_t | | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 6 | D1 ? | Angle stepsH1 | uint16_t| Values in radians | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 7 | D2 | RangesH1 | uintX_t | Ranges data points (scale factor from common field "Scaling Factor") | +------+--------+-------------------------+---------+----------------------------------------------------------------------+ | 8 | D3 ? | IntensitiesH1 | uintX_t | Intensities data points | +------+--------+-------------------------+---------+----------------------------------------------------------------------+

+--------+------------------+-----+ | Section| Flag Label | Bit | +========+==================+=====+ | H3.1 | Intensities flag | 0 | +--------+------------------+-----+ | H3.2 | Angle step flag | 1 | +--------+------------------+-----+

.. figure:: ../images/imc_multibeam.png

Notes:

  • Each angle at step i can be calculated is defined by:

.. code-block:: python

anglei = H2_start_angle + (32-bit sum of D1_angle_step0 through D1_angle_stepi) * H4_scaling_factor

  • If bit H3.1 is not set then sections H5 and D3 won't exist.
  • If bit H3.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:

.. code-block:: python :linenos:

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

write(byte);

Common:

Inheritance
Implemented types

Constructors

SonarData([void updates(SonarDataBuilder b)?])
factory

Properties

abbrev String
no setteroverride
beamConfig List<BeamConfig>
Beam configuration of the device.
no setter
bitsPerPoint int
Size of the data unit. (Should be multiple of 8)
no setter
data List<int>
Data acquired by the measurement.
no setter
dst int
no setterinherited
dstEnt int
no setterinherited
frequency int
Operating frequency.
no setter
hashCode int
The hash code for this object.
no setterinherited
maxRange int
Maximum range.
no setter
minRange int
Minimum range.
no setter
msgId int
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleFactor double
Scaling factor used to multiply each data unit to restore the original floating point value.
no setter
src int
no setterinherited
srcEnt int
no setterinherited
sync int
no setterinherited
timestamp DateTime?
no setterinherited
type SonarDataEnumType
Type of sonar.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebuild(dynamic updates(SonarDataBuilder)) SonarData
Rebuilds the instance.
inherited
toBuilder() SonarDataBuilder
Converts the instance to a builder B.
inherited
toJson([bool includeHeader = true]) Map<String, dynamic>
To JSON object
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

staticId → const int