How do you calculate the vertical angle from a 3d rotation matrix or a quaternion?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I've got the rotation matrix and quaternion of a mobile device. I'm trying to calculate the vertical angle from it. What I'm trying to get is for example 0° if the device is held in portrait mode and 90° in landscape mode.
Any help would be appreciated. I'm sorry if this was asked before, I don't have any experience with this and didn't really know what to search for.
rotations quaternions
add a comment |Â
up vote
0
down vote
favorite
I've got the rotation matrix and quaternion of a mobile device. I'm trying to calculate the vertical angle from it. What I'm trying to get is for example 0° if the device is held in portrait mode and 90° in landscape mode.
Any help would be appreciated. I'm sorry if this was asked before, I don't have any experience with this and didn't really know what to search for.
rotations quaternions
Try starting here.
– amd
Jul 19 at 22:11
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've got the rotation matrix and quaternion of a mobile device. I'm trying to calculate the vertical angle from it. What I'm trying to get is for example 0° if the device is held in portrait mode and 90° in landscape mode.
Any help would be appreciated. I'm sorry if this was asked before, I don't have any experience with this and didn't really know what to search for.
rotations quaternions
I've got the rotation matrix and quaternion of a mobile device. I'm trying to calculate the vertical angle from it. What I'm trying to get is for example 0° if the device is held in portrait mode and 90° in landscape mode.
Any help would be appreciated. I'm sorry if this was asked before, I don't have any experience with this and didn't really know what to search for.
rotations quaternions
asked Jul 19 at 21:00


Janko
32
32
Try starting here.
– amd
Jul 19 at 22:11
add a comment |Â
Try starting here.
– amd
Jul 19 at 22:11
Try starting here.
– amd
Jul 19 at 22:11
Try starting here.
– amd
Jul 19 at 22:11
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
There are many sign conventions associated with rotation matrices, quaternions, and Euler angles. It can get confusing.
But hopefully you just want the angle $theta$ between the space-fixed $z$-axis and the body-fixed $z'$-axis, and presumably your $3times3$ rotation matrix $mathbfA$ is defined such that $mathbfr'=mathbfAcdotmathbfr$ (or the same equation, but with the transpose of $mathbfA$). In that case $costheta=A_33$ because it is just the scalar product between the original, and rotated, $(0,0,1)$ vectors. So take the arccos of the $3,3$ element of the rotation matrix.
I advise you to double check that this makes sense for your definitions and coordinate systems!
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
There are many sign conventions associated with rotation matrices, quaternions, and Euler angles. It can get confusing.
But hopefully you just want the angle $theta$ between the space-fixed $z$-axis and the body-fixed $z'$-axis, and presumably your $3times3$ rotation matrix $mathbfA$ is defined such that $mathbfr'=mathbfAcdotmathbfr$ (or the same equation, but with the transpose of $mathbfA$). In that case $costheta=A_33$ because it is just the scalar product between the original, and rotated, $(0,0,1)$ vectors. So take the arccos of the $3,3$ element of the rotation matrix.
I advise you to double check that this makes sense for your definitions and coordinate systems!
add a comment |Â
up vote
0
down vote
accepted
There are many sign conventions associated with rotation matrices, quaternions, and Euler angles. It can get confusing.
But hopefully you just want the angle $theta$ between the space-fixed $z$-axis and the body-fixed $z'$-axis, and presumably your $3times3$ rotation matrix $mathbfA$ is defined such that $mathbfr'=mathbfAcdotmathbfr$ (or the same equation, but with the transpose of $mathbfA$). In that case $costheta=A_33$ because it is just the scalar product between the original, and rotated, $(0,0,1)$ vectors. So take the arccos of the $3,3$ element of the rotation matrix.
I advise you to double check that this makes sense for your definitions and coordinate systems!
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
There are many sign conventions associated with rotation matrices, quaternions, and Euler angles. It can get confusing.
But hopefully you just want the angle $theta$ between the space-fixed $z$-axis and the body-fixed $z'$-axis, and presumably your $3times3$ rotation matrix $mathbfA$ is defined such that $mathbfr'=mathbfAcdotmathbfr$ (or the same equation, but with the transpose of $mathbfA$). In that case $costheta=A_33$ because it is just the scalar product between the original, and rotated, $(0,0,1)$ vectors. So take the arccos of the $3,3$ element of the rotation matrix.
I advise you to double check that this makes sense for your definitions and coordinate systems!
There are many sign conventions associated with rotation matrices, quaternions, and Euler angles. It can get confusing.
But hopefully you just want the angle $theta$ between the space-fixed $z$-axis and the body-fixed $z'$-axis, and presumably your $3times3$ rotation matrix $mathbfA$ is defined such that $mathbfr'=mathbfAcdotmathbfr$ (or the same equation, but with the transpose of $mathbfA$). In that case $costheta=A_33$ because it is just the scalar product between the original, and rotated, $(0,0,1)$ vectors. So take the arccos of the $3,3$ element of the rotation matrix.
I advise you to double check that this makes sense for your definitions and coordinate systems!
edited Jul 20 at 6:21
answered Jul 19 at 22:55


LonelyProf
1415
1415
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2857042%2fhow-do-you-calculate-the-vertical-angle-from-a-3d-rotation-matrix-or-a-quaternio%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Try starting here.
– amd
Jul 19 at 22:11