Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/placeframe. a google timeline → photo EXIF data synchronizer
Something went wrong. Try again.
123456789101112131415161718192021222324252627import Foundation
public struct MatchScorer: Sendable { public init() {}
public func score(delta: TimeInterval, insideStationaryVisit: Bool, policy: MatchPolicy) -> (MatchConfidence, MatchDisposition) { let absoluteDelta = abs(delta)
if insideStationaryVisit && absoluteDelta > policy.maybeThreshold { return (.acceptable, .autoSuggested) } if absoluteDelta <= policy.excellentThreshold { return (.excellent, .autoSuggested) } if absoluteDelta <= policy.acceptableThreshold { return (.acceptable, .autoSuggested) } if absoluteDelta <= policy.maybeThreshold { return (.maybe, .ambiguous) } if insideStationaryVisit { return (.maybe, .ambiguous) } return (.rejected, .unmatched) }}