I have access to rotation degrees from oculus. Quanterion to Euler, Euler to degrees. Range of pitch, roll and yaw is from -90 to 90. Is there any way to increase range -180 to 180? I know that can't use arcus functions, because it has ranges from -pi/2 to pi/2
Asked
Active
Viewed 491 times
-1
-
Multiply it by 2... You cannot rotate your head more than 90 degrees. – Adrian Krupa Sep 27 '15 at 22:04
-
In theory the equations should be able to work with angles in any range. We would need more details and a code sample to see the process you are using. – Salix alba Sep 28 '15 at 14:57
-
Ok, i'll answer under it – Paul10220 Sep 28 '15 at 17:27
1 Answers
0
double a = ts.HeadPose.ThePose.Orientation.x;
double b = ts.HeadPose.ThePose.Orientation.y;
double c = ts.HeadPose.ThePose.Orientation.z;
double d = ts.HeadPose.ThePose.Orientation.w;
double kat_x = atan2(2 * (a*b + c*d), 1 - 2 * (b*b + c*c));
kat_x = (kat_x * 180) / 3.1415;
double kat_y = asin(2 * (a*c - d*b));
kat_y = (kat_y * 180) / 3.1415;
double kat_z = atan2(2 * (a*d + b*c), 1 - 2 * (c*c + d*d));
kat_z = (kat_z * 180) / 3.1415;
Ok now it's working. Instead of using atan i needed to use atan2

Paul10220
- 21
- 3