Mysterious negative sign required sometimes #105#188
Mysterious negative sign required sometimes #105#188ElMapacheDelOeste wants to merge 4 commits intoJuliaComputing:mainfrom
Conversation
| q = Rotations.QuatRotation(Q2, false) | ||
| R = RotMatrix(q) | ||
| R = RotMatrix(q)' | ||
| RotationMatrix(R, w) |
There was a problem hiding this comment.
Should the transpose be done on the RotationMatrix(R,w) and therefore have -w as well?
|
Thanks for this PR! I'll try to have a look at it when we have the new compiler up and running :) |
|
Jumping in since I worked with @ElMapacheDelOeste on this. See the test "resistance in speherical" for instance: |
|
I rebased this PR and merged in #200 |
The rotations returned by the function axis_rotation() are the transposed to the ones we expected. Using Modelica for reference, the same function returns the transpose to the Julia's ones :
https://github.com/modelica/ModelicaStandardLibrary/blob/afba9aad9216b472b856b259a002c934b46e6786/Modelica/Mechanics/MultiBody/Frames/axisRotation.mo#L12
This allows to get rid of the suspicious need for the "neg_w" boolean.
I have a doubt for the quaternions, if the transpose is only needed on the rotation matrix or on the angular velocity as weel.
GitHub issue : #105