unilab.utils.geometry.np_gravity_z_in_body_from_quat

unilab.utils.geometry.np_gravity_z_in_body_from_quat(quat_w)[source]

Z component of world gravity [0, 0, -1] expressed in body frame.

Equivalent to np_quat_apply_inverse(quat_w, [0, 0, -1])[..., 2] but computed directly from quaternion components to skip the intermediate.

Parameters:

quat_w (ndarray)

Return type:

ndarray