getTotalUp method

double getTotalUp(
  1. int start,
  2. int end
)

Total uphill elevation between start and end (meters).

Parameters

  • start: Begin distance (meters) along the route.
  • end: End distance (meters) along the route.

Returns

  • Total ascent in meters for the interval. Returns 0 for invalid intervals.

Also see:

  • getTotalDown - Total downhill elevation between start and end
  • totalUp - Total uphill elevation along the route

Implementation

double getTotalUp(int start, int end) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteTerrainProfile',
    'getTotalUpBE',
    args: <String, int>{'first': start, 'second': end},
  );

  double result = resultString['result'];

  if (result.abs() < 0.0001) {
    result = 0;
  }

  return result;
}