Commit 6e0acb76 authored by Devansh Kandpal's avatar Devansh Kandpal
Browse files

Fixed Q-factor assignmnet in parseQuaternionData() to resolve head-tracking issues

parent 04e71a6d
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1607,13 +1607,13 @@ static ivas_error parseQuaternionData(
            /* Recieved values can be seen in console */
            printf( "[rotation: w=%+.2f, x=%+.2f, y=%+.2f, z=%+.2f]\n", w, x, y, z );

            //Quaternion data is in float. Conver this to fixed point in Q22 format and set the Qformat of quaternion to 22.
            //Quaternion data is in float. Convert this to fixed point in Q22 format and set the Qformat of quaternion to 22.
            pQuaternion->w_fx = w * ONE_IN_Q22;
            pQuaternion->x_fx = x * ONE_IN_Q22;
            pQuaternion->y_fx = y * ONE_IN_Q22;
            pQuaternion->z_fx = z * ONE_IN_Q22;      
            // Q-factor of IVAS quaternion?? can we set it to Q0? set to 22 later
             pQuaternion->q_fact = 25;
             pQuaternion->q_fact = 22;
        }
    }
    else