Separating Gyro values, X, Y and Z from RTimuLIB

Hi jremington

Your code works.

Here is my modified lines for Hatire plugin with either OpenTrack or FaceTracknoIR,

{
      RTVector3 vec = fusion.getFusionPose();
      hat.gyro[0] = (vec.x() * RTMATH_RAD_TO_DEGREE);
      hat.gyro[1] = (vec.y() * RTMATH_RAD_TO_DEGREE);
      hat.gyro[2] = (vec.z() * RTMATH_RAD_TO_DEGREE);

      //Send Trame to HATIRE PC
      Serial.write((byte*)&hat,30);

      // inc frame cpt
      hat.Cpt++;
      if (hat.Cpt>1000) {
      hat.Cpt=0;;
      }
      delay(10);
      }

Just curious, there shouldn't be any drift with an MPU that have a magnetometer built-in. I ran the Mag/Calibration sketch and noted the RTimulib library serial printed values seem to be more stable compared to other library. I think I am seeing a minor drift. It maybe a defected MPU(unbranded). I will solder and test another MPU9250 and will post the result.

Thanks you, jremington and all. 'S (Salute in flightsim communities)