PlanetPhysics/Direction Cosine Matrix to Euler 313 Angles

From testwiki
Jump to navigation Jump to search

Starting with a [[../DirectionCosineMatrix/|direction cosine matrix]] (DCM), we need to determine the three Euler angles. The connection is made by comparing the DCM elements with the combined [[../Euler313Sequence/|Euler 313 sequence]]. It is important to note that the 12 combinations of Euler angles for a given sequence can be found from a given DCM. The DCM [[../Matrix/|matrix]] is

DCM=[A11A12A13A21A22A23A31A32A33]

The Euler 313 sequence is

R3(ψ)R1(θ)R3(ϕ)=[cψcϕsψsϕcθcψsϕ+sψcθcϕsψsθsψcϕcψsϕcθsψsϕ+cψcθcϕcψsθsθsϕsθcϕcθ]

If we examine the element in coloum 3 row 3, then by inspection

A33=cos(θ)

Solving for θ yields

θ=cos1(A33)

Care must now be taken when evaluating the inverse cosine. It is a multivalued [[../Bijective/|function]]. Analytically, the convention is to choose the principle value such that

0θπ

If a numerical [[../SupercomputerArchitercture/|program]] is used, a function acos() usually does this for us. The next step is to analyze the ratio A31A32. Using these values from the Euler sequence we get

A31A32=sin(θ)sin(ϕ)sin(θ)cos(ϕ)

Rearranging and using the tangent yields

tan(ϕ)=A31A32

Solving the quadrant ambiguity caused by the inverse tangent is done by examining the signs of the numerator and denominator. Denoting y as the numerator and x as the denominator, then the quadrant is chosen by:

quadrant 1 [yx++]

so if x and y are both positive, then 0ϕπ/2. Similarly for the other quadrant possibilities

quadrant 2 [yx+]

quadrant 3 [yx]

quadrant 4 [yx+]

Of course, it is much simplier to use a calculator or numerical program that uses the atan2() function which will choose the principle value. In a similar fashion we can find the final Euler angle by looking at the ratio A13A23 which gives the [[../Bijective/|relation]] A13A23=sin(ψ)sin(θ)cos(ψ)sin(θ)

Canceling terms and rearrangeing gives us

ψ=tan1(A13A23)

which uses the same method to resolove quadrant ambiguity as above. To summarize, we will give the [[../Formula/|formulas]] for the conversion from a direction cosine matrix to the Euler 313 angles in Matlab syntax. Be careful how you implement this in other numerical programs. In Matlab it goes atan2(y,x) and in Mathematica it is ArcTan[x, y].

ϕ=atan2(A31,A32) θ=acos(A33) ψ=atan2(A13,A23)

Template:CourseCat