-1

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

Paul10220
  • 21
  • 3

1 Answers1

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