Distance

data class Distance(val unit: KHUnit.Length, val value: Double, val startTime: Instant, val endTime: Instant) : KHRecord

Captures distance travelled by the user since the last reading. The total distance over an interval can be calculated by adding together all the values during the interval. The start time of each record should represent the start of the interval in which the distance was covered.

If break downs are preferred in scenario of a long workout, consider writing multiple distance records. The start time of each record should be equal to or greater than the end time of the previous record.

Parameters

unit

Measurement scale of this record

value

The value of this record

startTime

The start instant of the interval over which the value this record was captured

endTime

The end instant of the interval over which the value this record was captured

Constructors

Link copied to clipboard
constructor(unit: KHUnit.Length, value: Double, startTime: Instant, endTime: Instant)

Properties

Link copied to clipboard
val endTime: Instant
Link copied to clipboard
val startTime: Instant
Link copied to clipboard
Link copied to clipboard