TrackPoint
public struct TrackPoint : Hashable, Sendable
extension TrackPoint: GeoCoordinate
extension TrackPoint: HeightMappable
A value describing a single data point in a GPXTrack
. A TrackPoint
has the latitude, longitude and elevation
data along with meta data such as a timestamp or power values.
-
The
Coordinate
(latitude, longitude and elevation in meters)Declaration
Swift
public var coordinate: Coordinate
-
Optional date for a given point. This is the date stamp from a gpx file, recorded from a bicycle computer or running watch.
Declaration
Swift
public var date: Date?
-
Optional power value for a given point in a gpx file, which got recorded from a bicycle computer through a power meter.
Declaration
Swift
public var power: Measurement<UnitPower>?
-
Optional cadence value in revolutions per minute for a given point in a gpx file, which got recorded from a bicycle computer through a cadence sensor.
Declaration
Swift
public var cadence: UInt?
-
Optional heartrate value in beats per minute for a given point in a gpx file, which got recorded from a bicycle computer through a heartrate sensor.
Declaration
Swift
public var heartrate: UInt?
-
Optional temperature value for a given point in a gpx file, which got recorded from a bicycle computer through a temperature sensor.
Declaration
Swift
public var temperature: Measurement<UnitTemperature>?
-
Optional speed value for a given point in a gpx file, which got recorded from a bicycle computer through a speed sensor.
Declaration
Swift
public var speed: Measurement<UnitSpeed>?
-
Initializer You don’t need to construct this value by yourself, as it is done by GXPKits track parsing logic.
Declaration
Swift
public init( coordinate: Coordinate, date: Date? = nil, power: Measurement<UnitPower>? = nil, cadence: UInt? = nil, heartrate: UInt? = nil, temperature: Measurement<UnitTemperature>? = nil, speed: Measurement<UnitSpeed>? = nil )
Parameters
coordinate
The
Coordinate
(latitude, longitude and elevation in meters)date
Optional date for a point. Defaults to nil.
power
Optional power value for a point. Defaults to nil.
cadence
Optional cadence value for a point. Defaults to nil.
heartrate
Optional heartrate value for a point. Defaults to nil.
temperature
Optional temperature value for a point. Defaults to nil.
speed
Optional speed value for a point. Defaults to nil.
-
Declaration
Swift
public var latitude: Double { get }
-
Declaration
Swift
public var longitude: Double { get }
-
Declaration
Swift
public var elevation: Double { get }