build_orientation_vectors¶
- HSTB.kluster.modules.orientation.build_orientation_vectors(raw_att, twtt, delay, tx_tstmp_idx, tx_orientation, rx_orientation, latency=0)¶
Using attitude angles, mounting angles, build the tx/rx vectors that represent the orientation of the tx/rx at time of transmit/receive. Transmitter vectors end up as the [x, y, z] for the transmitter orientation at the time of ping. Receiver vectors have an additional beam dimension, and represent the slight changes in receiver orientation during ping receive
(this ended up being more important than I thought, saw up to half a meter difference in some datasets)
- Parameters
raw_att (
Dataset) – raw attitude Dataset including roll, pitch, yawtwtt (
DataArray) – 2dim (time/beam) array of timestamps representing time traveling through water for each beamdelay (
DataArray) – 2dim (time/beam) array of delays for each beam (must be added to ping time)tx_tstmp_idx (
DataArray) – 1D ping times from the DataSettx_orientation (
list) – [numpy array with 3 elements (x,y,z) representing the ideal tx orientation, tx roll mounting angle, tx pitch mounting angle, tx yaw mounting angle, timestamp]rx_orientation (
list) – [numpy array with 3 elements (x,y,z) representing the ideal rx orientation, rx roll mounting angle, rx pitch mounting angle, rx yaw mounting angle, timestamp]latency (
float) – if included is added as motion latency (in milliseconds)
- Returns
- [xr.DataArray 2 dim (time, xyz) representing tx 3d orientation in space across time,
xr.DataArray 3 dim (time, beam, xyz) representing rx 3d orientation in space across time/beam]
- Return type
list