JavadocMD / simplelatlng

A simple, lightweight library for common latitude and longitude calculation needs in Java.
90 stars 20 forks source link

Calculate initial bearing #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to see the addition of calculation of initial bearing from one LatLng 
to another. I need this along with distance and calculated it using the 
forumula given here http://williams.best.vwh.net/avform.htm and (in Javascript) 
here http://www.movable-type.co.uk/scripts/latlong.html.

I'm not sure it's worth the trouble, but there could be some optimization when 
calculating both distance and initial bearing since both calculations need some 
of the same intermediate values (including at least the radian-converted 
latitudes of each LatLng and the cosines of each of those values).

If you'd be interested in having this in the library I may be able to 
contribute a patch.

Original issue reported on code.google.com by duelin.m...@gmail.com on 7 Oct 2011 at 9:11

GoogleCodeExporter commented 9 years ago
I can definitely see this living in the library. I'll try to get to it soon, 
hopefully within the next week or so. No worries on the patch: I have a few 
ideas.

Original comment by TylerCo...@gmail.com on 12 Oct 2011 at 5:27

GoogleCodeExporter commented 9 years ago
This has finally been added to v1.1.0. Sorry for the wait!

Original comment by TylerCo...@gmail.com on 25 Feb 2013 at 5:58