Closed Nronaldo closed 3 years ago
Now I guess the aim of dcm2quat is to calculate the corresponding quaternion of the transpose of the inputting DCM. It may be a little confusing..
Conventions in SO(3) are totally a mess. When I started to work on this project, I used the aerotbx toolbox that provides the dcm2quat function (https://www.mathworks.com/help/aerotbx/ug/dcm2quat.html). When I published the code of this project, I decided to rewrite this function internally for people who do not have aerotbx. Later, I discovered the dcm2quat function provided by robotics toolbox (https://www.mathworks.com/help/robotics/ref/rotm2quat.html), which uses the transpose of the DCM. I should have used this function initially but did not find the time to rewrite the code.
Dear Tyrex: Thanks for your excellent job, and I benefited much from your work. But I felt confused about the Implementation of the dcm2quat function.
In your reference, the quaternion is calculated like this:
It seems like that you calculate the respective quaternion of the transpose of the inputting DCM. I compared your code with the link of reference. In your code, you calculate the quaternion like this: