Note that there are some explanatory texts on larger screens.

plurals
  1. POPosition calculation of small model of a car using Accelerometer + Gyroscope
    primarykey
    data
    text
    <p>I wish to calculate position of a small remote controlled car (relative to starting position). The car moves on a flat surface for example: a room floor. Now, I am using an accelerometer and a gyroscope. To be precise this board --> <a href="http://www.sparkfun.com/products/9623" rel="nofollow">http://www.sparkfun.com/products/9623</a></p> <p>As a first step I just took the accelerometer data in x and y axes (since car moves on a surface) and double integrated the data to get position. The formulae I used were:</p> <pre><code>vel_new = vel_old + ( acc_old + ( (acc_new - acc_old ) / 2.0 ) ) * SAMPLING_TIME; pos_new = pos_old + ( vel_old + ( (vel_new - vel_old ) / 2.0 ) ) * SAMPLING_TIME; vel_old = vel_new; pos_old = pos_new; acc_new = measured value from accelerometer </code></pre> <p>The above formulae are based on this document: <a href="http://perso-etis.ensea.fr/~pierandr/cours/M1_SIC/AN3397.pdf" rel="nofollow">http://perso-etis.ensea.fr/~pierandr/cours/M1_SIC/AN3397.pdf</a></p> <p>However this is giving horrible error.</p> <p>After reading other similar questions on this forum, I found out that I need to subtract the component of Gravity from above acceleration values (everytime from acc_new) by using gyroscope somehow. This idea is very well explained in Google Tech Talks video <a href="http://www.youtube.com/watch?v=C7JQ7Rpwn2k" rel="nofollow">Sensor Fusion on Android Devices: A Revolution in Motion Processing</a> at time 23:49.</p> <p>Now my problem is how to subtract that gravity component? I get angular velocity from gyroscope. How do I convert it into acceleration so that I can subtract it from the output of accelerometer?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload