Skip to content

Commit

Permalink
go back to 1sd for visit radiuses #35
Browse files Browse the repository at this point in the history
  • Loading branch information
sobri909 committed Aug 15, 2018
1 parent 6d9760d commit 69f2106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LocoKit/Base/Timelines/Items/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ open class Path: TimelineItem {
continue
}
let metresFromCentre = visitCenter.distance(from: sampleLocation)
if metresFromCentre <= visit.radius2sd {
if metresFromCentre <= visit.radius1sd {
insiders.insert(sample)
}
}
Expand Down
4 changes: 2 additions & 2 deletions LocoKit/Base/Timelines/Items/Visit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ open class Visit: TimelineItem {
guard let center = center, let otherCenter = otherVisit.center else {
return nil
}
return center.distance(from: otherCenter) - radius2sd - otherVisit.radius2sd
return center.distance(from: otherCenter) - radius1sd - otherVisit.radius1sd
}

internal func distance(from path: Path) -> CLLocationDistance? {
Expand All @@ -104,7 +104,7 @@ open class Visit: TimelineItem {
guard let pathEdge = path.edgeSample(with: self)?.location, pathEdge.hasUsableCoordinate else {
return nil
}
return center.distance(from: pathEdge) - radius2sd
return center.distance(from: pathEdge) - radius1sd
}

public override func maximumMergeableDistance(from otherItem: TimelineItem) -> CLLocationDistance {
Expand Down

0 comments on commit 69f2106

Please sign in to comment.