Skip to content

Commit

Permalink
Merge pull request #109 from jovandeginste/fit-garmin-alt
Browse files Browse the repository at this point in the history
Add "Garmin" to the list of correct altitude creators
  • Loading branch information
jovandeginste authored Apr 15, 2024
2 parents 8207140 + d6ecbb7 commit f7fad0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/database/workouts_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package database

import (
"math"
"slices"
"time"

"github.com/codingsince1985/geo-golang"
Expand All @@ -13,8 +14,14 @@ import (

var online = true

var correctAltitudeCreators = []string{
"Garmin", "Garmin Connect",
"Apple Watch",
"StravaGPX iPhone", "StravaGPX",
}

func creatorNeedsCorrection(creator string) bool {
return creator != "Garmin Connect" && creator != "Apple Watch" && creator != "StravaGPX iPhone" && creator != "StravaGPX"
return !slices.Contains(correctAltitudeCreators, creator)
}

func normalizeDegrees(val float64) float64 {
Expand Down

0 comments on commit f7fad0f

Please sign in to comment.