rigid_body_motion.ReferenceFrame.transform_quaternions

ReferenceFrame.transform_quaternions(arr, to_frame, axis=- 1, time_axis=0, timestamps=None, return_timestamps=False)[source]

Transform array of quaternions from this frame to another.

Parameters
arr: array_like

The array to transform.

to_frame: str or ReferenceFrame

The target reference frame. If str, the frame will be looked up in the registry under that name.

axis: int, default -1

The axis of the array representing the spatial coordinates of the quaternions.

time_axis: int, default 0

The axis of the array representing the timestamps of the quaternions.

timestamps: array_like, optional

The timestamps of the quaternions, corresponding to the time_axis of the array. If not None, the axis defined by time_axis will be re-sampled to the timestamps for which the transformation is defined.

return_timestamps: bool, default False

If True, also return the timestamps after the transformation.

Returns
arr_transformed: array_like

The transformed array.

ts: array_like, shape (n_timestamps,) or None

The timestamps after the transformation.