How to define an axis based on multiple quaternions?

조회 수: 1 (최근 30일)
Silas Waxter
Silas Waxter 2019년 8월 18일
댓글: James Tursa 2020년 2월 7일
I have two sensors (IMUs) that stream quaternions to a data set. During streaming, the sensors are rotated around an unknown axis. I'm looking for a way to get the axis using the set of quaternions.

채택된 답변

James Tursa
James Tursa 2019년 12월 2일
편집: James Tursa 2019년 12월 2일
Assume you have the following:
q1 = quaternion from ECI to BODY at time1 (i.e., BODY1 frame)
q2 = quaternion from ECI to BODY at time2 (i.e., BODY2 frame)
Then do a quaternion multiply as follows
q = conjugate(q1) * q2 = quaternion from BODY1 to BODY2
And extract the rotation axis as follows
v = vector part of q
u = v / norm(v) = unit axis of rotation in BODY coordinates
How you do the conjugation and the quaternion multiply and how you extract the vector part depends on the quaternion convention used. For MATLAB toolboxes the vector part is in the last three elements of the quaternion. But for your streaming quaternions it might be different. You would need to verify all this in order to write the multiply and extraction code correctly.
  댓글 수: 1
Silas Waxter
Silas Waxter 2019년 12월 5일
Thanks for the Answer!
My axis of rotation will likely change over time. My project is looking at measuring the range of motion of a human joint like the wrist or the ankle. I expect these joints to have an imperfect axis, meaning defining the axis based on only one set of quaternions will be less accurate as defining the axis based on the rotation set. I realize this is probably more of an algorthim selection decision rather than pure maths, but any advice would be appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Coordinate Transformations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by