A matlab toolbox for quaternion and spatial rotation.