Get angle of elevation?

前端 未结 2 1888
面向向阳花
面向向阳花 2021-02-03 16:26

From the accelerometer, is it possible to get the angle of elevation? For those of you who don\'t know, the angle of elevation is:

2条回答
  •  一向
    一向 (楼主)
    2021-02-03 17:02

    When measuring movement there is generally no concept of orientation. A multi-axis accelerometer measuring static acceleration (acceleration due to gravity) could be used to calculate the angle relative the earth.

    Most androids phones comes with a number of sensors such as gyroscope etc which can interfaced. See the javadocs for SensorManager and the various types of SensorEvents.

提交回复
热议问题