Question

I am using Gyroscope's useracceleration and trying to convert it to speed and ultimately to distance. Error for now is not a concern. The problem is that i do not know what are the units of the value that gyroscope's user acceleration returns.

As implicitly acceleration is in m/s2 so I convert it to m/s and then to meters. The value of distance i get is too small. Then I change my assumption of m/s2 to km/s2 and then again do the conversion and then the value of distance i get is somewhat realistic(again the error for now is not a concern). I've looked at the documentation and different Q&A blogs but no explicit mention of the units in which gyroscope.useracceleration is returned.

Any help on this topic. I need to know the type of value returned so that I can use it to my benefit. I've also studied that we need to integrate, then double integrate it to get distance. But for that as well I need to know what type of value and in which unit it is returned.

Was it helpful?

Solution

Acceleration is reported as G-force values, i.e. 1g = 9.81 m/s^2.

While the documentation for Gyroscope doesn't mention any units, the reference for Input states that "Acceleration along each axis is reported directly by the hardware as G-force values".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top