changes the basis of the quaternion Q, to the basis B.
P = change_basis(Q, B)
This function is used to change the basis of a quaternion. The implicit basis (1, i, j, k) is the default, but if a different orthonormal basis is required, this function performs the conversion. The orthonormal basis is represented by a 3x3 orthogonal matrix B (which can be constructed using the function orthonormal_basis).