mirror of
https://github.com/sstent/garminsync-go.git
synced 2026-01-26 09:01:47 +00:00
checkpoint 3
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
package parser
|
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
// ActivityMetrics contains all metrics extracted from activity files
|
|
||||||
type ActivityMetrics struct {
|
|
||||||
ActivityType string
|
|
||||||
StartTime time.Time
|
|
||||||
Duration time.Duration
|
|
||||||
Distance float64 // in meters
|
|
||||||
MaxHeartRate int
|
|
||||||
AvgHeartRate int
|
|
||||||
AvgPower int
|
|
||||||
Calories int
|
|
||||||
Steps int
|
|
||||||
ElevationGain float64 // in meters
|
|
||||||
ElevationLoss float64 // in meters
|
|
||||||
MinTemperature float64 // in °C
|
|
||||||
MaxTemperature float64 // in °C
|
|
||||||
AvgTemperature float64 // in °C
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parser defines the interface for activity file parsers
|
|
||||||
type Parser interface {
|
|
||||||
ParseFile(filename string) (*ActivityMetrics, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FileType represents supported file formats
|
|
||||||
type FileType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
FIT FileType = "fit"
|
|
||||||
TCX FileType = "tcx"
|
|
||||||
GPX FileType = "gpx"
|
|
||||||
)
|
|
||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/sstent/garminsync-go/internal/parser/activity/activity"
|
"github.com/sstent/garminsync-go/internal/parser/activity/activity/activity/activity"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GPX represents the root element of a GPX file
|
// GPX represents the root element of a GPX file
|
||||||
|
|||||||
Reference in New Issue
Block a user