Loading

mapper.hdist

mapper geo

The mapper.hdist function computes the total distance traveled while going through the points in the sliding window in chronological order. This distance is in meters.

The distance used is the loxodromic distance aka rhumb line. As a consequence, elevation is not taken into account in the distance.

If a point has no position in the sliding window, it is ignored.

The associated location and elevation are those at the tick being computed if it is part of the sliding window.

The mapper.hdist function can be applied to data of any type since it only considers locations.

mapper.hdist is available since version 1.0.11.

See also

Signatures

Examples

// Make a GTS with points on the equator NEWGTS -180 180 <% 'lon' STORE $lon 180 + 0 $lon 0 'Around the world' ADDVALUE %> FOR // Accumulate the distance following the equator [ SWAP mapper.hdist 360 0 0 ] MAP