Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change MPU6050 Orientation In The Program
11-28-2016, 09:56 AM
Post: #2
RE: Change MPU6050 Orientation In The Program
Yes, you are right ->You will pass to use the ROLL info instead the regular TILT. So, modify the code to something like this (comment/uncomment):

return( asin(-2*(q.x * q.z - q.w * q.y)) * 180/M_PI); //roll
//return Phi angle (robot orientation) from quaternion DMP output
//return (atan2(2 * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z) * RAD2GRAD);

* Check the sign of the "returned" roll value according to your setup
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Change MPU6050 Orientation In The Program - JJrobots JP - 11-28-2016 09:56 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)