The double integration of acceleration gives the position of an object. However, how should the position of an object fitted with accelerometer and gyroscope be determined using the data from the two sensors.
Sensory data fusion is used to combine data collected by different sensors. You can obtain a better position estimation with lower uncertainty compared to any independent measurement.
Hi. Referring to the above comments, do you have 3-axis accelerometers? If you truly only want position, then you don't need gyroscopes. However, if you want position and orientation, then you can determine orientation from the accelerometer data (if you have all 3 axes) and compare or update it with gyroscopes to compensate for accelerometer drift.
the problem you are referring to usually receives the name of "inertial navigation" or "dead reckoning". It is something I am currently working on, and is a problem whose solution is not direct.
The method I am using is:
1. Obtain a good "orientation estimation" or "attitude estimation". This is, find the best guess of the rotation transformation that relates two reference frames: the one attached to your sensor, and other one usually taken to be an inertial reference frame (or approximately inertial) as one whose z-axis points in a direction orthogonal with the Earth surface. The accelerometers sense the gravity accelerations, so it gives you information about "where it is down". Gyroscopes help predict orientation. A common approach is to use a Kalman filter:
https://www.youtube.com/watch?v=JpjQP7dHhgk
although others use gradient descent techniques and also obtain good results:
https://www.youtube.com/watch?v=fOSTOnQzZCI
2. Transform the acceleration measurements (taken in a non inertial reference frame: the one attached to your sensor) to the inertial reference frame using the rotation transformation obtained with orientation estimation.
3. Subtract the acceleration due to gravity.
4. Integrate the resulting acceleration twice to obtain position.
This is what you usually obtain when you perform this process:
If you have seen those videos you will have begun to think that it is not possible. However, in certain scenarios you can use pseudo-measurements to improve your estimation:
https://www.youtube.com/watch?v=6ijArKE8vKU
I would conclude that depending on your application, you should use pseudo-measurements, or include more sensors to estimate the position. In other case, as far as I know, it is not possible to obtain a good position estimation.
There are many books on this subject of inertial navigation. The classic treatment is in Britting: https://www.amazon.com/Inertial-Navigation-Analysis-Technology-Applications/dp/1608070786
For a quick understanding of dead reckoning (inertial integration without any corrective input such as GPS): see the work of Demoz Gebe-Egziabher: https://www.researchgate.net/scientific-contributions/7217363_Demoz_Gebre-Egziabher