How to compute coordinates of start/end points of a ArcByCenterPoint?

400 Views Asked by At

Given an ArcByCenterPoint, defined by:

  1. center position (lat,lon in WGS84)
  2. radius (meters)
  3. startAngle (degrees)
  4. endAngle (degrees)

how can we compute the position (lat, lon) of start/end points? I'm looking for a formula.

2

There are 2 best solutions below

1
On BEST ANSWER

You can find appropriate formulas in the section Destination point given distance and bearing from start point here
Excerpt:

Formula:
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )     
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
where   
φ is latitude, λ is longitude, 
θ is the bearing (clockwise from north), 
δ is the angular distance d/R; 
d being the distance travelled, R the earth’s radius
0
On

If you want extreme accuracy try using GeographicLib and the formula in the source code under the hood of the Direct Problem at the "Geodesic calculations for an ellipsoid done right" web page.