Jump to content
I2Cdevlib Forums
prajwal98

What is the unit of the output from dmpGetLinearAccelInWorld()

Recommended Posts


      #ifdef OUTPUT_READABLE_WORLDACCEL
        #ifdef OUTPUT_READABLE_WORLDACCEL
            // display initial world-frame acceleration, adjusted to remove gravity
            // and rotated based on known orientation from quaternion
            mpu.dmpGetQuaternion(&q, fifoBuffer);
            mpu.dmpGetAccel(&aa, fifoBuffer);
            mpu.dmpGetGravity(&gravity, &q);
            mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity);
            mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q);
            Serial.print("aworld\t");
            Serial.print(aaWorld.x);
            Serial.print("\t");
            Serial.print(aaWorld.y);
            Serial.print("\t");
            Serial.println(aaWorld.z);
        #endif

I want to ask that what is the unit of above aaWorld  values ? I understand that  if i need to get the acceleration without gravity  i need to use these values , but the values that we get from these are in m/s^2?  or do i need to do something  acc_in_ms2=(aaWorld.x*9.8)/16384.0 ? or something else.

my offset are as follows


    mpu.setXGyroOffset(220);
    mpu.setYGyroOffset(76);
    mpu.setZGyroOffset(6);
    mpu.setZAccelOffset(1262);

and my output is as follows without doing any changes in code provided  after 10-15 sec (the sensor is horizontal)

aworld	0	28	60
aworld	-1	29	40
aworld	5	29	33
aworld	6	24	20
aworld	2	23	22
aworld	-4	13	26
aworld	-6	11	28
aworld	-10	11	30
aworld	-15	5	38
aworld	-7	-1	36
aworld	7	-4	37
aworld	7	0	33
aworld	4	5	29
aworld	0	2	30
aworld	-3	-7	35

seems coreect all the values converging to zeros..

but when i move the sensor in one direction , i get totally unexpected values..

aworld	-415	-306	304
aworld	-505	-277	318
aworld	-577	-270	399
aworld	-587	-207	265
aworld	-572	-166	63
aworld	-589	-200	-28
aworld	-631	-258	-7
aworld	-638	-292	30
aworld	-637	-334	29
aworld	-647	-404	-23
aworld	-640	-483	-75
aworld	-611	-542	-72
aworld	-633	-503	-24
aworld	-723	-344	17
aworld	-816	-125	36
aworld	-908	72	1
aworld	-988	241	-45
aworld	-1015	378	-68

I am moving the sesor only to and fro in one direction  but i am getting these values 

Why so?

please help if you have any information /knowledge about this...

I want acceleration mithout gravity affect in m/s^2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...