Is your quaternion just a point in three-dimensional orientation space?
Then the distance between the two quaternions x1,y1,z1,w1 and x2,y2,x2,w2 is determined as follows:
distance = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2) , assuming that the w component is used for orientation. That is, it is the same as the distance between two 3D points.
Is your quaternion a point in 4D space?
Then the distance between them is determined as follows:
distance = sqrt((x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2 + (w1-w2)^2) .
This is just an extension to 4D space. This Euclidean distance formula works in any number of dimensions.
Olhovsky
source share