开发者

How do you retrieve the azimuth of an Android device?

开发者 https://www.devze.com 2023-03-28 17:02 出处:网络
Azimuth is defined by Wikipedia as: An angular measurement in a spherical coordinate system. The vector from an开发者_如何学C observer (origin) to a

Azimuth is defined by Wikipedia as:

An angular measurement in a spherical coordinate system. The vector from an开发者_如何学C observer (origin) to a point of interest is projected perpendicularly onto a reference plane; the angle between the projected vector and a reference vector on the reference plane is called the azimuth.

How can I get this value on Android?


float [] orientation = SensorManager.getOrientation();
float azimuth = orientation[0];

See also: SensorManager.getOrientation(...);

0

精彩评论

暂无评论...
验证码 换一张
取 消