So I got it to work in XNA and it works beatifully, however using my own quaternion class or directx's quaternions the spaceship keeps 'flipping over' when you get behind on the Z axis it seems. Is there something specific I'm doing wrong?
my basic algorithm is :
Quaternion q1 = (shipforward, 0.0f)
Quaternion q2 = (shipposition - LookAtPosition, 0.0f)
then get the angular velocity using the method you described. weird thing is it works very well in XNA but trying to port it to my c++ engine keeps bringing this annoying bug.
A reason I thought of is that my division operator is wrong? what is the exact implementation of the division operator here?