i have a coordinate system where the Y axis is UP. I need to convert it to a coordinate system where Z is UP. I have the rotations stored in quaternions, so my question is : if
Just swpping two axes in a quaternions? No this doesn't work because this flips the chirality. However if you flip the chirality and negate the quaternion's real part then you're back in the original chirality. In general form you can write this as
Q'(Q, i'j'k') = εi'j'k' Qw_w + Qi_i + Qj_j + Qk_k
where
is the totally antisymmetric tensor, known as the Levi-Cevita symbol.
This shouldn't be a surprise, as the i², j², k² rules of quaternions are defined also by the same totally antisymmetric tensor.