PositionalOffsets#

Simple structures to store sensor position offsets

Example usage#

https://mybinder.org/badge_logo.svg
# import this module# import this module
from themachinethatgoesping.navigation.datastructures import PositionalOffsets

sensor_offsets = PositionalOffsets(
"sensor-name", # name of the sensor
10, # x (in m, positive forward)
-3, # y (in m, positive starboard)
3,  # z (in m, positive downwards)
10, # yaw    (in °, positive is clockwise rotation)
20, # pitch  (in °, positive is bow up)
30) # roll   (in °, positive is port up)

print(sensor_offsets)
# PositionalOffsets
# *****************
# - name:  "sensor-name"
# - x:     10.00 [positive forwards, m]
# - y:     -3.00 [positive starboard, m]
# - z:     3.00  [positive downwards, m]
# - yaw:   10.00 [° positive means clockwise rotation]
# - pitch: 20.00 [° positive means bow up]
# - roll:  30.00 [° positive means port up]

Structure api#

class PositionalOffsets#

A structure to store positional offsets (e.g. of a sensor) relative to the vessel coordinate system

__init__(self: PositionalOffsets, name: str = '', x: float = 0, y: float = 0, z: float = 0, yaw: float = 0, pitch: float = 0, roll: float = 0) None#

Construct a new PositionalOffsets object

Parameter name:

The name of the sensor

Parameter x:

in m, positive forward

Parameter y:

in m, positive starboard

Parameter z:

in m, positive downwards

Parameter yaw:

positive means clockwise rotation

Parameter pitch:

in °, positive means bow up

Parameter roll:

in °, positive means port up

copy(self: PositionalOffsets) PositionalOffsets#

return a copy using the c++ default copy constructor

static from_binary(buffer: bytes, check_buffer_is_read_completely: bool = True) PositionalOffsets#

create T_CLASS object from bytearray

static from_txrx(tx: PositionalOffsets, rx: PositionalOffsets, name: str) PositionalOffsets#

Construct a new PositionalOffsets object from a transmitter and receiver unit

Parameter tx:

Multibeam transmitter offsets

Parameter rx:

Multibeam receiver offsets

Parameter name:

Name of the newly constructed transceiver offsets

Returns:

Transceiver PositionalOffsets

hash(self: PositionalOffsets) int#

hash function implemented using binary_hash

info_string(self: PositionalOffsets, float_precision: int = 2) str#

Return object information as string

property name#

< The name of the sensor

property pitch#

< in °, positive means bow up

print(self: PositionalOffsets, float_precision: int = 2) None#

Print object information

property roll#

< in °, positive means port up

slow_hash(self: PositionalOffsets) int#

hash function implemented using slow_hash

to_binary(self: PositionalOffsets, resize_buffer: bool = True) bytes#

convert object to bytearray

property x#

< in m, positive forward

property y#

< in m, positive starboard

property yaw#

< in °, positive means clockwise rotation

property z#

< in m, positive downwards