tyrex-team / benchmarks-attitude-smartphones

Benchmark on Attitude Estimation with Smartphones (datasets & scripts)
https://tyrex.inria.fr/mobile/benchmarks-attitude
Other
38 stars 27 forks source link

The function "quatrotate" may should be modified #3

Closed Nronaldo closed 3 years ago

Nronaldo commented 3 years ago

Dear Tyrex: Thanks for your excellent job, and I benefited much from your work. I find you use the function "quatrotate" to calculate the vector in a new coordinate with a quaternion. I think you should normalize the quaternion , or you shouldn't use 1 to stand for the "qw^2+qx^2+qy^2+qz^2". image

ThibaudM commented 3 years ago

I did not remember exactly where this formula came from, but it seems you are right. The output vector is not always unitary. I think the impact is really small; among the 60k rotations from the visualiseAttitudeOnSpecificDataset script, only 10 quaternions have an absolute error > 1e-3. Removing the "-1" does not seem to fix the problem. Therefore, I applied vector normalization.

Thank you for this feedback

Nronaldo commented 3 years ago

I did not remember exactly where this formula came from, but it seems you are right. The output vector is not always unitary. I think the impact is really small; among the 60k rotations from the visualiseAttitudeOnSpecificDataset script, only 10 quaternions have an absolute error > 1e-3. Removing the "-1" does not seem to fix the problem. Therefore, I applied vector normalization.

Thank you for this feedback

Thank you for your reply.