I am using Jeff library to get Rotational data from the MPU6050. but there is a problem ! Jeff lib
Jeff codes made 0 to 360 degree output. that's mean we don't have 361 degree! and more. in my project I need freely rotational. for example 800 degree or -1250 degree....
I guess this part of library must be changed :
uint8_t MPU6050::dmpGetYawPitchRoll(float *data, Quaternion *q, VectorFloat *gravity) {
// yaw: (about Z axis)
data[0] = atan2(2*q -> x*q -> y - 2*q -> w*q -> z, 2*q -> w*q -> w + 2*q -> x*q -> x - 1);
// pitch: (nose up/down, about Y axis)
data[1] = atan(gravity -> x / sqrt(gravity -> y*gravity -> y + gravity -> z*gravity -> z));
// roll: (tilt left/right, about X axis)
data[2] = atan(gravity -> y / sqrt(gravity -> x*gravity -> x + gravity -> z*gravity -> z));
return 0;
}
But I don't have mathematical knowledge. :-[
please help me to do that. many thanks...