How To access DMP Euler Angles

By kkvinod , 5 December 2014

Hi,
I am using teensy 3.1 board (uses arduino IDE), and MPU9250 connected by I2C.

I managed to get all the raw values of the sensors, but could not find how to get euler anlgles from DMP (with or without FIFO)

Is there any code i can rely on or documentation to read on how to get euler angles from the DMP?

Thanks

brint

11 years 3 months ago

Hi,
If you can read quaternions, you can easily calculate euler angels.
(this is what I do)

RAD_2_DEG = 180/pi;
euler(1) = RAD_2_DEG * atan2( 2*i*j - 2*w*k , 2*w*w + 2*i*i - 1);
euler(2) = RAD_2_DEG * -asin( 2*i*k + 2*w*j );
euler(3) = RAD_2_DEG * atan2( 2*j*k - 2*w*i , 2*w*w + 2*k*k - 1);
[/size]
phpbb Post ID
26151
phpbb Topic ID
16806