-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
On 11/14/2013 10:05 PM,
vr.engeen...@gmail.com wrote:
> Hey all,
>
> Sorry for the matter. I just found the solution using Dot product
> of past frame quaternion and current one. If the result is
> negative, I inverse the current quaternion... it seems working
> really well...
>
> Do you have any comment on this? I was thinking quaternion was
> "the unique good" solution to write rotation... but it flips likes
> other Euler angles ?!?
The problem is most likely not in the quaternion itself (assuming you
are doing the math correctly), but in your IMU/gyro.
Are you sure that the math you are using handles the situation when
the angle is more than 180 degrees? Many IMUs will flip signs in that
case, causing discontinuity, especially if the raw data are coming as
3 separate values (one for each axis) and not as a quaternion or
axis/angle combination already. A typical case is that the reported
angle is always between -90 to +90 degrees and if you need angles >
+-90 degrees, you have to do the type of hack that you have done.
Check the documentation for your device to be sure.
Regards,
Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iD8DBQFShUA7n11XseNj94gRAu0qAKDHRG7bU6b1IsQhh2yVL9VhOd9nswCfTvm5
5AZ15TVCCsf334OCXj467A4=
=BRnG
-----END PGP SIGNATURE-----