Re: Averaging quaternions [message #38709 is a reply to message #38643] |
Sun, 21 March 2004 09:15   |
jelansberry
Messages: 3 Registered: March 2004
|
Junior Member |
|
|
"Arnold Neumaier" <Arnold.Neumaier@univie.ac.at> wrote in message
news:405D56B6.6030403@univie.ac.at...
> jelansberry wrote:
>> I've finally realized that all I contributed was questions and
complaints
>> and no alternative solutions.
>>
>> If I were doing this, I would probably convert the quaternions to Euler
(or
>> Bryant) angles first (convert the quaternion to a direction cosine
matrix,
>> then extract the Euler angles). Then, I would compute the average of
the
>> Euler angles, and then convert the resulting average Euler angles back
to a
>> quaternion (convert the Euler angles to a direction cosine matrix, then
>> extract the quaternion).
>
> This has exactly the same problems as averaging over quaternions, since
> angles are only unique up to a multiple of pi or 2pi; so the average
> depends on whether you represent an angle by a number close to pi or
> close to -pi ...
>
> Arnold Neumaier
>
"Uniqueness" of the Euler angles is not the issue, it's more an issue of
continuity of the angles. Euler angles do not have the "same" problems as
averaging over quaternions. My basic beef with averaging quaternions is
that the initial result of the average is not a quaternion (i.e., the result
does not have unit norm). Euler angles do not suffer from such a
complication.
If all the OP is doing is trying to find the average attitude over some
fairly small period of time, then one might expect the Euler angles
corresponding to the quaternion samples to fairly continuous. Admittedly,
if the quaternions are completely independent of one another, then such a
continuity argument will fail. But then, what would be the purpose of
finding an "average" attitude for quaternions that are randomly distributed?
I agree (and my post gave fair warning) that with Euler angles one has to be
careful of choosing sequences near the singularity of the sequence. The
problem you raise is essentially equivalent to that case - if you are near
the singularity for the sequence, then you can expect large discontinuities
in the extracted Euler angles. A quick plot of the Euler angles can help
identify if the selected Euler (or Bryant) sequence is a "good" one. In
general, it usually isn't that hard to avoid the singularity, particularly
if you have an understanding of the underlying process that generated the
quaternions in the first place.
John
|
|
|