virocore icon indicating copy to clipboard operation
virocore copied to clipboard

Rotation of Y axis is not calculated properly

Open mitchell-ganton opened this issue 5 years ago • 2 comments

Environment

OS: Mac Version: Latest ViroCore version Device(s): Android

Description

The rotation for x and z coordinates are calculated properly. However the y coordinate in not.

Reproducible Demo

Here we see how the z coordinate is calculated properly. When tilted 180 degrees on the z axis the value is pi

x_axis

When the y axis is tilted 180 degrees the value is zero.

y_axis

mitchell-ganton avatar Mar 27 '19 17:03 mitchell-ganton

Hi @mitchell-ganton,

This is simply because of how rotations work, a 180 degree rotation in the Y is the same as a 180 degree rotation in the X and the Z which is what you see at the end of your video (both the X and Z rotation values are equal to about PI).

Thanks,

achuvm avatar Mar 28 '19 19:03 achuvm

Hi @achuvm , I am coworker of Mitch. we are a bit confused with this Y axis rotation thing. Our understanding is that if we rotate the phone around Y axis in 360 degree. The value in Y should change from 0 to pi to -pi and then back to 0 again, but this is apparently not happening. The confusing part is that this does happen for X and Z axis but just not for Y. Is there anything which makes Y axis different than others? If rotation along Y axis is somehow reflected via the value changes on X and Z. Is there any method in the framework such that we can calculated the angle when we rotate the phone around the Y axis?

ansonyao avatar Apr 02 '19 22:04 ansonyao