commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M@ Dunlap (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-847) Using Rotation to convert Euler angles to Quaternions produces wrong results
Date Thu, 16 Aug 2012 21:59:37 GMT

    [ https://issues.apache.org/jira/browse/MATH-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436354#comment-13436354
] 

M@ Dunlap commented on MATH-847:
--------------------------------

Sure.  Can we ammend it to ask that the part of the javadoc that describes this be moved from
the one constructor to the whole class since it applies no matter how the rotation is constructed?
                
> Using Rotation to convert Euler angles to Quaternions produces wrong results
> ----------------------------------------------------------------------------
>
>                 Key: MATH-847
>                 URL: https://issues.apache.org/jira/browse/MATH-847
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: 1.6
>            Reporter: M@ Dunlap
>
> import org.apache.commons.math3.geometry.euclidean.threed.Rotation;
> import org.apache.commons.math3.geometry.euclidean.threed.RotationOrder;
> public class temp {
>   public static void main(String args[]) {
>     Rotation r = new Rotation(RotationOrder.XYZ, -Math.PI / 2d, 0, 0);
>     System.out.println("(" + r.getQ0() + " " + r.getQ1() + " " + r.getQ2() + " " + r.getQ3()
+ ")");
>   }
> }
> Prints (0.707 0.707 0.0 0.0) (in-sig-figs elided), but when I type the same thing into
Wolfram Alpha I get (.707 -.707 0 0) (note the negative)  see: http://www.wolframalpha.com/input/?i=euler+angles&a=*C.euler+angles-_*Formula.dflt-&a=*FP.EulerRotation.EAS-_e123&f3=-pi%2F2+rad&f=EulerRotation.th1_-pi%2F2+rad&f4=0&f=EulerRotation.th2_0&f5=0&f=EulerRotation.th3_0
> One of the guys in the lab suggested that if Rotation is assuming the Euler angle is
in a left-handed coordinate space this is an expected result, but if that's the case the question
is, why is the less popular coordinate system the only option?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message