문제

Is the bearing returned by the accelerometer the way to go, or it's better to use the one GPS service returns?

도움이 되었습니까?

해결책

Accelerometer + magnetic sensor is definitely the way to go. GPS service does not return bearing if the device is static. The getBearing() method only returns something if the device is moving. As stated in the documentation, hasBearing() typically returns false.

In fact, the word bearing is quite dangerous when used in these contexts, because the bearing from the accelerometer is understandable as the direction the device is facing, while the bearing from the GPS service is the direction alongside the device is moving.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top