Borrar filtros
Borrar filtros

quat2eul is giving me a strange result

12 visualizaciones (últimos 30 días)
Adam Levschuk
Adam Levschuk el 31 de Mzo. de 2021
Respondida: James Tursa el 2 de Abr. de 2021
Hello All,
I am using the quat2eul function to convert quaternions to euler Angles, However, after i do that i get a strange result. It appears that whenever ever my angle gets greater than pi it switches to a negative angel. Does anyone know how to fix this? i have attached a photo so you can see what I'm talking about.
  2 comentarios
James Tursa
James Tursa el 2 de Abr. de 2021
Editada: James Tursa el 2 de Abr. de 2021
Please post a small subset of your quaternion data that encompasses one of these pos/neg switches, and also the code you are using for the conversion. Maybe all you have to do is add 2*pi to all results that are less than -pi to get things how you want.
Adam Levschuk
Adam Levschuk el 2 de Abr. de 2021
youre right, all i did to fix it was add 2 pi to fix that switching when the angle was ambiguous. If you wnat you can post that as a formal answer real quick so i can accept it fro you because you were right here!

Iniciar sesión para comentar.

Respuesta aceptada

James Tursa
James Tursa el 2 de Abr. de 2021
Maybe all you have to do is add 2*pi to all results that are less than -pi to get things how you want.

Más respuestas (0)

Categorías

Más información sobre Calendar en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by