0

I wanted to remove gravity from my 3-axis data, Please help me fixing it.

            mpu9250_read_accel(&AccValue);
            AX =    ((AccValue.x *9800)/(16384));
            AY =    ((AccValue.y *9800)/(16384));
            AZ =    ((AccValue.z *9800)/(16384));
  • My guess is to remove `* 9800` part (Earth's gravitation acceleration is 9.8m/s) – SimpleBeat Apr 19 '17 at 08:08
  • You mean to try this below mpu9250_read_accel(&AccValue); AX = ((AccValue.x )/(16384)); AY = ((AccValue.y )/(16384)); AZ = ((AccValue.z )/(16384)); – Aishwarya royal Apr 19 '17 at 08:13
  • Yep, and you can probably do away without the `(` and `)`. Like so: `AX = AccValue.x / 16384;` – SimpleBeat Apr 19 '17 at 08:18
  • Nope, We are getting the same kind of value. – Aishwarya royal Apr 19 '17 at 09:24
  • That's a bummer... Well, I saw a few similar questions here, some say MPUs are not accurate to do gravity compensation. Others refer to basic algorithms, like this one: http://stackoverflow.com/questions/18252692/gravity-compensation-in-accelerometer-data – SimpleBeat Apr 19 '17 at 15:11
  • Hello Sir, Help me, How to calculate quaternion values using Accelerometer, magnotometer, Gyrometer?? – Aishwarya royal Apr 20 '17 at 06:48
  • That's a really good question. I wish I could, but this is way too out of my league. Most of the physics I ever did is in-game, not real world. I believe you can open another question, or search SO. Good luck! – SimpleBeat Apr 20 '17 at 06:50

0 Answers0