Cargando…

Quaternion to Euler angles conversion: A direct, general and computationally efficient method

Current methods of the conversion between a rotation quaternion and Euler angles are either a complicated set of multiple sequence-specific implementations, or a complicated method relying on multiple matrix multiplications. In this paper a general formula is presented for extracting the Euler angle...

Descripción completa

Detalles Bibliográficos
Autores principales: Bernardes, Evandro, Viollet, Stéphane
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Public Library of Science 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9648712/
https://www.ncbi.nlm.nih.gov/pubmed/36355707
http://dx.doi.org/10.1371/journal.pone.0276302
_version_ 1784827635837173760
author Bernardes, Evandro
Viollet, Stéphane
author_facet Bernardes, Evandro
Viollet, Stéphane
author_sort Bernardes, Evandro
collection PubMed
description Current methods of the conversion between a rotation quaternion and Euler angles are either a complicated set of multiple sequence-specific implementations, or a complicated method relying on multiple matrix multiplications. In this paper a general formula is presented for extracting the Euler angles in any desired sequence from a unit quaternion. This is a direct method, in that no intermediate conversion step is required (no quaternion-to-rotation matrix conversion, for example) and it is general because it works with all 12 possible sequences of rotations. A closed formula was first developed for extracting angles in any of the 12 possible sequences, both “Proper Euler angles” and “Tait-Bryan angles”. The resulting algorithm was compared with a popular implementation of the matrix-to-Euler angle algorithm, which involves a quaternion-to-matrix conversion in the first computational step. Lastly, a single-page pseudo-code implementation of this algorithm is presented, illustrating its conciseness and straightforward implementation. With an execution speed 30 times faster than the classical method, our algorithm can be of great interest in every aspect.
format Online
Article
Text
id pubmed-9648712
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher Public Library of Science
record_format MEDLINE/PubMed
spelling pubmed-96487122022-11-15 Quaternion to Euler angles conversion: A direct, general and computationally efficient method Bernardes, Evandro Viollet, Stéphane PLoS One Research Article Current methods of the conversion between a rotation quaternion and Euler angles are either a complicated set of multiple sequence-specific implementations, or a complicated method relying on multiple matrix multiplications. In this paper a general formula is presented for extracting the Euler angles in any desired sequence from a unit quaternion. This is a direct method, in that no intermediate conversion step is required (no quaternion-to-rotation matrix conversion, for example) and it is general because it works with all 12 possible sequences of rotations. A closed formula was first developed for extracting angles in any of the 12 possible sequences, both “Proper Euler angles” and “Tait-Bryan angles”. The resulting algorithm was compared with a popular implementation of the matrix-to-Euler angle algorithm, which involves a quaternion-to-matrix conversion in the first computational step. Lastly, a single-page pseudo-code implementation of this algorithm is presented, illustrating its conciseness and straightforward implementation. With an execution speed 30 times faster than the classical method, our algorithm can be of great interest in every aspect. Public Library of Science 2022-11-10 /pmc/articles/PMC9648712/ /pubmed/36355707 http://dx.doi.org/10.1371/journal.pone.0276302 Text en © 2022 Bernardes, Viollet https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
spellingShingle Research Article
Bernardes, Evandro
Viollet, Stéphane
Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title_full Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title_fullStr Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title_full_unstemmed Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title_short Quaternion to Euler angles conversion: A direct, general and computationally efficient method
title_sort quaternion to euler angles conversion: a direct, general and computationally efficient method
topic Research Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9648712/
https://www.ncbi.nlm.nih.gov/pubmed/36355707
http://dx.doi.org/10.1371/journal.pone.0276302
work_keys_str_mv AT bernardesevandro quaterniontoeuleranglesconversionadirectgeneralandcomputationallyefficientmethod
AT violletstephane quaterniontoeuleranglesconversionadirectgeneralandcomputationallyefficientmethod