heartandsole.Activity.distance.total

Activity.distance.total(source='records')[source]

Return total distance in meters.

Parameters

source (str) –

Source from which to obtain total distance.

  • records (default): last cumulative distance value in the records DataFrame.

  • summary: total value in the summary Series.

  • laps: sum of total column in the laps DataFrame.

  • position: last cumulative distance value in the Series calculated by Activity.distance.records_from_position().

Returns

Total distance according to the requested source. If the Activity does not possess the requested data source, return None.

Return type

float or None

Raises

ValueError – If source is not a valid option.

See also

Activity.distance.records_from_position()

Calculate cumulative distance from GPS coordinates.