return_attitude_rotation_matrix¶
- HSTB.kluster.rotations.return_attitude_rotation_matrix(attitude, time_index=None)¶
We start off doing calculations in array relative reference frame. To get to a geographic reference frame, we need rotation matrices for attitude and mounting angles. Here we construct the attitude rotation matrix, at specific times (time of ping, time of receive, etc.). We also allow for additional selection to accommodate for when we get duplicate times due to pingtime + twtt sometimes getting the same time for some beams.
- Parameters
attitude (
Dataset) – 1 dimensional dataset representing the full attitude recordtime_index (
Optional[array]) – optional, if provided, is a 1 dimensional array of integers representing the index of values you want to return from the attitude Dataset
- Returns
xr.DataArray – 1 dimensional array representing attitude times
xr.DataArray – 3 dims (time, x, y) containing rot matrix at each time