parameterize slope segment function
This commit is contained in:
parent
1b741c3b2f
commit
4ebf2b6fa9
1 changed files with 1 additions and 1 deletions
|
@ -806,7 +806,7 @@ export class TrackSegment extends GPXTreeLeaf {
|
||||||
return distanceWindowSmoothingWithDistanceAccumulator(points, 50, (accumulated, start, end) => 100 * ((points[end].ele ?? 0) - (points[start].ele ?? 0)) / (accumulated > 0 ? accumulated : 1));
|
return distanceWindowSmoothingWithDistanceAccumulator(points, 50, (accumulated, start, end) => 100 * ((points[end].ele ?? 0) - (points[start].ele ?? 0)) / (accumulated > 0 ? accumulated : 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeSlopeSegments(statistics: GPXStatistics): [number[], number[]] {
|
_computeSlopeSegments(statistics: GPXStatistics, epsilon = 20): [number[], number[]] {
|
||||||
// x-coordinates are given by: statistics.local.distance.total[point._data.index] * 1000
|
// x-coordinates are given by: statistics.local.distance.total[point._data.index] * 1000
|
||||||
// y-coordinates are given by: point.ele
|
// y-coordinates are given by: point.ele
|
||||||
// Compute the distance between point3 and the line defined by point1 and point2
|
// Compute the distance between point3 and the line defined by point1 and point2
|
||||||
|
|
Loading…
Reference in a new issue