>>>This is true for a target in close range, where you can approx earth as a plane. I f you go farther it becomes a bit more tricky. Do you like to point a straight line (digging), great circle or what?
>>
>>Hi,
>>Given two locations Android's BearingTo() function already returns the bearing as the bearing based on shortest path using WGS84.
>>The solution turned out to be simple - see my reply to Al
>
>I can not realy follow it.
>
>As long as this is the great circle it's the shortest distance. If it's just heading - this will not work
>
>But to test is simple
>Select a destination same latitude as you are but 90° east. If your calculation ends up just east it's not the shortest path. Should more north in it.
For any practical purpose, the east-west circular section of the globe and the geodesic curve of the shortest path will end in the same place, as your device will follow one or the other all the time. It will either follow the way east or the shortest way.
For those unfamiliar with Riemann's geometry, the difference is obvious in the routes taken by airplanes when compared to east-west lines. The airplanes take the shortest route (imagine stretching a rubber band over the globe between the two places), i.e. the geodesic curve; the latitude lines don't care whether it's shorter or not, they are duly parallel to the equator.