The methods included in the Android API for obtaining orientation do not include readings from the gyro sensor. The gyroscope does not provide orientation information, since it only has rotation speed information.
You can take advantage of the gyro sensor readings using this information to better evaluate your orientation:
- Step 1: initial orientation assessment.
- Step 2: You received a newer orientation estimate and some information from the gyro sensor.
- You have information about the increase in time (delta-t) between steps 1 and 2: So, you can integrate the speed of rotation at this time to get an estimate of the rotation between the two states.
- You also have a new orientation reading in state 2.
- You can integrate these two sources of information ([orientation @step = 1 + rotation] and [orientation @step = 2]) to get a refined orientation estimate in step 2.
- This can be done in a fairly simple way using an additional filter.
source share