Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

converting eular angles: xyz to zyz

1,478 views
Skip to first unread message

Adam Chapman

unread,
Aug 25, 2010, 10:41:27 AM8/25/10
to
Hi,

I have some angle data from a vehicle simulation. I have roll, pitch
and yaw data.

Effectively this data is in XYZ Euler format, but I want to convert it
to ZYZ format.

The 3D rotation in XYZ format is:
[x' y' z']'=Rx.Ry.Rz.[x y z]'

= Rx.(Ry.Rz).[x y z]'

and in ZYZ:
[x' y' z']'=Rz.Ry.Rz.[x y z]'
= Rz.(Ry.Rz).[x y z]'

This leads me to think that all I need to do to work out the
conversion is to find an angle aboout the z axis that does the same
job as rotating about the x axis.

However, I think there is something wrong with my derivation, just
because it "feels" wrong.

Any insight would be ggreatly appreciated.

P.S. Rotation matrices are sullpied at http://www.gregslabaugh.name/publications/euler.pdf
.

Adam Chapman

unread,
Aug 25, 2010, 11:07:07 AM8/25/10
to
On Aug 25, 3:41 pm, Adam Chapman <adamchapman1...@hotmail.co.uk>
wrote:

Perhaps converting from Euler XYZ to Quaternion, then back to Euler
ZYZ would do the trick

richard i pelletier

unread,
Aug 25, 2010, 6:35:44 PM8/25/10
to
In article
<32f4db4f-fcbe-48f2...@z10g2000yqb.googlegroups.com>,
Adam Chapman <adamcha...@hotmail.co.uk> wrote:

> On Aug 25, 3:41 pm, Adam Chapman <adamchapman1...@hotmail.co.uk>
> wrote:
> > Hi,
> >
> > I have some angle data from a vehicle simulation. I have roll, pitch
> > and yaw data.
> >
> > Effectively this data is in XYZ Euler format, but I want to convert it
> > to ZYZ format.
> >
>

> Perhaps converting from Euler XYZ to Quaternion, then back to Euler
> ZYZ would do the trick

That's how I would do it. I found it far easier to cope with the 3
equations in 3 unknowns for finding the Euler angle sequence of a
quaternion.

Go from Euler angle sequence to quaternion to ZYZ. A recent blog post of
mine

http://rip94550.wordpress.com/2010/08/16/quaternions-and-rotations-2-eule
r-angles-etc/

illustrates how to find the relevant equations, although it does (what I
call) ZYX instead of the ZYZ case.

vale,
rip

--
email address is r i p 1 AT c o m c a s t DOT n e t

JEMebius

unread,
Aug 26, 2010, 6:44:09 AM8/26/10
to Adam Chapman


That is exactly what I do in my 3D rotations software.
Turbo-Pascal source with comments available from my web page at
http://www.xs4all.nl/~jemebius/Downloads.htm , item "EULERANG".
The XYZ convention is there denoted as the Aeronautics convention, the ZYZ convention as
the Physics convention.

Good luck: Johan E. Mebius

jdturner

unread,
Aug 26, 2010, 10:02:20 AM8/26/10
to
> Turbo-Pascal source with comments available from my web page athttp://www.xs4all.nl/~jemebius/Downloads.htm, item "EULERANG".

> The XYZ convention is there denoted as the Aeronautics convention, the ZYZ convention as
> the Physics convention.
>
> Good luck: Johan E. Mebius

This is a standard transformation that is easily derived as follows:

Cxyz:E1(a1).E2(a2).E3(A3)

Let [a1,a2,a3]=[0.1d0, 0.2d0, 0.3d0 ]

Retaining only ~4 digits, leads to

Cxyz = | 0.936 0.2896 -0.1987 |
|-0.2751 0.9564 0.0978 |
| 0.2183 -0.03696 0.9752 |

CZYZ:E3(B3).E2(B2).E3(B1)

Leads to

Czyz = | c1*c2*c3-s1*s3 c1*s3+s1*c2*c3 -s2*c3 |
|-c1*c2*s3-s1*c3 c1*c3-s1*c2*s3 s2*s3 |
| c1*s2 s1*s2 c2 |

As a result, one finds

b1 = atan2( Cxyz(3,2), Cxyz(3,1) )

b2 = acos( Cxyz(3,3) )

b3 = atan2( Cxyz(2,3), -Cxyz(1,3) )

Applying these inversion formulas for the Euler Angles leads to
(calculations to double precision and printed to 5-places)

b1 = -0.167666

b2 = 0.223307

b3 = 0.457624

Introducing these angles in Czyz reproduces the original Cxyz matrix
to double precision.

See it's not so hard!

Jim Turner

0 new messages