Latitude of the start point in decimal degrees.
Longitude of the start point in decimal degrees.
Latitude of the end point in decimal degrees.
Longitude of the end point in decimal degrees.
Longest allowed distance between consecutive points in nautical miles. Must be a positive finite number.
The points along the arc in order, including both endpoints.
Computes evenly spaced points along the great-circle arc between two geographic positions, no more than
maxSegmentNmapart, starting at the first position and ending at the second. Useful for drawing a long leg on a flat map projection, where a straight line between the endpoints visibly departs from the arc the distance describes.The arc is split into the fewest equal segments that keep each one within
maxSegmentNm, so a 100 NM leg at a 25 NM limit yields 5 points and a leg shorter than the limit yields just its 2 endpoints. The endpoints are returned exactly as given; intermediate longitudes are normalized to the range[-180, 180], so an arc crossing the antimeridian changes sign partway, and a consumer drawing it on a map unwraps the longitudes first. For antipodal inputs the arc is underdetermined; the points follow the initial bearing bearing returns, so the result is still finite and deterministic.