Cumulative Arc Length on a Polyline

Compute the total and cumulative arc length of a great-circle polyline route by summing leg lengths, and recover individual leg lengths and inter-waypoint distances from a cumulative-distance table.

Step 1 of 157%

Tutorial

Polylines and Total Arc Length

A polyline route on the sphere is a sequence of waypoints P0,P1,P2,,PnP_0, P_1, P_2, \ldots, P_n joined by great-circle segments. The ii-th leg runs from Pi1P_{i-1} to PiP_i along the shorter great-circle arc, and has arc length did_i.

The total arc length of the route is the sum of all leg lengths:

L=d1+d2++dn=i=1ndi.L = d_1 + d_2 + \cdots + d_n = \sum_{i=1}^{n} d_i.

For example, a 3-leg route with leg lengths d1=250d_1 = 250 km, d2=380d_2 = 380 km, and d3=195d_3 = 195 km has total length

L=250+380+195=825 km.L = 250 + 380 + 195 = 825 \text{ km}.
navigate · Enter open · Esc close · ⌘K/Ctrl K toggle