In the project using real-time positioning, followed by the need to obtain various positions of information, coordinates, speed, direction, address ....
But when I get direction information, I'm stuck in a tangle ... Originally wanted to use the course value to determine the direction, but used to find, not accurate, and then think of another method, call magnetometer, with hardware to get directions, here I refer to other people's articles
Reference: http://blog.csdn.net/sunnyboy9/article/details/50923101
Reference: Http://www.tuicool.com/articles/byA7RrF
The following is directly on the code, because the device supports the magnetometer at 3g, so the following is judged (and the method of judgment is abolished – not a proper method is found). Sweat 、、、)
In this way after the operation can get direction, the approximate direction is set by oneself, can be adjusted accordingly. If applied to the project, then the picture is good, the same can achieve the purpose, the specific results printed out can be seen.
If you have a better way, please timely @ me, so that I can learn, thanks!
Drop the compass to determine the direction of movement