Represents a track with various properties and methods to interact with it.

Implements

Constructors

Properties

Accessors

Methods

Constructors

Properties

dist: number

The total distance of the track in kilometers.

gain: number

The total elevation gain of the track in meters.

loss: number

The total elevation loss of the track in meters.

points: Types.TrackPoint[]

An array of track points that make up the track.

Accessors

Methods

  • Gets the latitude, longitude, altitude, and index for a given distance location along the track.

    Parameters

    • location: number

      The distance location along the track.

    Returns { alt: number; lat: number; lon: number }

    The latitude, longitude, and altitude at the specified location.

  • Reduces the density of track points based on the specified spacing and length.

    Parameters

    • spacing: number = 0.025

      The desired spacing between points (optional).

    • length: number = ...

      The desired length of the track (optional).

    Returns Models.Track

    A new track with reduced point density.