build_rot_mat

HSTB.kluster.rotations.build_rot_mat(roll, pitch, yaw, order='rpy', degrees=True)

Make the rotation matrix for a set of angles and return the matrix. All file angles are in degrees, so incoming angles are degrees.

Intrinsic - each rotation performed on coordinate system as rotated by previous operation Intrinsic rotation, rot(rpy) = rot(y)*rot(p)*rot(r)

Parameters
  • roll (DataArray) – array of floating point numbers from roll sensor

  • pitch (DataArray) – array of floating point numbers from pitch sensor

  • yaw (DataArray) – array of floating point numbers from heading sensor

  • order (str) – order of rotation, either ‘rpy’ or ‘ypr’

  • degrees (bool) – True if incoming angles are in degrees, False if radians

Returns

rotation matrix composed of rpy rotations

Return type

xr.DataArray