Documentation
¶
Overview ¶
Package fit implements decoding of the Flexible and Interoperable Data Transfer (FIT) Protocol. For more information see https://github.com/tormoder/gofit.
Example ¶
// Read our FIT test file data
testFile := filepath.Join("testdata", "fitsdk", "Activity.fit")
testData, err := ioutil.ReadFile(testFile)
if err != nil {
fmt.Println(err)
return
}
// Decode the FIT file data
fit, err := fit.Decode(bytes.NewReader(testData))
if err != nil {
fmt.Println(err)
return
}
// Inspect the TimeCreated field in the FileId message
fmt.Println(fit.FileId.TimeCreated)
// Inspect the dynamic Product field in the FileId message
fmt.Println(fit.FileId.GetProduct())
// Inspect the FIT file type
fmt.Println(fit.FileType())
// Get the actual activity
activity, err := fit.Activity()
if err != nil {
fmt.Println(err)
return
}
// Print the latitude and longitude of the first Record message
for _, record := range activity.Records {
fmt.Println(record.PositionLat)
fmt.Println(record.PositionLong)
break
}
// Print the sport of the first Session message
for _, session := range activity.Sessions {
fmt.Println(session.Sport)
break
}
Output: 2012-04-09 21:22:26 +0000 UTC Hrm1 Activity 41.513926070183516 -73.14859078265727 Running
Index ¶
- func CheckIntegrity(r io.Reader, headerOnly bool) error
- func DecodeHeaderAndFileID(r io.Reader) (*Header, *FileIdMsg, error)
- type AccelerometerDataMsg
- type ActivityClass
- type ActivityFile
- type ActivityLevel
- type ActivityMode
- type ActivityMsg
- type ActivitySubtype
- type ActivitySummaryFile
- type ActivityType
- type AntNetwork
- type AntplusDeviceType
- type AttitudeStage
- type AttitudeValidity
- type AutolapTrigger
- type AviationAttitudeMsg
- type BatteryStatus
- type BikeProfileMsg
- type BloodPressureFile
- type BloodPressureMsg
- type BodyLocation
- type Bool
- type BpStatus
- type CadenceZoneMsg
- type CameraEventMsg
- type CameraEventType
- type CameraOrientationType
- type CapabilitiesMsg
- type Checksum
- type CommTimeoutType
- type ConnectivityCapabilities
- type CourseCapabilities
- type CourseFile
- type CourseMsg
- type CoursePoint
- type CoursePointMsg
- type DeviceFile
- type DeviceIndex
- type DeviceInfoMsg
- type DeviceSettingsMsg
- type DisplayHeart
- type DisplayMeasure
- type DisplayPosition
- type DisplayPower
- type Event
- type EventMsg
- type EventType
- type FieldCapabilitiesMsg
- type File
- type FileCapabilitiesMsg
- type FileCreatorMsg
- type FileFlags
- type FileIdMsg
- type Fit
- func (f *Fit) Activity() (*ActivityFile, error)
- func (f *Fit) ActivitySummary() (*ActivitySummaryFile, error)
- func (f *Fit) BloodPressure() (*BloodPressureFile, error)
- func (f *Fit) Course() (*CourseFile, error)
- func (f *Fit) Device() (*DeviceFile, error)
- func (f *Fit) FileType() File
- func (f *Fit) Goals() (*GoalsFile, error)
- func (f *Fit) MonitoringA() (*MonitoringAFile, error)
- func (f *Fit) MonitoringB() (*MonitoringBFile, error)
- func (f *Fit) MonitoringDaily() (*MonitoringDailyFile, error)
- func (f *Fit) Schedules() (*SchedulesFile, error)
- func (f *Fit) Segment() (*SegmentFile, error)
- func (f *Fit) SegmentList() (*SegmentListFile, error)
- func (f *Fit) Settings() (*SettingsFile, error)
- func (f *Fit) Sport() (*SportFile, error)
- func (f *Fit) Totals() (*TotalsFile, error)
- func (f *Fit) Weight() (*WeightFile, error)
- func (f *Fit) Workout() (*WorkoutFile, error)
- type FitnessEquipmentState
- type FormatError
- type GarminProduct
- type Gender
- type Goal
- type GoalMsg
- type GoalRecurrence
- type GoalsFile
- type GyroscopeDataMsg
- type Header
- type HrType
- type HrZoneCalc
- type HrZoneMsg
- type HrmProfileMsg
- type HrvMsg
- type IntegrityError
- type Intensity
- type Language
- type LapMsg
- type LapTrigger
- type Latitude
- type LeftRightBalance
- type LeftRightBalance100
- type LengthMsg
- type LengthType
- type Longitude
- type Manufacturer
- type MemoGlobMsg
- type MesgCapabilitiesMsg
- type MesgCount
- type MesgNum
- type MessageIndex
- type MetZoneMsg
- type MonitoringAFile
- type MonitoringBFile
- type MonitoringDailyFile
- type MonitoringInfoMsg
- type MonitoringMsg
- type NmeaSentenceMsg
- type NotSupportedError
- type ObdiiDataMsg
- type PowerPhaseType
- type PowerZoneMsg
- type PwrZoneCalc
- type RecordMsg
- type RiderPositionType
- type Schedule
- type ScheduleMsg
- type SchedulesFile
- type SdmProfileMsg
- type SegmentDeleteStatus
- type SegmentFile
- type SegmentFileMsg
- type SegmentIdMsg
- type SegmentLapMsg
- type SegmentLapStatus
- type SegmentLeaderboardEntryMsg
- type SegmentLeaderboardType
- type SegmentListFile
- type SegmentPointMsg
- type SegmentSelectionType
- type SensorType
- type SessionMsg
- type SessionTrigger
- type SettingsFile
- type SlaveDeviceMsg
- type SoftwareMsg
- type SourceType
- type SpeedZoneMsg
- type Sport
- type SportBits0
- type SportBits1
- type SportBits2
- type SportBits3
- type SportBits4
- type SportBits5
- type SportEvent
- type SportFile
- type SportMsg
- type StrokeType
- type SubSport
- type SwimStroke
- type ThreeDSensorCalibrationMsg
- type TimeZone
- type TimerTrigger
- type TimestampCorrelationMsg
- type TotalsFile
- type TotalsMsg
- type TrainingFileMsg
- type UnknownField
- type UserLocalId
- type UserProfileMsg
- type VideoClipMsg
- type VideoDescriptionMsg
- type VideoFrameMsg
- type VideoMsg
- type VideoTitleMsg
- type Weight
- type WeightFile
- type WeightScaleMsg
- type WktStepDuration
- type WktStepTarget
- type WorkoutCapabilities
- type WorkoutFile
- type WorkoutHr
- type WorkoutMsg
- type WorkoutPower
- type WorkoutStepMsg
- type ZonesTargetMsg
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIntegrity ¶
CheckIntegrity verifies the FIT header and file CRC. Only the header CRC is verified if headerOnly is true.
Types ¶
type AccelerometerDataMsg ¶
type AccelerometerDataMsg struct {
}
type ActivityClass ¶
type ActivityClass byte
const ( ActivityClassLevel ActivityClass = 0x7F // 0 to 100 ActivityClassLevelMax ActivityClass = 100 ActivityClassAthlete ActivityClass = 0x80 ActivityClassInvalid ActivityClass = 0xFF )
func (ActivityClass) String ¶
func (i ActivityClass) String() string
type ActivityFile ¶
type ActivityFile struct {
Activity *ActivityMsg
Sessions []*SessionMsg
Laps []*LapMsg
Lengths []*LengthMsg
Records []*RecordMsg
Events []*EventMsg
Hrvs []*HrvMsg
}
type ActivityLevel ¶
type ActivityLevel byte
const ( ActivityLevelLow ActivityLevel = 0 ActivityLevelMedium ActivityLevel = 1 ActivityLevelHigh ActivityLevel = 2 ActivityLevelInvalid ActivityLevel = 0xFF )
func (ActivityLevel) String ¶
func (i ActivityLevel) String() string
type ActivityMode ¶
type ActivityMode byte
const ( ActivityModeManual ActivityMode = 0 ActivityModeAutoMultiSport ActivityMode = 1 ActivityModeInvalid ActivityMode = 0xFF )
func (ActivityMode) String ¶
func (i ActivityMode) String() string
type ActivityMsg ¶
type ActivitySubtype ¶
type ActivitySubtype byte
const ( ActivitySubtypeGeneric ActivitySubtype = 0 ActivitySubtypeTreadmill ActivitySubtype = 1 // Run ActivitySubtypeStreet ActivitySubtype = 2 // Run ActivitySubtypeTrail ActivitySubtype = 3 // Run ActivitySubtypeTrack ActivitySubtype = 4 // Run ActivitySubtypeSpin ActivitySubtype = 5 // Cycling ActivitySubtypeIndoorCycling ActivitySubtype = 6 // Cycling ActivitySubtypeRoad ActivitySubtype = 7 // Cycling ActivitySubtypeMountain ActivitySubtype = 8 // Cycling ActivitySubtypeDownhill ActivitySubtype = 9 // Cycling ActivitySubtypeRecumbent ActivitySubtype = 10 // Cycling ActivitySubtypeCyclocross ActivitySubtype = 11 // Cycling ActivitySubtypeHandCycling ActivitySubtype = 12 // Cycling ActivitySubtypeTrackCycling ActivitySubtype = 13 // Cycling ActivitySubtypeIndoorRowing ActivitySubtype = 14 // Fitness Equipment ActivitySubtypeElliptical ActivitySubtype = 15 // Fitness Equipment ActivitySubtypeStairClimbing ActivitySubtype = 16 // Fitness Equipment ActivitySubtypeLapSwimming ActivitySubtype = 17 // Swimming ActivitySubtypeOpenWater ActivitySubtype = 18 // Swimming ActivitySubtypeAll ActivitySubtype = 254 ActivitySubtypeInvalid ActivitySubtype = 0xFF )
func (ActivitySubtype) String ¶
func (i ActivitySubtype) String() string
type ActivitySummaryFile ¶
type ActivitySummaryFile struct {
Activity *ActivityMsg
Sessions []*SessionMsg
Laps []*LapMsg
}
type ActivityType ¶
type ActivityType byte
const ( ActivityTypeGeneric ActivityType = 0 ActivityTypeRunning ActivityType = 1 ActivityTypeCycling ActivityType = 2 ActivityTypeTransition ActivityType = 3 // Mulitsport transition ActivityTypeFitnessEquipment ActivityType = 4 ActivityTypeSwimming ActivityType = 5 ActivityTypeWalking ActivityType = 6 ActivityTypeAll ActivityType = 254 // All is for goals only to include all sports. ActivityTypeInvalid ActivityType = 0xFF )
func (ActivityType) String ¶
func (i ActivityType) String() string
type AntNetwork ¶
type AntNetwork byte
const ( AntNetworkPublic AntNetwork = 0 AntNetworkAntplus AntNetwork = 1 AntNetworkAntfs AntNetwork = 2 AntNetworkPrivate AntNetwork = 3 AntNetworkInvalid AntNetwork = 0xFF )
func (AntNetwork) String ¶
func (i AntNetwork) String() string
type AntplusDeviceType ¶
type AntplusDeviceType uint8
const ( AntplusDeviceTypeAntfs AntplusDeviceType = 1 AntplusDeviceTypeBikePower AntplusDeviceType = 11 AntplusDeviceTypeEnvironmentSensorLegacy AntplusDeviceType = 12 AntplusDeviceTypeMultiSportSpeedDistance AntplusDeviceType = 15 AntplusDeviceTypeControl AntplusDeviceType = 16 AntplusDeviceTypeFitnessEquipment AntplusDeviceType = 17 AntplusDeviceTypeBloodPressure AntplusDeviceType = 18 AntplusDeviceTypeGeocacheNode AntplusDeviceType = 19 AntplusDeviceTypeLightElectricVehicle AntplusDeviceType = 20 AntplusDeviceTypeEnvSensor AntplusDeviceType = 25 AntplusDeviceTypeRacquet AntplusDeviceType = 26 AntplusDeviceTypeWeightScale AntplusDeviceType = 119 AntplusDeviceTypeHeartRate AntplusDeviceType = 120 AntplusDeviceTypeBikeSpeedCadence AntplusDeviceType = 121 AntplusDeviceTypeBikeCadence AntplusDeviceType = 122 AntplusDeviceTypeBikeSpeed AntplusDeviceType = 123 AntplusDeviceTypeStrideSpeedDistance AntplusDeviceType = 124 AntplusDeviceTypeInvalid AntplusDeviceType = 0xFF )
func (AntplusDeviceType) String ¶
func (i AntplusDeviceType) String() string
type AttitudeStage ¶
type AttitudeStage byte
const ( AttitudeStageFailed AttitudeStage = 0 AttitudeStageAligning AttitudeStage = 1 AttitudeStageDegraded AttitudeStage = 2 AttitudeStageValid AttitudeStage = 3 AttitudeStageInvalid AttitudeStage = 0xFF )
func (AttitudeStage) String ¶
func (i AttitudeStage) String() string
type AttitudeValidity ¶
type AttitudeValidity uint16
const ( AttitudeValidityTrackAngleHeadingValid AttitudeValidity = 0x0001 AttitudeValidityPitchValid AttitudeValidity = 0x0002 AttitudeValidityRollValid AttitudeValidity = 0x0004 AttitudeValidityLateralBodyAccelValid AttitudeValidity = 0x0008 AttitudeValidityNormalBodyAccelValid AttitudeValidity = 0x0010 AttitudeValidityTurnRateValid AttitudeValidity = 0x0020 AttitudeValidityHwFail AttitudeValidity = 0x0040 AttitudeValidityMagInvalid AttitudeValidity = 0x0080 AttitudeValidityNoGps AttitudeValidity = 0x0100 AttitudeValidityGpsInvalid AttitudeValidity = 0x0200 AttitudeValiditySolutionCoasting AttitudeValidity = 0x0400 AttitudeValidityTrueTrackAngle AttitudeValidity = 0x0800 AttitudeValidityMagneticHeading AttitudeValidity = 0x1000 AttitudeValidityInvalid AttitudeValidity = 0xFFFF )
func (AttitudeValidity) String ¶
func (i AttitudeValidity) String() string
type AutolapTrigger ¶
type AutolapTrigger byte
const ( AutolapTriggerTime AutolapTrigger = 0 AutolapTriggerDistance AutolapTrigger = 1 AutolapTriggerPositionStart AutolapTrigger = 2 AutolapTriggerPositionLap AutolapTrigger = 3 AutolapTriggerPositionWaypoint AutolapTrigger = 4 AutolapTriggerPositionMarked AutolapTrigger = 5 AutolapTriggerOff AutolapTrigger = 6 AutolapTriggerInvalid AutolapTrigger = 0xFF )
func (AutolapTrigger) String ¶
func (i AutolapTrigger) String() string
type AviationAttitudeMsg ¶
type AviationAttitudeMsg struct {
Timestamp time.Time // Timestamp message was output
TimestampMs uint16 // Fractional part of timestamp, added to timestamp
SystemTime []uint32 // System time associated with sample expressed in ms.
Pitch []float64 // Range -PI/2 to +PI/2
Roll []float64 // Range -PI to +PI
AccelLateral []float64 // Range -78.4 to +78.4 (-8 Gs to 8 Gs)
AccelNormal []float64 // Range -78.4 to +78.4 (-8 Gs to 8 Gs)
TurnRate []float64 // Range -8.727 to +8.727 (-500 degs/sec to +500 degs/sec)
Stage []AttitudeStage
AttitudeStageComplete []uint8 // The percent complete of the current attitude stage. Set to 0 for attitude stages 0, 1 and 2 and to 100 for attitude stage 3 by AHRS modules that do not support it. Range - 100
Track []float64 // Track Angle/Heading Range 0 - 2pi
Validity []AttitudeValidity
}
type BatteryStatus ¶
type BatteryStatus uint8
const ( BatteryStatusNew BatteryStatus = 1 BatteryStatusGood BatteryStatus = 2 BatteryStatusOk BatteryStatus = 3 BatteryStatusLow BatteryStatus = 4 BatteryStatusCritical BatteryStatus = 5 BatteryStatusUnknown BatteryStatus = 7 BatteryStatusInvalid BatteryStatus = 0xFF )
func (BatteryStatus) String ¶
func (i BatteryStatus) String() string
type BikeProfileMsg ¶
type BikeProfileMsg struct {
MessageIndex MessageIndex
Name string
Sport Sport
SubSport SubSport
Odometer float64
BikeSpdAntId uint16
BikeCadAntId uint16
BikeSpdcadAntId uint16
BikePowerAntId uint16
CustomWheelsize float64
AutoWheelsize float64
BikeWeight float64
PowerCalFactor float64
AutoWheelCal Bool
AutoPowerZero Bool
Id uint8
SpdEnabled Bool
CadEnabled Bool
SpdcadEnabled Bool
PowerEnabled Bool
CrankLength float64
Enabled Bool
BikeSpdAntIdTransType uint8
BikeCadAntIdTransType uint8
BikeSpdcadAntIdTransType uint8
BikePowerAntIdTransType uint8
OdometerRollover uint8 // Rollover counter that can be used to extend the odometer
FrontGearNum uint8 // Number of front gears
FrontGear []uint8 // Number of teeth on each gear 0 is innermost
RearGearNum uint8 // Number of rear gears
RearGear []uint8 // Number of teeth on each gear 0 is innermost
ShimanoDi2Enabled Bool
}
type BloodPressureFile ¶
type BloodPressureFile struct {
UserProfile *UserProfileMsg
BloodPressures []*BloodPressureMsg
}
type BloodPressureMsg ¶
type BloodPressureMsg struct {
Timestamp time.Time
SystolicPressure uint16
DiastolicPressure uint16
MeanArterialPressure uint16
Map3SampleMean uint16
MapMorningValues uint16
MapEveningValues uint16
HeartRate uint8
HeartRateType HrType
Status BpStatus
UserProfileIndex MessageIndex // Associates this blood pressure message to a user. This corresponds to the index of the user profile message in the blood pressure file.
}
type BodyLocation ¶
type BodyLocation byte
const ( BodyLocationLeftLeg BodyLocation = 0 BodyLocationLeftCalf BodyLocation = 1 BodyLocationLeftShin BodyLocation = 2 BodyLocationLeftHamstring BodyLocation = 3 BodyLocationLeftQuad BodyLocation = 4 BodyLocationLeftGlute BodyLocation = 5 BodyLocationRightLeg BodyLocation = 6 BodyLocationRightCalf BodyLocation = 7 BodyLocationRightShin BodyLocation = 8 BodyLocationRightHamstring BodyLocation = 9 BodyLocationRightQuad BodyLocation = 10 BodyLocationRightGlute BodyLocation = 11 BodyLocationTorsoBack BodyLocation = 12 BodyLocationLeftLowerBack BodyLocation = 13 BodyLocationLeftUpperBack BodyLocation = 14 BodyLocationRightLowerBack BodyLocation = 15 BodyLocationRightUpperBack BodyLocation = 16 BodyLocationTorsoFront BodyLocation = 17 BodyLocationLeftAbdomen BodyLocation = 18 BodyLocationLeftChest BodyLocation = 19 BodyLocationRightAbdomen BodyLocation = 20 BodyLocationRightChest BodyLocation = 21 BodyLocationLeftArm BodyLocation = 22 BodyLocationLeftShoulder BodyLocation = 23 BodyLocationLeftBicep BodyLocation = 24 BodyLocationLeftTricep BodyLocation = 25 BodyLocationLeftBrachioradialis BodyLocation = 26 // Left anterior forearm BodyLocationLeftForearmExtensors BodyLocation = 27 // Left posterior forearm BodyLocationRightArm BodyLocation = 28 BodyLocationRightShoulder BodyLocation = 29 BodyLocationRightBicep BodyLocation = 30 BodyLocationRightTricep BodyLocation = 31 BodyLocationRightBrachioradialis BodyLocation = 32 // Right anterior forearm BodyLocationRightForearmExtensors BodyLocation = 33 // Right posterior forearm BodyLocationNeck BodyLocation = 34 BodyLocationThroat BodyLocation = 35 BodyLocationInvalid BodyLocation = 0xFF )
func (BodyLocation) String ¶
func (i BodyLocation) String() string
type CadenceZoneMsg ¶
type CadenceZoneMsg struct {
MessageIndex MessageIndex
HighValue uint8
Name string
}
type CameraEventMsg ¶
type CameraEventMsg struct {
}
type CameraEventType ¶
type CameraEventType byte
const ( CameraEventTypeVideoStart CameraEventType = 0 // Start of video recording CameraEventTypeVideoSplit CameraEventType = 1 // Mark of video file split (end of one file, beginning of the other) CameraEventTypeVideoEnd CameraEventType = 2 // End of video recording CameraEventTypePhotoTaken CameraEventType = 3 // Still photo taken CameraEventTypeVideoSecondStreamStart CameraEventType = 4 CameraEventTypeVideoSecondStreamSplit CameraEventType = 5 CameraEventTypeVideoSecondStreamEnd CameraEventType = 6 CameraEventTypeVideoSplitStart CameraEventType = 7 // Mark of video file split start CameraEventTypeVideoSecondStreamSplitStart CameraEventType = 8 CameraEventTypeInvalid CameraEventType = 0xFF )
func (CameraEventType) String ¶
func (i CameraEventType) String() string
type CameraOrientationType ¶
type CameraOrientationType byte
const ( CameraOrientationTypeCameraOrientation0 CameraOrientationType = 0 CameraOrientationTypeCameraOrientation90 CameraOrientationType = 1 CameraOrientationTypeCameraOrientation180 CameraOrientationType = 2 CameraOrientationTypeCameraOrientation270 CameraOrientationType = 3 CameraOrientationTypeInvalid CameraOrientationType = 0xFF )
func (CameraOrientationType) String ¶
func (i CameraOrientationType) String() string
type CapabilitiesMsg ¶
type CapabilitiesMsg struct {
Languages []uint8 // Use language_bits_x types where x is index of array.
Sports []SportBits0 // Use sport_bits_x types where x is index of array.
WorkoutsSupported WorkoutCapabilities
ConnectivitySupported ConnectivityCapabilities
}
type Checksum ¶
type Checksum uint8
const ( ChecksumClear Checksum = 0 // Allows clear of checksum for flash memory where can only write 1 to 0 without erasing sector. ChecksumOk Checksum = 1 // Set to mark checksum as valid if computes to invalid values 0 or 0xFF. Checksum can also be set to ok to save encoding computation time. ChecksumInvalid Checksum = 0xFF )
type CommTimeoutType ¶
type CommTimeoutType uint16
const ( CommTimeoutTypeWildcardPairingTimeout CommTimeoutType = 0 // Timeout pairing to any device CommTimeoutTypePairingTimeout CommTimeoutType = 1 // Timeout pairing to previously paired device CommTimeoutTypeConnectionLost CommTimeoutType = 2 // Temporary loss of communications CommTimeoutTypeConnectionTimeout CommTimeoutType = 3 // Connection closed due to extended bad communications CommTimeoutTypeInvalid CommTimeoutType = 0xFFFF )
func (CommTimeoutType) String ¶
func (i CommTimeoutType) String() string
type ConnectivityCapabilities ¶
type ConnectivityCapabilities uint32
const ( ConnectivityCapabilitiesBluetooth ConnectivityCapabilities = 0x00000001 ConnectivityCapabilitiesBluetoothLe ConnectivityCapabilities = 0x00000002 ConnectivityCapabilitiesAnt ConnectivityCapabilities = 0x00000004 ConnectivityCapabilitiesActivityUpload ConnectivityCapabilities = 0x00000008 ConnectivityCapabilitiesCourseDownload ConnectivityCapabilities = 0x00000010 ConnectivityCapabilitiesWorkoutDownload ConnectivityCapabilities = 0x00000020 ConnectivityCapabilitiesLiveTrack ConnectivityCapabilities = 0x00000040 ConnectivityCapabilitiesWeatherConditions ConnectivityCapabilities = 0x00000080 ConnectivityCapabilitiesWeatherAlerts ConnectivityCapabilities = 0x00000100 ConnectivityCapabilitiesGpsEphemerisDownload ConnectivityCapabilities = 0x00000200 ConnectivityCapabilitiesExplicitArchive ConnectivityCapabilities = 0x00000400 ConnectivityCapabilitiesSetupIncomplete ConnectivityCapabilities = 0x00000800 ConnectivityCapabilitiesContinueSyncAfterSoftwareUpdate ConnectivityCapabilities = 0x00001000 ConnectivityCapabilitiesConnectIqAppDownload ConnectivityCapabilities = 0x00002000 ConnectivityCapabilitiesInvalid ConnectivityCapabilities = 0x00000000 )
func (ConnectivityCapabilities) String ¶
func (i ConnectivityCapabilities) String() string
type CourseCapabilities ¶
type CourseCapabilities uint32
const ( CourseCapabilitiesProcessed CourseCapabilities = 0x00000001 CourseCapabilitiesValid CourseCapabilities = 0x00000002 CourseCapabilitiesTime CourseCapabilities = 0x00000004 CourseCapabilitiesDistance CourseCapabilities = 0x00000008 CourseCapabilitiesPosition CourseCapabilities = 0x00000010 CourseCapabilitiesHeartRate CourseCapabilities = 0x00000020 CourseCapabilitiesPower CourseCapabilities = 0x00000040 CourseCapabilitiesCadence CourseCapabilities = 0x00000080 CourseCapabilitiesTraining CourseCapabilities = 0x00000100 CourseCapabilitiesBikeway CourseCapabilities = 0x00000400 CourseCapabilitiesInvalid CourseCapabilities = 0x00000000 )
func (CourseCapabilities) String ¶
func (i CourseCapabilities) String() string
type CourseFile ¶
type CourseFile struct {
Course *CourseMsg
Laps []*LapMsg
CoursePoints []*CoursePointMsg
Records []*RecordMsg
}
type CourseMsg ¶
type CourseMsg struct {
Sport Sport
Name string
Capabilities CourseCapabilities
}
type CoursePoint ¶
type CoursePoint byte
const ( CoursePointGeneric CoursePoint = 0 CoursePointSummit CoursePoint = 1 CoursePointValley CoursePoint = 2 CoursePointWater CoursePoint = 3 CoursePointFood CoursePoint = 4 CoursePointDanger CoursePoint = 5 CoursePointLeft CoursePoint = 6 CoursePointRight CoursePoint = 7 CoursePointStraight CoursePoint = 8 CoursePointFirstAid CoursePoint = 9 CoursePointFourthCategory CoursePoint = 10 CoursePointThirdCategory CoursePoint = 11 CoursePointSecondCategory CoursePoint = 12 CoursePointFirstCategory CoursePoint = 13 CoursePointHorsCategory CoursePoint = 14 CoursePointSprint CoursePoint = 15 CoursePointLeftFork CoursePoint = 16 CoursePointRightFork CoursePoint = 17 CoursePointMiddleFork CoursePoint = 18 CoursePointSlightLeft CoursePoint = 19 CoursePointSharpLeft CoursePoint = 20 CoursePointSlightRight CoursePoint = 21 CoursePointSharpRight CoursePoint = 22 CoursePointUTurn CoursePoint = 23 CoursePointInvalid CoursePoint = 0xFF )
func (CoursePoint) String ¶
func (i CoursePoint) String() string
type CoursePointMsg ¶
type CoursePointMsg struct {
MessageIndex MessageIndex
Timestamp time.Time
PositionLat Latitude
PositionLong Longitude
Distance float64
Type CoursePoint
Name string
Favorite Bool
}
type DeviceFile ¶
type DeviceFile struct {
Softwares []*SoftwareMsg
Capabilities []*CapabilitiesMsg
FileCapabilities []*FileCapabilitiesMsg
MesgCapabilities []*MesgCapabilitiesMsg
FieldCapabilities []*FieldCapabilitiesMsg
}
type DeviceIndex ¶
type DeviceIndex uint8
const ( DeviceIndexCreator DeviceIndex = 0 // Creator of the file is always device index 0. DeviceIndexInvalid DeviceIndex = 0xFF )
func (DeviceIndex) String ¶
func (i DeviceIndex) String() string
type DeviceInfoMsg ¶
type DeviceInfoMsg struct {
Timestamp time.Time
DeviceIndex DeviceIndex
DeviceType uint8
Manufacturer Manufacturer
SerialNumber uint32
Product uint16
SoftwareVersion float64
HardwareVersion uint8
CumOperatingTime uint32 // Reset by new battery or charge.
BatteryVoltage float64
BatteryStatus BatteryStatus
SensorPosition BodyLocation // Indicates the location of the sensor
Descriptor string // Used to describe the sensor or location
AntTransmissionType uint8
AntDeviceNumber uint16
AntNetwork AntNetwork
SourceType SourceType
ProductName string // Optional free form string to indicate the devices name or model
}
func (*DeviceInfoMsg) GetDeviceType ¶
func (x *DeviceInfoMsg) GetDeviceType() interface{}
func (*DeviceInfoMsg) GetProduct ¶
func (x *DeviceInfoMsg) GetProduct() interface{}
type DeviceSettingsMsg ¶
type DisplayHeart ¶
type DisplayHeart byte
const ( DisplayHeartBpm DisplayHeart = 0 DisplayHeartMax DisplayHeart = 1 DisplayHeartReserve DisplayHeart = 2 DisplayHeartInvalid DisplayHeart = 0xFF )
func (DisplayHeart) String ¶
func (i DisplayHeart) String() string
type DisplayMeasure ¶
type DisplayMeasure byte
const ( DisplayMeasureMetric DisplayMeasure = 0 DisplayMeasureStatute DisplayMeasure = 1 DisplayMeasureInvalid DisplayMeasure = 0xFF )
func (DisplayMeasure) String ¶
func (i DisplayMeasure) String() string
type DisplayPosition ¶
type DisplayPosition byte
const ( DisplayPositionDegree DisplayPosition = 0 // dd.dddddd DisplayPositionDegreeMinute DisplayPosition = 1 // dddmm.mmm DisplayPositionDegreeMinuteSecond DisplayPosition = 2 // dddmmss DisplayPositionAustrianGrid DisplayPosition = 3 // Austrian Grid (BMN) DisplayPositionBritishGrid DisplayPosition = 4 // British National Grid DisplayPositionDutchGrid DisplayPosition = 5 // Dutch grid system DisplayPositionHungarianGrid DisplayPosition = 6 // Hungarian grid system DisplayPositionFinnishGrid DisplayPosition = 7 // Finnish grid system Zone3 KKJ27 DisplayPositionGermanGrid DisplayPosition = 8 // Gausss Krueger (German) DisplayPositionIcelandicGrid DisplayPosition = 9 // Icelandic Grid DisplayPositionIndonesianEquatorial DisplayPosition = 10 // Indonesian Equatorial LCO DisplayPositionIndonesianIrian DisplayPosition = 11 // Indonesian Irian LCO DisplayPositionIndonesianSouthern DisplayPosition = 12 // Indonesian Southern LCO DisplayPositionIndiaZone0 DisplayPosition = 13 // India zone 0 DisplayPositionIndiaZoneIA DisplayPosition = 14 // India zone IA DisplayPositionIndiaZoneIB DisplayPosition = 15 // India zone IB DisplayPositionIndiaZoneIIA DisplayPosition = 16 // India zone IIA DisplayPositionIndiaZoneIIB DisplayPosition = 17 // India zone IIB DisplayPositionIndiaZoneIIIA DisplayPosition = 18 // India zone IIIA DisplayPositionIndiaZoneIIIB DisplayPosition = 19 // India zone IIIB DisplayPositionIndiaZoneIVA DisplayPosition = 20 // India zone IVA DisplayPositionIndiaZoneIVB DisplayPosition = 21 // India zone IVB DisplayPositionIrishTransverse DisplayPosition = 22 // Irish Transverse Mercator DisplayPositionIrishGrid DisplayPosition = 23 // Irish Grid DisplayPositionLoran DisplayPosition = 24 // Loran TD DisplayPositionMaidenheadGrid DisplayPosition = 25 // Maidenhead grid system DisplayPositionMgrsGrid DisplayPosition = 26 // MGRS grid system DisplayPositionNewZealandGrid DisplayPosition = 27 // New Zealand grid system DisplayPositionNewZealandTransverse DisplayPosition = 28 // New Zealand Transverse Mercator DisplayPositionQatarGrid DisplayPosition = 29 // Qatar National Grid DisplayPositionModifiedSwedishGrid DisplayPosition = 30 // Modified RT-90 (Sweden) DisplayPositionSwedishGrid DisplayPosition = 31 // RT-90 (Sweden) DisplayPositionSouthAfricanGrid DisplayPosition = 32 // South African Grid DisplayPositionSwissGrid DisplayPosition = 33 // Swiss CH-1903 grid DisplayPositionTaiwanGrid DisplayPosition = 34 // Taiwan Grid DisplayPositionUnitedStatesGrid DisplayPosition = 35 // United States National Grid DisplayPositionUtmUpsGrid DisplayPosition = 36 // UTM/UPS grid system DisplayPositionWestMalayan DisplayPosition = 37 // West Malayan RSO DisplayPositionBorneoRso DisplayPosition = 38 // Borneo RSO DisplayPositionEstonianGrid DisplayPosition = 39 // Estonian grid system DisplayPositionLatvianGrid DisplayPosition = 40 // Latvian Transverse Mercator DisplayPositionSwedishRef99Grid DisplayPosition = 41 // Reference Grid 99 TM (Swedish) DisplayPositionInvalid DisplayPosition = 0xFF )
func (DisplayPosition) String ¶
func (i DisplayPosition) String() string
type DisplayPower ¶
type DisplayPower byte
const ( DisplayPowerWatts DisplayPower = 0 DisplayPowerPercentFtp DisplayPower = 1 DisplayPowerInvalid DisplayPower = 0xFF )
func (DisplayPower) String ¶
func (i DisplayPower) String() string
type Event ¶
type Event byte
const ( EventTimer Event = 0 // Group 0. Start / stop_all EventWorkout Event = 3 // start / stop EventWorkoutStep Event = 4 // Start at beginning of workout. Stop at end of each step. EventPowerDown Event = 5 // stop_all group 0 EventPowerUp Event = 6 // stop_all group 0 EventOffCourse Event = 7 // start / stop group 0 EventSession Event = 8 // Stop at end of each session. EventLap Event = 9 // Stop at end of each lap. EventCoursePoint Event = 10 // marker EventBattery Event = 11 // marker EventVirtualPartnerPace Event = 12 // Group 1. Start at beginning of activity if VP enabled, when VP pace is changed during activity or VP enabled mid activity. stop_disable when VP disabled. EventHrHighAlert Event = 13 // Group 0. Start / stop when in alert condition. EventHrLowAlert Event = 14 // Group 0. Start / stop when in alert condition. EventSpeedHighAlert Event = 15 // Group 0. Start / stop when in alert condition. EventSpeedLowAlert Event = 16 // Group 0. Start / stop when in alert condition. EventCadHighAlert Event = 17 // Group 0. Start / stop when in alert condition. EventCadLowAlert Event = 18 // Group 0. Start / stop when in alert condition. EventPowerHighAlert Event = 19 // Group 0. Start / stop when in alert condition. EventPowerLowAlert Event = 20 // Group 0. Start / stop when in alert condition. EventRecoveryHr Event = 21 // marker EventBatteryLow Event = 22 // marker EventTimeDurationAlert Event = 23 // Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled. EventDistanceDurationAlert Event = 24 // Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled. EventCalorieDurationAlert Event = 25 // Group 1. Start if enabled mid activity (not required at start of activity). Stop when duration is reached. stop_disable if disabled. EventActivity Event = 26 // Group 1.. Stop at end of activity. EventFitnessEquipment Event = 27 // marker EventLength Event = 28 // Stop at end of each length. EventUserMarker Event = 32 // marker EventSportPoint Event = 33 // marker EventCalibration Event = 36 // start/stop/marker EventFrontGearChange Event = 42 // marker EventRearGearChange Event = 43 // marker EventRiderPositionChange Event = 44 // marker EventElevHighAlert Event = 45 // Group 0. Start / stop when in alert condition. EventElevLowAlert Event = 46 // Group 0. Start / stop when in alert condition. EventCommTimeout Event = 47 // marker EventInvalid Event = 0xFF )
type EventMsg ¶
type EventMsg struct {
Timestamp time.Time
Event Event
EventType EventType
Data16 uint16
Data uint32
EventGroup uint8
Score uint16 // Do not populate directly. Autogenerated by decoder for sport_point subfield components
OpponentScore uint16 // Do not populate directly. Autogenerated by decoder for sport_point subfield components
FrontGearNum uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Front gear number. 1 is innermost.
FrontGear uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of front teeth.
RearGearNum uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Rear gear number. 1 is innermost.
RearGear uint8 // Do not populate directly. Autogenerated by decoder for gear_change subfield components. Number of rear teeth.
}
type EventType ¶
type EventType byte
const ( EventTypeStart EventType = 0 EventTypeStop EventType = 1 EventTypeConsecutiveDepreciated EventType = 2 EventTypeMarker EventType = 3 EventTypeStopAll EventType = 4 EventTypeBeginDepreciated EventType = 5 EventTypeEndDepreciated EventType = 6 EventTypeEndAllDepreciated EventType = 7 EventTypeStopDisable EventType = 8 EventTypeStopDisableAll EventType = 9 EventTypeInvalid EventType = 0xFF )
type FieldCapabilitiesMsg ¶
type FieldCapabilitiesMsg struct {
MessageIndex MessageIndex
File File
MesgNum MesgNum
FieldNum uint8
Count uint16
}
type File ¶
type File byte
const ( FileDevice File = 1 // Read only, single file. Must be in root directory. FileSettings File = 2 // Read/write, single file. Directory=Settings FileSport File = 3 // Read/write, multiple files, file number = sport type. Directory=Sports FileActivity File = 4 // Read/erase, multiple files. Directory=Activities FileWorkout File = 5 // Read/write/erase, multiple files. Directory=Workouts FileCourse File = 6 // Read/write/erase, multiple files. Directory=Courses FileSchedules File = 7 // Read/write, single file. Directory=Schedules FileWeight File = 9 // Read only, single file. Circular buffer. All message definitions at start of file. Directory=Weight FileTotals File = 10 // Read only, single file. Directory=Totals FileGoals File = 11 // Read/write, single file. Directory=Goals FileBloodPressure File = 14 // Read only. Directory=Blood Pressure FileMonitoringA File = 15 // Read only. Directory=Monitoring. File number=sub type. FileActivitySummary File = 20 // Read/erase, multiple files. Directory=Activities FileMonitoringDaily File = 28 FileMonitoringB File = 32 // Read only. Directory=Monitoring. File number=identifier FileSegment File = 34 // Read/write/erase. Multiple Files. Directory=Segments FileSegmentList File = 35 // Read/write/erase. Single File. Directory=Segments FileMfgRangeMin File = 0xF7 // 0xF7 - 0xFE reserved for manufacturer specific file types FileMfgRangeMax File = 0xFE // 0xF7 - 0xFE reserved for manufacturer specific file types FileInvalid File = 0xFF )
type FileCapabilitiesMsg ¶
type FileCreatorMsg ¶
type FileIdMsg ¶
type FileIdMsg struct {
Type File
Manufacturer Manufacturer
Product uint16
SerialNumber uint32
TimeCreated time.Time // Only set for files that are can be created/erased.
Number uint16 // Only set for files that are not created/erased.
ProductName string // Optional free form string to indicate the devices name or model
}
func (*FileIdMsg) GetProduct ¶
func (x *FileIdMsg) GetProduct() interface{}
type Fit ¶
type Fit struct {
// Header is the FIT file header.
Header *Header
// CRC is the FIT file CRC.
CRC uint16
// Common messages for all FIT file types.
FileId FileIdMsg
FileCreator FileCreatorMsg
TimestampCorrelation TimestampCorrelationMsg
DeviceInfo DeviceInfoMsg
// UnknownMessages is a map that maps an unknown message number to how
// many times the message was encountered during encoding.
UnknownMessages map[MesgNum]int
// UnknownFields is a map that maps an unknown field to how many times
// the field was encountered during encoding.
UnknownFields map[UnknownField]int
// contains filtered or unexported fields
}
Fit represents a decoded FIT file.
func (*Fit) Activity ¶
func (f *Fit) Activity() (*ActivityFile, error)
Activity returns f's Activity file. An error is returned if the FIT file is not of type activity.
func (*Fit) ActivitySummary ¶
func (f *Fit) ActivitySummary() (*ActivitySummaryFile, error)
ActivitySummary returns f's ActivitySummary file. An error is returned if the FIT file is not of type activity summary.
func (*Fit) BloodPressure ¶
func (f *Fit) BloodPressure() (*BloodPressureFile, error)
BloodPressure returns f's BloodPressure file. An error is returned if the FIT file is not of type blood pressure.
func (*Fit) Course ¶
func (f *Fit) Course() (*CourseFile, error)
Course returns f's Course file. An error is returned if the FIT file is not of type course.
func (*Fit) Device ¶
func (f *Fit) Device() (*DeviceFile, error)
Device returns f's Device file. An error is returned if the FIT file is not of type device.
func (*Fit) Goals ¶
Goals returns f's Goals file. An error is returned if the FIT file is not of type goals.
func (*Fit) MonitoringA ¶
func (f *Fit) MonitoringA() (*MonitoringAFile, error)
MonitoringA returns f's MonitoringA file. An error is returned if the FIT file is not of type monitoring A.
func (*Fit) MonitoringB ¶
func (f *Fit) MonitoringB() (*MonitoringBFile, error)
MonitoringB returns f's MonitoringB file. An error is returned if the FIT file is not of type monitoring B.
func (*Fit) MonitoringDaily ¶
func (f *Fit) MonitoringDaily() (*MonitoringDailyFile, error)
MonitoringDaily returns f's MonitoringDaily file. An error is returned if the FIT file is not of type monitoring daily.
func (*Fit) Schedules ¶
func (f *Fit) Schedules() (*SchedulesFile, error)
Schedules returns f's Schedules file. An error is returned if the FIT file is not of type schedules.
func (*Fit) Segment ¶
func (f *Fit) Segment() (*SegmentFile, error)
Segment returns f's Segment file. An error is returned if the FIT file is not of type segment.
func (*Fit) SegmentList ¶
func (f *Fit) SegmentList() (*SegmentListFile, error)
SegmentList returns f's SegmentList file. An error is returned if the FIT file is not of type segment list.
func (*Fit) Settings ¶
func (f *Fit) Settings() (*SettingsFile, error)
Settings returns f's Settings file. An error is returned if the FIT file is not of type settings.
func (*Fit) Sport ¶
Sport returns f's Sport file. An error is returned if the FIT file is not of type sport.
func (*Fit) Totals ¶
func (f *Fit) Totals() (*TotalsFile, error)
Totals returns f's Totals file. An error is returned if the FIT file is not of type totals.
func (*Fit) Weight ¶
func (f *Fit) Weight() (*WeightFile, error)
Weight returns f's Weight file. An error is returned if the FIT file is not of type weight.
func (*Fit) Workout ¶
func (f *Fit) Workout() (*WorkoutFile, error)
Workout returns f's Workout file. An error is returned if the FIT file is not of type workout.
type FitnessEquipmentState ¶
type FitnessEquipmentState byte
const ( FitnessEquipmentStateReady FitnessEquipmentState = 0 FitnessEquipmentStateInUse FitnessEquipmentState = 1 FitnessEquipmentStatePaused FitnessEquipmentState = 2 FitnessEquipmentStateUnknown FitnessEquipmentState = 3 // lost connection to fitness equipment FitnessEquipmentStateInvalid FitnessEquipmentState = 0xFF )
func (FitnessEquipmentState) String ¶
func (i FitnessEquipmentState) String() string
type FormatError ¶
type FormatError string
A FormatError reports that the input is not valid FIT.
func (FormatError) Error ¶
func (e FormatError) Error() string
type GarminProduct ¶
type GarminProduct uint16
const ( GarminProductHrm1 GarminProduct = 1 GarminProductAxh01 GarminProduct = 2 // AXH01 HRM chipset GarminProductAxb01 GarminProduct = 3 GarminProductAxb02 GarminProduct = 4 GarminProductHrm2ss GarminProduct = 5 GarminProductDsiAlf02 GarminProduct = 6 GarminProductHrm3ss GarminProduct = 7 GarminProductHrmRunSingleByteProductId GarminProduct = 8 // hrm_run model for HRM ANT+ messaging GarminProductBsm GarminProduct = 9 // BSM model for ANT+ messaging GarminProductBcm GarminProduct = 10 // BCM model for ANT+ messaging GarminProductAxs01 GarminProduct = 11 // AXS01 HRM Bike Chipset model for ANT+ messaging GarminProductHrmTriSingleByteProductId GarminProduct = 12 // hrm_tri model for HRM ANT+ messaging GarminProductFr225SingleByteProductId GarminProduct = 14 // fr225 model for HRM ANT+ messaging GarminProductFr301China GarminProduct = 473 GarminProductFr301Japan GarminProduct = 474 GarminProductFr301Korea GarminProduct = 475 GarminProductFr301Taiwan GarminProduct = 494 GarminProductFr405 GarminProduct = 717 // Forerunner 405 GarminProductFr50 GarminProduct = 782 // Forerunner 50 GarminProductFr405Japan GarminProduct = 987 GarminProductFr60 GarminProduct = 988 // Forerunner 60 GarminProductDsiAlf01 GarminProduct = 1011 GarminProductFr310xt GarminProduct = 1018 // Forerunner 310 GarminProductEdge500 GarminProduct = 1036 GarminProductFr110 GarminProduct = 1124 // Forerunner 110 GarminProductEdge800 GarminProduct = 1169 GarminProductEdge500Taiwan GarminProduct = 1199 GarminProductEdge500Japan GarminProduct = 1213 GarminProductChirp GarminProduct = 1253 GarminProductFr110Japan GarminProduct = 1274 GarminProductEdge200 GarminProduct = 1325 GarminProductFr910xt GarminProduct = 1328 GarminProductEdge800Taiwan GarminProduct = 1333 GarminProductEdge800Japan GarminProduct = 1334 GarminProductAlf04 GarminProduct = 1341 GarminProductFr610 GarminProduct = 1345 GarminProductFr210Japan GarminProduct = 1360 GarminProductVectorSs GarminProduct = 1380 GarminProductVectorCp GarminProduct = 1381 GarminProductEdge800China GarminProduct = 1386 GarminProductEdge500China GarminProduct = 1387 GarminProductFr610Japan GarminProduct = 1410 GarminProductEdge500Korea GarminProduct = 1422 GarminProductFr70 GarminProduct = 1436 GarminProductFr310xt4t GarminProduct = 1446 GarminProductAmx GarminProduct = 1461 GarminProductFr10 GarminProduct = 1482 GarminProductEdge800Korea GarminProduct = 1497 GarminProductSwim GarminProduct = 1499 GarminProductFr910xtChina GarminProduct = 1537 GarminProductFenix GarminProduct = 1551 GarminProductEdge200Taiwan GarminProduct = 1555 GarminProductEdge510 GarminProduct = 1561 GarminProductEdge810 GarminProduct = 1567 GarminProductTempe GarminProduct = 1570 GarminProductFr910xtJapan GarminProduct = 1600 GarminProductFr620 GarminProduct = 1623 GarminProductFr220 GarminProduct = 1632 GarminProductFr910xtKorea GarminProduct = 1664 GarminProductFr10Japan GarminProduct = 1688 GarminProductEdge810Japan GarminProduct = 1721 GarminProductVirbElite GarminProduct = 1735 GarminProductEdgeTouring GarminProduct = 1736 // Also Edge Touring Plus GarminProductEdge510Japan GarminProduct = 1742 GarminProductHrmTri GarminProduct = 1743 GarminProductHrmRun GarminProduct = 1752 GarminProductFr920xt GarminProduct = 1765 GarminProductEdge510Asia GarminProduct = 1821 GarminProductEdge810China GarminProduct = 1822 GarminProductEdge810Taiwan GarminProduct = 1823 GarminProductEdge1000 GarminProduct = 1836 GarminProductVivoFit GarminProduct = 1837 GarminProductVirbRemote GarminProduct = 1853 GarminProductVivoKi GarminProduct = 1885 GarminProductFr15 GarminProduct = 1903 GarminProductVivoActive GarminProduct = 1907 GarminProductEdge510Korea GarminProduct = 1918 GarminProductFr620Japan GarminProduct = 1928 GarminProductFr620China GarminProduct = 1929 GarminProductFr220Japan GarminProduct = 1930 GarminProductFr220China GarminProduct = 1931 GarminProductApproachS6 GarminProduct = 1936 GarminProductVivoSmart GarminProduct = 1956 GarminProductFenix2 GarminProduct = 1967 GarminProductEpix GarminProduct = 1988 GarminProductFenix3 GarminProduct = 2050 GarminProductEdge1000Taiwan GarminProduct = 2052 GarminProductEdge1000Japan GarminProduct = 2053 GarminProductFr15Japan GarminProduct = 2061 GarminProductEdge520 GarminProduct = 2067 GarminProductEdge1000China GarminProduct = 2070 GarminProductFr620Russia GarminProduct = 2072 GarminProductFr220Russia GarminProduct = 2073 GarminProductVectorS GarminProduct = 2079 GarminProductEdge1000Korea GarminProduct = 2100 GarminProductFr920xtTaiwan GarminProduct = 2130 GarminProductFr920xtChina GarminProduct = 2131 GarminProductFr920xtJapan GarminProduct = 2132 GarminProductVirbx GarminProduct = 2134 GarminProductVivoSmartApac GarminProduct = 2135 GarminProductEtrexTouch GarminProduct = 2140 GarminProductEdge25 GarminProduct = 2147 GarminProductVivoFit2 GarminProduct = 2150 GarminProductFr225 GarminProduct = 2153 GarminProductVivoActiveApac GarminProduct = 2160 GarminProductVector2 GarminProduct = 2161 GarminProductVector2s GarminProduct = 2162 GarminProductVirbxe GarminProduct = 2172 GarminProductFr620Taiwan GarminProduct = 2173 GarminProductFr220Taiwan GarminProduct = 2174 GarminProductFenix3China GarminProduct = 2188 GarminProductFenix3Twn GarminProduct = 2189 GarminProductVariaHeadlight GarminProduct = 2192 GarminProductVariaTaillightOld GarminProduct = 2193 GarminProductFr225Asia GarminProduct = 2219 GarminProductVariaRadarTaillight GarminProduct = 2225 GarminProductVariaRadarDisplay GarminProduct = 2226 GarminProductEdge20 GarminProduct = 2238 GarminProductD2Bravo GarminProduct = 2262 GarminProductVariaRemote GarminProduct = 2276 GarminProductSdm4 GarminProduct = 10007 // SDM4 footpod GarminProductEdgeRemote GarminProduct = 10014 GarminProductTrainingCenter GarminProduct = 20119 GarminProductAndroidAntplusPlugin GarminProduct = 65532 GarminProductConnect GarminProduct = 65534 // Garmin Connect website GarminProductInvalid GarminProduct = 0xFFFF )
func (GarminProduct) String ¶
func (i GarminProduct) String() string
type GoalRecurrence ¶
type GoalRecurrence byte
const ( GoalRecurrenceOff GoalRecurrence = 0 GoalRecurrenceDaily GoalRecurrence = 1 GoalRecurrenceWeekly GoalRecurrence = 2 GoalRecurrenceMonthly GoalRecurrence = 3 GoalRecurrenceYearly GoalRecurrence = 4 GoalRecurrenceCustom GoalRecurrence = 5 GoalRecurrenceInvalid GoalRecurrence = 0xFF )
func (GoalRecurrence) String ¶
func (i GoalRecurrence) String() string
type GyroscopeDataMsg ¶
type GyroscopeDataMsg struct {
}
type Header ¶
type Header struct {
Size byte
ProtocolVersion byte
ProfileVersion uint16
DataSize uint32
DataType [4]byte
CRC uint16
}
Header represents a FIT file header.
func DecodeHeader ¶
DecodeHeader returns the FIT file header without decoding the entire FIT file.
func (*Header) CheckIntegrity ¶
CheckIntegrity verifies the FIT header CRC.
func (*Header) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
type HrZoneCalc ¶
type HrZoneCalc byte
const ( HrZoneCalcCustom HrZoneCalc = 0 HrZoneCalcPercentMaxHr HrZoneCalc = 1 HrZoneCalcPercentHrr HrZoneCalc = 2 HrZoneCalcInvalid HrZoneCalc = 0xFF )
func (HrZoneCalc) String ¶
func (i HrZoneCalc) String() string
type HrZoneMsg ¶
type HrZoneMsg struct {
MessageIndex MessageIndex
HighBpm uint8
Name string
}
type HrmProfileMsg ¶
type HrmProfileMsg struct {
MessageIndex MessageIndex
Enabled Bool
HrmAntId uint16
LogHrv Bool
HrmAntIdTransType uint8
}
type IntegrityError ¶
type IntegrityError string
An IntegrityError reports that a header or file CRC check failed.
func (IntegrityError) Error ¶
func (e IntegrityError) Error() string
type Language ¶
type Language byte
const ( LanguageEnglish Language = 0 LanguageFrench Language = 1 LanguageItalian Language = 2 LanguageGerman Language = 3 LanguageSpanish Language = 4 LanguageCroatian Language = 5 LanguageCzech Language = 6 LanguageDanish Language = 7 LanguageDutch Language = 8 LanguageFinnish Language = 9 LanguageGreek Language = 10 LanguageHungarian Language = 11 LanguageNorwegian Language = 12 LanguagePolish Language = 13 LanguagePortuguese Language = 14 LanguageSlovakian Language = 15 LanguageSlovenian Language = 16 LanguageSwedish Language = 17 LanguageRussian Language = 18 LanguageTurkish Language = 19 LanguageLatvian Language = 20 LanguageUkrainian Language = 21 LanguageArabic Language = 22 LanguageFarsi Language = 23 LanguageBulgarian Language = 24 LanguageRomanian Language = 25 LanguageCustom Language = 254 LanguageInvalid Language = 0xFF )
type LapMsg ¶
type LapMsg struct {
MessageIndex MessageIndex
Timestamp time.Time // Lap end time.
Event Event
EventType EventType
StartTime time.Time
StartPositionLat Latitude
StartPositionLong Longitude
EndPositionLat Latitude
EndPositionLong Longitude
TotalElapsedTime float64 // Time (includes pauses)
TotalTimerTime float64 // Timer Time (excludes pauses)
TotalDistance float64
TotalCycles uint32
TotalCalories uint16
TotalFatCalories uint16 // If New Leaf
AvgSpeed uint16
MaxSpeed uint16
AvgHeartRate uint8
MaxHeartRate uint8
AvgCadence uint8 // total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
MaxCadence uint8
AvgPower uint16 // total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
MaxPower uint16
TotalAscent uint16
TotalDescent uint16
Intensity Intensity
LapTrigger LapTrigger
Sport Sport
EventGroup uint8
NumLengths uint16 // # of lengths of swim pool
NormalizedPower uint16
LeftRightBalance LeftRightBalance100
FirstLengthIndex uint16
AvgStrokeDistance float64
SwimStroke SwimStroke
SubSport SubSport
NumActiveLengths uint16 // # of active lengths of swim pool
TotalWork uint32
AvgAltitude uint16
MaxAltitude uint16
GpsAccuracy uint8
AvgGrade float64
AvgPosGrade float64
AvgNegGrade float64
MaxPosGrade float64
MaxNegGrade float64
AvgTemperature int8
MaxTemperature int8
TotalMovingTime float64
AvgPosVerticalSpeed float64
AvgNegVerticalSpeed float64
MaxPosVerticalSpeed float64
MaxNegVerticalSpeed float64
TimeInHrZone []float64
TimeInSpeedZone []float64
TimeInCadenceZone []float64
TimeInPowerZone []float64
RepetitionNum uint16
MinAltitude uint16
MinHeartRate uint8
WktStepIndex MessageIndex
OpponentScore uint16
StrokeCount []uint16 // stroke_type enum used as the index
ZoneCount []uint16 // zone number used as the index
AvgVerticalOscillation float64
AvgStanceTimePercent float64
AvgStanceTime float64
AvgFractionalCadence float64 // fractional part of the avg_cadence
MaxFractionalCadence float64 // fractional part of the max_cadence
TotalFractionalCycles float64 // fractional part of the total_cycles
PlayerScore uint16
AvgTotalHemoglobinConc []float64 // Avg saturated and unsaturated hemoglobin
MinTotalHemoglobinConc []float64 // Min saturated and unsaturated hemoglobin
MaxTotalHemoglobinConc []float64 // Max saturated and unsaturated hemoglobin
AvgSaturatedHemoglobinPercent []float64 // Avg percentage of hemoglobin saturated with oxygen
MinSaturatedHemoglobinPercent []float64 // Min percentage of hemoglobin saturated with oxygen
MaxSaturatedHemoglobinPercent []float64 // Max percentage of hemoglobin saturated with oxygen
EnhancedAvgSpeed float64
EnhancedMaxSpeed float64
EnhancedAvgAltitude float64
EnhancedMinAltitude float64
EnhancedMaxAltitude float64
}
func (*LapMsg) GetAvgCadence ¶
func (x *LapMsg) GetAvgCadence() interface{}
func (*LapMsg) GetMaxCadence ¶
func (x *LapMsg) GetMaxCadence() interface{}
func (*LapMsg) GetTotalCycles ¶
func (x *LapMsg) GetTotalCycles() interface{}
type LapTrigger ¶
type LapTrigger byte
const ( LapTriggerManual LapTrigger = 0 LapTriggerTime LapTrigger = 1 LapTriggerDistance LapTrigger = 2 LapTriggerPositionStart LapTrigger = 3 LapTriggerPositionLap LapTrigger = 4 LapTriggerPositionWaypoint LapTrigger = 5 LapTriggerPositionMarked LapTrigger = 6 LapTriggerSessionEnd LapTrigger = 7 LapTriggerFitnessEquipment LapTrigger = 8 LapTriggerInvalid LapTrigger = 0xFF )
func (LapTrigger) String ¶
func (i LapTrigger) String() string
type Latitude ¶
type Latitude float64
Latitude represents the geographical coordinate latitude.
func NewLatitudeSemicircles ¶
NewLatitudeSemicircles returns a new latitude from a semicirle.
type LeftRightBalance ¶
type LeftRightBalance uint8
const ( LeftRightBalanceMask LeftRightBalance = 0x7F // % contribution LeftRightBalanceRight LeftRightBalance = 0x80 // data corresponds to right if set, otherwise unknown LeftRightBalanceInvalid LeftRightBalance = 0xFF )
func (LeftRightBalance) String ¶
func (i LeftRightBalance) String() string
type LeftRightBalance100 ¶
type LeftRightBalance100 uint16
const ( LeftRightBalance100Mask LeftRightBalance100 = 0x3FFF // % contribution scaled by 100 LeftRightBalance100Right LeftRightBalance100 = 0x8000 // data corresponds to right if set, otherwise unknown LeftRightBalance100Invalid LeftRightBalance100 = 0xFFFF )
func (LeftRightBalance100) String ¶
func (i LeftRightBalance100) String() string
type LengthMsg ¶
type LengthMsg struct {
MessageIndex MessageIndex
Timestamp time.Time
Event Event
EventType EventType
StartTime time.Time
TotalElapsedTime float64
TotalTimerTime float64
TotalStrokes uint16
AvgSpeed float64
SwimStroke SwimStroke
AvgSwimmingCadence uint8
EventGroup uint8
TotalCalories uint16
LengthType LengthType
PlayerScore uint16
OpponentScore uint16
StrokeCount []uint16 // stroke_type enum used as the index
ZoneCount []uint16 // zone number used as the index
}
type LengthType ¶
type LengthType byte
const ( LengthTypeIdle LengthType = 0 // Rest period. Length with no strokes LengthTypeActive LengthType = 1 // Length with strokes. LengthTypeInvalid LengthType = 0xFF )
func (LengthType) String ¶
func (i LengthType) String() string
type Longitude ¶
type Longitude float64
Longitude represents the geographical coordinate longitude.
func NewLongitudeSemicircles ¶
NewLongitudeSemicircles returns a new longitude from a semicirle.
type Manufacturer ¶
type Manufacturer uint16
const ( ManufacturerGarmin Manufacturer = 1 ManufacturerGarminFr405Antfs Manufacturer = 2 // Do not use. Used by FR405 for ANTFS man id. ManufacturerZephyr Manufacturer = 3 ManufacturerDayton Manufacturer = 4 ManufacturerIdt Manufacturer = 5 ManufacturerSrm Manufacturer = 6 ManufacturerQuarq Manufacturer = 7 ManufacturerIbike Manufacturer = 8 ManufacturerSaris Manufacturer = 9 ManufacturerSparkHk Manufacturer = 10 ManufacturerTanita Manufacturer = 11 ManufacturerEchowell Manufacturer = 12 ManufacturerDynastreamOem Manufacturer = 13 ManufacturerNautilus Manufacturer = 14 ManufacturerDynastream Manufacturer = 15 ManufacturerTimex Manufacturer = 16 ManufacturerMetrigear Manufacturer = 17 ManufacturerXelic Manufacturer = 18 ManufacturerBeurer Manufacturer = 19 ManufacturerCardiosport Manufacturer = 20 ManufacturerAAndD Manufacturer = 21 ManufacturerHmm Manufacturer = 22 ManufacturerSuunto Manufacturer = 23 ManufacturerThitaElektronik Manufacturer = 24 ManufacturerGpulse Manufacturer = 25 ManufacturerCleanMobile Manufacturer = 26 ManufacturerPedalBrain Manufacturer = 27 ManufacturerPeaksware Manufacturer = 28 ManufacturerSaxonar Manufacturer = 29 ManufacturerLemondFitness Manufacturer = 30 ManufacturerDexcom Manufacturer = 31 ManufacturerWahooFitness Manufacturer = 32 ManufacturerOctaneFitness Manufacturer = 33 ManufacturerArchinoetics Manufacturer = 34 ManufacturerTheHurtBox Manufacturer = 35 ManufacturerCitizenSystems Manufacturer = 36 ManufacturerMagellan Manufacturer = 37 ManufacturerOsynce Manufacturer = 38 ManufacturerHolux Manufacturer = 39 ManufacturerConcept2 Manufacturer = 40 ManufacturerOneGiantLeap Manufacturer = 42 ManufacturerAceSensor Manufacturer = 43 ManufacturerBrimBrothers Manufacturer = 44 ManufacturerXplova Manufacturer = 45 ManufacturerPerceptionDigital Manufacturer = 46 ManufacturerBf1systems Manufacturer = 47 ManufacturerPioneer Manufacturer = 48 ManufacturerSpantec Manufacturer = 49 ManufacturerMetalogics Manufacturer = 50 Manufacturer4iiiis Manufacturer = 51 ManufacturerSeikoEpson Manufacturer = 52 ManufacturerSeikoEpsonOem Manufacturer = 53 ManufacturerIforPowell Manufacturer = 54 ManufacturerMaxwellGuider Manufacturer = 55 ManufacturerStarTrac Manufacturer = 56 ManufacturerBreakaway Manufacturer = 57 ManufacturerAlatechTechnologyLtd Manufacturer = 58 ManufacturerMioTechnologyEurope Manufacturer = 59 ManufacturerRotor Manufacturer = 60 ManufacturerGeonaute Manufacturer = 61 ManufacturerIdBike Manufacturer = 62 ManufacturerSpecialized Manufacturer = 63 ManufacturerWtek Manufacturer = 64 ManufacturerPhysicalEnterprises Manufacturer = 65 ManufacturerNorthPoleEngineering Manufacturer = 66 ManufacturerBkool Manufacturer = 67 ManufacturerCateye Manufacturer = 68 ManufacturerStagesCycling Manufacturer = 69 ManufacturerSigmasport Manufacturer = 70 ManufacturerTomtom Manufacturer = 71 ManufacturerPeripedal Manufacturer = 72 ManufacturerWattbike Manufacturer = 73 ManufacturerMoxy Manufacturer = 76 ManufacturerCiclosport Manufacturer = 77 ManufacturerPowerbahn Manufacturer = 78 ManufacturerAcornProjectsAps Manufacturer = 79 ManufacturerLifebeam Manufacturer = 80 ManufacturerBontrager Manufacturer = 81 ManufacturerWellgo Manufacturer = 82 ManufacturerScosche Manufacturer = 83 ManufacturerMagura Manufacturer = 84 ManufacturerWoodway Manufacturer = 85 ManufacturerElite Manufacturer = 86 ManufacturerNielsenKellerman Manufacturer = 87 ManufacturerDkCity Manufacturer = 88 ManufacturerTacx Manufacturer = 89 ManufacturerDirectionTechnology Manufacturer = 90 ManufacturerMagtonic Manufacturer = 91 Manufacturer1partcarbon Manufacturer = 92 ManufacturerInsideRideTechnologies Manufacturer = 93 ManufacturerSoundOfMotion Manufacturer = 94 ManufacturerStryd Manufacturer = 95 ManufacturerDevelopment Manufacturer = 255 ManufacturerHealthandlife Manufacturer = 257 ManufacturerLezyne Manufacturer = 258 ManufacturerScribeLabs Manufacturer = 259 ManufacturerZwift Manufacturer = 260 ManufacturerWatteam Manufacturer = 261 ManufacturerRecon Manufacturer = 262 ManufacturerFaveroElectronics Manufacturer = 263 ManufacturerDynovelo Manufacturer = 264 ManufacturerStrava Manufacturer = 265 ManufacturerActigraphcorp Manufacturer = 5759 ManufacturerInvalid Manufacturer = 0xFFFF )
func (Manufacturer) String ¶
func (i Manufacturer) String() string
type MemoGlobMsg ¶
type MemoGlobMsg struct {
}
type MesgCapabilitiesMsg ¶
type MesgCapabilitiesMsg struct {
MessageIndex MessageIndex
File File
MesgNum MesgNum
CountType MesgCount
Count uint16
}
func (*MesgCapabilitiesMsg) GetCount ¶
func (x *MesgCapabilitiesMsg) GetCount() interface{}
type MesgNum ¶
type MesgNum uint16
const ( MesgNumFileId MesgNum = 0 MesgNumCapabilities MesgNum = 1 MesgNumDeviceSettings MesgNum = 2 MesgNumUserProfile MesgNum = 3 MesgNumHrmProfile MesgNum = 4 MesgNumSdmProfile MesgNum = 5 MesgNumBikeProfile MesgNum = 6 MesgNumZonesTarget MesgNum = 7 MesgNumHrZone MesgNum = 8 MesgNumPowerZone MesgNum = 9 MesgNumMetZone MesgNum = 10 MesgNumSport MesgNum = 12 MesgNumGoal MesgNum = 15 MesgNumSession MesgNum = 18 MesgNumLap MesgNum = 19 MesgNumRecord MesgNum = 20 MesgNumEvent MesgNum = 21 MesgNumDeviceInfo MesgNum = 23 MesgNumWorkout MesgNum = 26 MesgNumWorkoutStep MesgNum = 27 MesgNumSchedule MesgNum = 28 MesgNumWeightScale MesgNum = 30 MesgNumCourse MesgNum = 31 MesgNumCoursePoint MesgNum = 32 MesgNumTotals MesgNum = 33 MesgNumActivity MesgNum = 34 MesgNumSoftware MesgNum = 35 MesgNumFileCapabilities MesgNum = 37 MesgNumMesgCapabilities MesgNum = 38 MesgNumFieldCapabilities MesgNum = 39 MesgNumFileCreator MesgNum = 49 MesgNumBloodPressure MesgNum = 51 MesgNumSpeedZone MesgNum = 53 MesgNumMonitoring MesgNum = 55 MesgNumTrainingFile MesgNum = 72 MesgNumHrv MesgNum = 78 MesgNumLength MesgNum = 101 MesgNumMonitoringInfo MesgNum = 103 MesgNumPad MesgNum = 105 MesgNumSlaveDevice MesgNum = 106 MesgNumCadenceZone MesgNum = 131 MesgNumSegmentLap MesgNum = 142 MesgNumMemoGlob MesgNum = 145 MesgNumSegmentId MesgNum = 148 MesgNumSegmentLeaderboardEntry MesgNum = 149 MesgNumSegmentPoint MesgNum = 150 MesgNumSegmentFile MesgNum = 151 MesgNumGpsMetadata MesgNum = 160 MesgNumCameraEvent MesgNum = 161 MesgNumTimestampCorrelation MesgNum = 162 MesgNumGyroscopeData MesgNum = 164 MesgNumAccelerometerData MesgNum = 165 MesgNumThreeDSensorCalibration MesgNum = 167 MesgNumVideoFrame MesgNum = 169 MesgNumObdiiData MesgNum = 174 MesgNumNmeaSentence MesgNum = 177 MesgNumAviationAttitude MesgNum = 178 MesgNumVideo MesgNum = 184 MesgNumVideoTitle MesgNum = 185 MesgNumVideoDescription MesgNum = 186 MesgNumVideoClip MesgNum = 187 MesgNumMfgRangeMin MesgNum = 0xFF00 // 0xFF00 - 0xFFFE reserved for manufacturer specific messages MesgNumMfgRangeMax MesgNum = 0xFFFE // 0xFF00 - 0xFFFE reserved for manufacturer specific messages MesgNumInvalid MesgNum = 0xFFFF )
type MessageIndex ¶
type MessageIndex uint16
const ( MessageIndexSelected MessageIndex = 0x8000 // message is selected if set MessageIndexReserved MessageIndex = 0x7000 // reserved (default 0) MessageIndexMask MessageIndex = 0x0FFF // index MessageIndexInvalid MessageIndex = 0xFFFF )
func (MessageIndex) String ¶
func (i MessageIndex) String() string
type MetZoneMsg ¶
type MetZoneMsg struct {
MessageIndex MessageIndex
HighBpm uint8
Calories float64
FatCalories float64
}
type MonitoringAFile ¶
type MonitoringAFile struct {
MonitoringInfo *MonitoringInfoMsg
Monitorings []*MonitoringMsg
}
type MonitoringBFile ¶
type MonitoringBFile struct {
MonitoringInfo *MonitoringInfoMsg
Monitorings []*MonitoringMsg
}
type MonitoringDailyFile ¶
type MonitoringDailyFile struct {
MonitoringInfo *MonitoringInfoMsg
Monitorings []*MonitoringMsg
}
type MonitoringInfoMsg ¶
type MonitoringMsg ¶
type MonitoringMsg struct {
Timestamp time.Time // Must align to logging interval, for example, time must be 00:00:00 for daily log.
DeviceIndex DeviceIndex // Associates this data to device_info message. Not required for file with single device (sensor).
Calories uint16 // Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation
Distance float64 // Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation.
Cycles float64 // Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation.
ActiveTime float64
ActivityType ActivityType
ActivitySubtype ActivitySubtype
Distance16 uint16
Cycles16 uint16
ActiveTime16 uint16
LocalTimestamp time.Time // Must align to logging interval, for example, time must be 00:00:00 for daily log.
}
func (*MonitoringMsg) GetCycles ¶
func (x *MonitoringMsg) GetCycles() interface{}
type NmeaSentenceMsg ¶
type NotSupportedError ¶
type NotSupportedError string
A NotSupportedError reports that the input uses a valid but unimplemented FIT feature.
func (NotSupportedError) Error ¶
func (e NotSupportedError) Error() string
type ObdiiDataMsg ¶
type ObdiiDataMsg struct {
}
type PowerPhaseType ¶
type PowerPhaseType byte
const ( PowerPhaseTypePowerPhaseStartAngle PowerPhaseType = 0 PowerPhaseTypePowerPhaseEndAngle PowerPhaseType = 1 PowerPhaseTypePowerPhaseArcLength PowerPhaseType = 2 PowerPhaseTypePowerPhaseCenter PowerPhaseType = 3 PowerPhaseTypeInvalid PowerPhaseType = 0xFF )
func (PowerPhaseType) String ¶
func (i PowerPhaseType) String() string
type PowerZoneMsg ¶
type PowerZoneMsg struct {
MessageIndex MessageIndex
HighValue uint16
Name string
}
type PwrZoneCalc ¶
type PwrZoneCalc byte
const ( PwrZoneCalcCustom PwrZoneCalc = 0 PwrZoneCalcPercentFtp PwrZoneCalc = 1 PwrZoneCalcInvalid PwrZoneCalc = 0xFF )
func (PwrZoneCalc) String ¶
func (i PwrZoneCalc) String() string
type RecordMsg ¶
type RecordMsg struct {
Timestamp time.Time
PositionLat Latitude
PositionLong Longitude
Altitude uint16
HeartRate uint8
Cadence uint8
Distance float64
Speed uint16
Power uint16
CompressedSpeedDistance []byte
Grade float64
Resistance uint8 // Relative. 0 is none 254 is Max.
TimeFromCourse float64
CycleLength float64
Temperature int8
Speed1s []float64 // Speed at 1s intervals. Timestamp field indicates time of last array element.
Cycles uint8
TotalCycles uint32
CompressedAccumulatedPower uint16
AccumulatedPower uint32
LeftRightBalance LeftRightBalance
GpsAccuracy uint8
VerticalSpeed float64
Calories uint16
VerticalOscillation float64
StanceTimePercent float64
StanceTime float64
ActivityType ActivityType
LeftTorqueEffectiveness float64
RightTorqueEffectiveness float64
LeftPedalSmoothness float64
RightPedalSmoothness float64
CombinedPedalSmoothness float64
Time128 float64
StrokeType StrokeType
Zone uint8
BallSpeed float64
Cadence256 float64 // Log cadence and fractional cadence for backwards compatability
FractionalCadence float64
TotalHemoglobinConc float64 // Total saturated and unsaturated hemoglobin
TotalHemoglobinConcMin float64 // Min saturated and unsaturated hemoglobin
TotalHemoglobinConcMax float64 // Max saturated and unsaturated hemoglobin
SaturatedHemoglobinPercent float64 // Percentage of hemoglobin saturated with oxygen
SaturatedHemoglobinPercentMin float64 // Min percentage of hemoglobin saturated with oxygen
SaturatedHemoglobinPercentMax float64 // Max percentage of hemoglobin saturated with oxygen
DeviceIndex DeviceIndex
EnhancedSpeed float64
EnhancedAltitude float64
}
type RiderPositionType ¶
type RiderPositionType byte
const ( RiderPositionTypeSeated RiderPositionType = 0 RiderPositionTypeStanding RiderPositionType = 1 RiderPositionTypeInvalid RiderPositionType = 0xFF )
func (RiderPositionType) String ¶
func (i RiderPositionType) String() string
type ScheduleMsg ¶
type ScheduleMsg struct {
Manufacturer Manufacturer // Corresponds to file_id of scheduled workout / course.
Product uint16 // Corresponds to file_id of scheduled workout / course.
SerialNumber uint32 // Corresponds to file_id of scheduled workout / course.
TimeCreated time.Time // Corresponds to file_id of scheduled workout / course.
Completed Bool // TRUE if this activity has been started
Type Schedule
ScheduledTime time.Time
}
func (*ScheduleMsg) GetProduct ¶
func (x *ScheduleMsg) GetProduct() interface{}
type SchedulesFile ¶
type SchedulesFile struct {
Schedules []*ScheduleMsg
}
type SdmProfileMsg ¶
type SegmentDeleteStatus ¶
type SegmentDeleteStatus byte
const ( SegmentDeleteStatusDoNotDelete SegmentDeleteStatus = 0 SegmentDeleteStatusDeleteOne SegmentDeleteStatus = 1 SegmentDeleteStatusDeleteAll SegmentDeleteStatus = 2 SegmentDeleteStatusInvalid SegmentDeleteStatus = 0xFF )
func (SegmentDeleteStatus) String ¶
func (i SegmentDeleteStatus) String() string
type SegmentFile ¶
type SegmentFile struct {
SegmentId *SegmentIdMsg
SegmentLeaderboardEntry *SegmentLeaderboardEntryMsg
SegmentLap *SegmentLapMsg
SegmentPoints []*SegmentPointMsg
}
type SegmentFileMsg ¶
type SegmentFileMsg struct {
MessageIndex MessageIndex
FileUuid string // UUID of the segment file
Enabled Bool // Enabled state of the segment file
UserProfilePrimaryKey uint32 // Primary key of the user that created the segment file
LeaderType []SegmentLeaderboardType // Leader type of each leader in the segment file
LeaderGroupPrimaryKey []uint32 // Group primary key of each leader in the segment file
LeaderActivityId []uint32 // Activity ID of each leader in the segment file
}
type SegmentIdMsg ¶
type SegmentIdMsg struct {
Name string // Friendly name assigned to segment
Uuid string // UUID of the segment
Sport Sport // Sport associated with the segment
Enabled Bool // Segment enabled for evaluation
UserProfilePrimaryKey uint32 // Primary key of the user that created the segment
DeviceId uint32 // ID of the device that created the segment
DefaultRaceLeader uint8 // Index for the Leader Board entry selected as the default race participant
DeleteStatus SegmentDeleteStatus // Indicates if any segments should be deleted
SelectionType SegmentSelectionType // Indicates how the segment was selected to be sent to the device
}
type SegmentLapMsg ¶
type SegmentLapMsg struct {
MessageIndex MessageIndex
Timestamp time.Time // Lap end time.
Event Event
EventType EventType
StartTime time.Time
StartPositionLat Latitude
StartPositionLong Longitude
EndPositionLat Latitude
EndPositionLong Longitude
TotalElapsedTime float64 // Time (includes pauses)
TotalTimerTime float64 // Timer Time (excludes pauses)
TotalDistance float64
TotalCycles uint32
TotalCalories uint16
TotalFatCalories uint16 // If New Leaf
AvgSpeed float64
MaxSpeed float64
AvgHeartRate uint8
MaxHeartRate uint8
AvgCadence uint8 // total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
MaxCadence uint8
AvgPower uint16 // total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
MaxPower uint16
TotalAscent uint16
TotalDescent uint16
Sport Sport
EventGroup uint8
NecLat Latitude // North east corner latitude.
NecLong Longitude // North east corner longitude.
SwcLat Latitude // South west corner latitude.
SwcLong Longitude // South west corner latitude.
Name string
NormalizedPower uint16
LeftRightBalance LeftRightBalance100
SubSport SubSport
TotalWork uint32
AvgAltitude float64
MaxAltitude float64
GpsAccuracy uint8
AvgGrade float64
AvgPosGrade float64
AvgNegGrade float64
MaxPosGrade float64
MaxNegGrade float64
AvgTemperature int8
MaxTemperature int8
TotalMovingTime float64
AvgPosVerticalSpeed float64
AvgNegVerticalSpeed float64
MaxPosVerticalSpeed float64
MaxNegVerticalSpeed float64
TimeInHrZone []float64
TimeInSpeedZone []float64
TimeInCadenceZone []float64
TimeInPowerZone []float64
RepetitionNum uint16
MinAltitude float64
MinHeartRate uint8
ActiveTime float64
WktStepIndex MessageIndex
SportEvent SportEvent
AvgLeftTorqueEffectiveness float64
AvgRightTorqueEffectiveness float64
AvgLeftPedalSmoothness float64
AvgRightPedalSmoothness float64
AvgCombinedPedalSmoothness float64
Status SegmentLapStatus
Uuid string
AvgFractionalCadence float64 // fractional part of the avg_cadence
MaxFractionalCadence float64 // fractional part of the max_cadence
TotalFractionalCycles float64 // fractional part of the total_cycles
FrontGearShiftCount uint16
RearGearShiftCount uint16
}
func (*SegmentLapMsg) GetTotalCycles ¶
func (x *SegmentLapMsg) GetTotalCycles() interface{}
type SegmentLapStatus ¶
type SegmentLapStatus byte
const ( SegmentLapStatusEnd SegmentLapStatus = 0 SegmentLapStatusFail SegmentLapStatus = 1 SegmentLapStatusInvalid SegmentLapStatus = 0xFF )
func (SegmentLapStatus) String ¶
func (i SegmentLapStatus) String() string
type SegmentLeaderboardEntryMsg ¶
type SegmentLeaderboardEntryMsg struct {
MessageIndex MessageIndex
Name string // Friendly name assigned to leader
Type SegmentLeaderboardType // Leader classification
GroupPrimaryKey uint32 // Primary user ID of this leader
ActivityId uint32 // ID of the activity associated with this leader time
SegmentTime float64 // Segment Time (includes pauses)
}
type SegmentLeaderboardType ¶
type SegmentLeaderboardType byte
const ( SegmentLeaderboardTypeOverall SegmentLeaderboardType = 0 SegmentLeaderboardTypePersonalBest SegmentLeaderboardType = 1 SegmentLeaderboardTypeConnections SegmentLeaderboardType = 2 SegmentLeaderboardTypeGroup SegmentLeaderboardType = 3 SegmentLeaderboardTypeChallenger SegmentLeaderboardType = 4 SegmentLeaderboardTypeKom SegmentLeaderboardType = 5 SegmentLeaderboardTypeQom SegmentLeaderboardType = 6 SegmentLeaderboardTypePr SegmentLeaderboardType = 7 SegmentLeaderboardTypeGoal SegmentLeaderboardType = 8 SegmentLeaderboardTypeRival SegmentLeaderboardType = 9 SegmentLeaderboardTypeClubLeader SegmentLeaderboardType = 10 SegmentLeaderboardTypeInvalid SegmentLeaderboardType = 0xFF )
func (SegmentLeaderboardType) String ¶
func (i SegmentLeaderboardType) String() string
type SegmentListFile ¶
type SegmentListFile struct {
SegmentFiles []*SegmentFileMsg
}
type SegmentPointMsg ¶
type SegmentPointMsg struct {
MessageIndex MessageIndex
PositionLat Latitude
PositionLong Longitude
Distance float64 // Accumulated distance along the segment at the described point
Altitude float64 // Accumulated altitude along the segment at the described point
LeaderTime []float64 // Accumualted time each leader board member required to reach the described point. This value is zero for all leader board members at the starting point of the segment.
}
type SegmentSelectionType ¶
type SegmentSelectionType byte
const ( SegmentSelectionTypeStarred SegmentSelectionType = 0 SegmentSelectionTypeSuggested SegmentSelectionType = 1 SegmentSelectionTypeInvalid SegmentSelectionType = 0xFF )
func (SegmentSelectionType) String ¶
func (i SegmentSelectionType) String() string
type SensorType ¶
type SensorType byte
const ( SensorTypeAccelerometer SensorType = 0 SensorTypeGyroscope SensorType = 1 SensorTypeCompass SensorType = 2 SensorTypeInvalid SensorType = 0xFF )
func (SensorType) String ¶
func (i SensorType) String() string
type SessionMsg ¶
type SessionMsg struct {
MessageIndex MessageIndex // Selected bit is set for the current session.
Timestamp time.Time // Sesson end time.
Event Event // session
EventType EventType // stop
StartTime time.Time
StartPositionLat Latitude
StartPositionLong Longitude
Sport Sport
SubSport SubSport
TotalElapsedTime float64 // Time (includes pauses)
TotalTimerTime float64 // Timer Time (excludes pauses)
TotalDistance float64
TotalCycles uint32
TotalCalories uint16
TotalFatCalories uint16
AvgSpeed uint16 // total_distance / total_timer_time
MaxSpeed uint16
AvgHeartRate uint8 // average heart rate (excludes pause time)
MaxHeartRate uint8
AvgCadence uint8 // total_cycles / total_timer_time if non_zero_avg_cadence otherwise total_cycles / total_elapsed_time
MaxCadence uint8
AvgPower uint16 // total_power / total_timer_time if non_zero_avg_power otherwise total_power / total_elapsed_time
MaxPower uint16
TotalAscent uint16
TotalDescent uint16
TotalTrainingEffect float64
FirstLapIndex uint16
NumLaps uint16
EventGroup uint8
Trigger SessionTrigger
NecLat Latitude
NecLong Longitude
SwcLat Latitude
SwcLong Longitude
NormalizedPower uint16
TrainingStressScore float64
IntensityFactor float64
LeftRightBalance LeftRightBalance100
AvgStrokeCount float64
AvgStrokeDistance float64
SwimStroke SwimStroke
PoolLength float64
ThresholdPower uint16
PoolLengthUnit DisplayMeasure
NumActiveLengths uint16 // # of active lengths of swim pool
TotalWork uint32
AvgAltitude uint16
MaxAltitude uint16
GpsAccuracy uint8
AvgGrade float64
AvgPosGrade float64
AvgNegGrade float64
MaxPosGrade float64
MaxNegGrade float64
AvgTemperature int8
MaxTemperature int8
TotalMovingTime float64
AvgPosVerticalSpeed float64
AvgNegVerticalSpeed float64
MaxPosVerticalSpeed float64
MaxNegVerticalSpeed float64
MinHeartRate uint8
TimeInHrZone []float64
TimeInSpeedZone []float64
TimeInCadenceZone []float64
TimeInPowerZone []float64
AvgLapTime float64
BestLapIndex uint16
MinAltitude uint16
PlayerScore uint16
OpponentScore uint16
OpponentName string
StrokeCount []uint16 // stroke_type enum used as the index
ZoneCount []uint16 // zone number used as the index
MaxBallSpeed float64
AvgBallSpeed float64
AvgVerticalOscillation float64
AvgStanceTimePercent float64
AvgStanceTime float64
AvgFractionalCadence float64 // fractional part of the avg_cadence
MaxFractionalCadence float64 // fractional part of the max_cadence
TotalFractionalCycles float64 // fractional part of the total_cycles
SportIndex uint8
EnhancedAvgSpeed float64 // total_distance / total_timer_time
EnhancedMaxSpeed float64
EnhancedAvgAltitude float64
EnhancedMinAltitude float64
EnhancedMaxAltitude float64
}
func (*SessionMsg) GetAvgCadence ¶
func (x *SessionMsg) GetAvgCadence() interface{}
func (*SessionMsg) GetMaxCadence ¶
func (x *SessionMsg) GetMaxCadence() interface{}
func (*SessionMsg) GetTotalCycles ¶
func (x *SessionMsg) GetTotalCycles() interface{}
type SessionTrigger ¶
type SessionTrigger byte
const ( SessionTriggerActivityEnd SessionTrigger = 0 SessionTriggerManual SessionTrigger = 1 // User changed sport. SessionTriggerAutoMultiSport SessionTrigger = 2 // Auto multi-sport feature is enabled and user pressed lap button to advance session. SessionTriggerFitnessEquipment SessionTrigger = 3 // Auto sport change caused by user linking to fitness equipment. SessionTriggerInvalid SessionTrigger = 0xFF )
func (SessionTrigger) String ¶
func (i SessionTrigger) String() string
type SettingsFile ¶
type SettingsFile struct {
UserProfiles []*UserProfileMsg
HrmProfiles []*HrmProfileMsg
SdmProfiles []*SdmProfileMsg
BikeProfiles []*BikeProfileMsg
DeviceSettings []*DeviceSettingsMsg
}
type SlaveDeviceMsg ¶
type SlaveDeviceMsg struct {
Manufacturer Manufacturer
Product uint16
}
func (*SlaveDeviceMsg) GetProduct ¶
func (x *SlaveDeviceMsg) GetProduct() interface{}
type SoftwareMsg ¶
type SoftwareMsg struct {
MessageIndex MessageIndex
Version float64
PartNumber string
}
type SourceType ¶
type SourceType byte
const ( SourceTypeAnt SourceType = 0 // External device connected with ANT SourceTypeAntplus SourceType = 1 // External device connected with ANT+ SourceTypeBluetooth SourceType = 2 // External device connected with BT SourceTypeBluetoothLowEnergy SourceType = 3 // External device connected with BLE SourceTypeWifi SourceType = 4 // External device connected with Wifi SourceTypeLocal SourceType = 5 // Onboard device SourceTypeInvalid SourceType = 0xFF )
func (SourceType) String ¶
func (i SourceType) String() string
type SpeedZoneMsg ¶
type SpeedZoneMsg struct {
MessageIndex MessageIndex
HighValue float64
Name string
}
type Sport ¶
type Sport byte
const ( SportGeneric Sport = 0 SportRunning Sport = 1 SportCycling Sport = 2 SportTransition Sport = 3 // Mulitsport transition SportFitnessEquipment Sport = 4 SportSwimming Sport = 5 SportBasketball Sport = 6 SportSoccer Sport = 7 SportTennis Sport = 8 SportAmericanFootball Sport = 9 SportTraining Sport = 10 SportWalking Sport = 11 SportCrossCountrySkiing Sport = 12 SportAlpineSkiing Sport = 13 SportSnowboarding Sport = 14 SportRowing Sport = 15 SportMountaineering Sport = 16 SportHiking Sport = 17 SportMultisport Sport = 18 SportPaddling Sport = 19 SportFlying Sport = 20 SportEBiking Sport = 21 SportMotorcycling Sport = 22 SportBoating Sport = 23 SportDriving Sport = 24 SportGolf Sport = 25 SportHangGliding Sport = 26 SportHorsebackRiding Sport = 27 SportHunting Sport = 28 SportFishing Sport = 29 SportInlineSkating Sport = 30 SportRockClimbing Sport = 31 SportSailing Sport = 32 SportIceSkating Sport = 33 SportSkyDiving Sport = 34 SportSnowshoeing Sport = 35 SportSnowmobiling Sport = 36 SportStandUpPaddleboarding Sport = 37 SportSurfing Sport = 38 SportWakeboarding Sport = 39 SportWaterSkiing Sport = 40 SportKayaking Sport = 41 SportRafting Sport = 42 SportWindsurfing Sport = 43 SportKitesurfing Sport = 44 SportAll Sport = 254 // All is for goals only to include all sports. SportInvalid Sport = 0xFF )
type SportBits0 ¶
type SportBits0 uint8
const ( SportBits0Generic SportBits0 = 0x01 SportBits0Running SportBits0 = 0x02 SportBits0Cycling SportBits0 = 0x04 SportBits0Transition SportBits0 = 0x08 // Mulitsport transition SportBits0FitnessEquipment SportBits0 = 0x10 SportBits0Swimming SportBits0 = 0x20 SportBits0Basketball SportBits0 = 0x40 SportBits0Soccer SportBits0 = 0x80 SportBits0Invalid SportBits0 = 0x00 )
func (SportBits0) String ¶
func (i SportBits0) String() string
type SportBits1 ¶
type SportBits1 uint8
const ( SportBits1Tennis SportBits1 = 0x01 SportBits1AmericanFootball SportBits1 = 0x02 SportBits1Training SportBits1 = 0x04 SportBits1Walking SportBits1 = 0x08 SportBits1CrossCountrySkiing SportBits1 = 0x10 SportBits1AlpineSkiing SportBits1 = 0x20 SportBits1Snowboarding SportBits1 = 0x40 SportBits1Rowing SportBits1 = 0x80 SportBits1Invalid SportBits1 = 0x00 )
func (SportBits1) String ¶
func (i SportBits1) String() string
type SportBits2 ¶
type SportBits2 uint8
const ( SportBits2Mountaineering SportBits2 = 0x01 SportBits2Hiking SportBits2 = 0x02 SportBits2Multisport SportBits2 = 0x04 SportBits2Paddling SportBits2 = 0x08 SportBits2Flying SportBits2 = 0x10 SportBits2EBiking SportBits2 = 0x20 SportBits2Motorcycling SportBits2 = 0x40 SportBits2Boating SportBits2 = 0x80 SportBits2Invalid SportBits2 = 0x00 )
func (SportBits2) String ¶
func (i SportBits2) String() string
type SportBits3 ¶
type SportBits3 uint8
const ( SportBits3Driving SportBits3 = 0x01 SportBits3Golf SportBits3 = 0x02 SportBits3HangGliding SportBits3 = 0x04 SportBits3HorsebackRiding SportBits3 = 0x08 SportBits3Hunting SportBits3 = 0x10 SportBits3Fishing SportBits3 = 0x20 SportBits3InlineSkating SportBits3 = 0x40 SportBits3RockClimbing SportBits3 = 0x80 SportBits3Invalid SportBits3 = 0x00 )
func (SportBits3) String ¶
func (i SportBits3) String() string
type SportBits4 ¶
type SportBits4 uint8
const ( SportBits4Sailing SportBits4 = 0x01 SportBits4IceSkating SportBits4 = 0x02 SportBits4SkyDiving SportBits4 = 0x04 SportBits4Snowshoeing SportBits4 = 0x08 SportBits4Snowmobiling SportBits4 = 0x10 SportBits4StandUpPaddleboarding SportBits4 = 0x20 SportBits4Surfing SportBits4 = 0x40 SportBits4Wakeboarding SportBits4 = 0x80 SportBits4Invalid SportBits4 = 0x00 )
func (SportBits4) String ¶
func (i SportBits4) String() string
type SportBits5 ¶
type SportBits5 uint8
const ( SportBits5WaterSkiing SportBits5 = 0x01 SportBits5Kayaking SportBits5 = 0x02 SportBits5Rafting SportBits5 = 0x04 SportBits5Windsurfing SportBits5 = 0x08 SportBits5Kitesurfing SportBits5 = 0x10 SportBits5Invalid SportBits5 = 0x00 )
func (SportBits5) String ¶
func (i SportBits5) String() string
type SportEvent ¶
type SportEvent byte
const ( SportEventUncategorized SportEvent = 0 SportEventGeocaching SportEvent = 1 SportEventFitness SportEvent = 2 SportEventRecreation SportEvent = 3 SportEventRace SportEvent = 4 SportEventSpecialEvent SportEvent = 5 SportEventTraining SportEvent = 6 SportEventTransportation SportEvent = 7 SportEventTouring SportEvent = 8 SportEventInvalid SportEvent = 0xFF )
func (SportEvent) String ¶
func (i SportEvent) String() string
type SportFile ¶
type SportFile struct {
ZonesTarget *ZonesTargetMsg
Sport *SportMsg
HrZones []*HrZoneMsg
PowerZones []*PowerZoneMsg
MetZones []*MetZoneMsg
SpeedZones []*SpeedZoneMsg
CadenceZones []*CadenceZoneMsg
}
type StrokeType ¶
type StrokeType byte
const ( StrokeTypeNoEvent StrokeType = 0 StrokeTypeOther StrokeType = 1 // stroke was detected but cannot be identified StrokeTypeServe StrokeType = 2 StrokeTypeForehand StrokeType = 3 StrokeTypeBackhand StrokeType = 4 StrokeTypeSmash StrokeType = 5 StrokeTypeInvalid StrokeType = 0xFF )
func (StrokeType) String ¶
func (i StrokeType) String() string
type SubSport ¶
type SubSport byte
const ( SubSportGeneric SubSport = 0 SubSportTreadmill SubSport = 1 // Run/Fitness Equipment SubSportStreet SubSport = 2 // Run SubSportTrail SubSport = 3 // Run SubSportTrack SubSport = 4 // Run SubSportSpin SubSport = 5 // Cycling SubSportIndoorCycling SubSport = 6 // Cycling/Fitness Equipment SubSportRoad SubSport = 7 // Cycling SubSportMountain SubSport = 8 // Cycling SubSportDownhill SubSport = 9 // Cycling SubSportRecumbent SubSport = 10 // Cycling SubSportCyclocross SubSport = 11 // Cycling SubSportHandCycling SubSport = 12 // Cycling SubSportTrackCycling SubSport = 13 // Cycling SubSportIndoorRowing SubSport = 14 // Fitness Equipment SubSportElliptical SubSport = 15 // Fitness Equipment SubSportStairClimbing SubSport = 16 // Fitness Equipment SubSportLapSwimming SubSport = 17 // Swimming SubSportOpenWater SubSport = 18 // Swimming SubSportFlexibilityTraining SubSport = 19 // Training SubSportStrengthTraining SubSport = 20 // Training SubSportWarmUp SubSport = 21 // Tennis SubSportMatch SubSport = 22 // Tennis SubSportExercise SubSport = 23 // Tennis SubSportChallenge SubSport = 24 // Tennis SubSportIndoorSkiing SubSport = 25 // Fitness Equipment SubSportCardioTraining SubSport = 26 // Training SubSportIndoorWalking SubSport = 27 // Walking/Fitness Equipment SubSportEBikeFitness SubSport = 28 // E-Biking SubSportBmx SubSport = 29 // Cycling SubSportCasualWalking SubSport = 30 // Walking SubSportSpeedWalking SubSport = 31 // Walking SubSportBikeToRunTransition SubSport = 32 // Transition SubSportRunToBikeTransition SubSport = 33 // Transition SubSportSwimToBikeTransition SubSport = 34 // Transition SubSportAtv SubSport = 35 // Motorcycling SubSportMotocross SubSport = 36 // Motorcycling SubSportBackcountry SubSport = 37 // Alpine Skiing/Snowboarding SubSportResort SubSport = 38 // Alpine Skiing/Snowboarding SubSportRcDrone SubSport = 39 // Flying SubSportWingsuit SubSport = 40 // Flying SubSportWhitewater SubSport = 41 // Kayaking/Rafting SubSportAll SubSport = 254 SubSportInvalid SubSport = 0xFF )
type SwimStroke ¶
type SwimStroke byte
const ( SwimStrokeFreestyle SwimStroke = 0 SwimStrokeBackstroke SwimStroke = 1 SwimStrokeBreaststroke SwimStroke = 2 SwimStrokeButterfly SwimStroke = 3 SwimStrokeDrill SwimStroke = 4 SwimStrokeMixed SwimStroke = 5 SwimStrokeIm SwimStroke = 6 // IM is a mixed interval containing the same number of lengths for each of: Butterfly, Backstroke, Breaststroke, Freestyle, swam in that order. SwimStrokeInvalid SwimStroke = 0xFF )
func (SwimStroke) String ¶
func (i SwimStroke) String() string
type ThreeDSensorCalibrationMsg ¶
type ThreeDSensorCalibrationMsg struct {
}
type TimeZone ¶
type TimeZone byte
const ( TimeZoneAlmaty TimeZone = 0 TimeZoneBangkok TimeZone = 1 TimeZoneBombay TimeZone = 2 TimeZoneBrasilia TimeZone = 3 TimeZoneCairo TimeZone = 4 TimeZoneCapeVerdeIs TimeZone = 5 TimeZoneDarwin TimeZone = 6 TimeZoneEniwetok TimeZone = 7 TimeZoneFiji TimeZone = 8 TimeZoneHongKong TimeZone = 9 TimeZoneIslamabad TimeZone = 10 TimeZoneKabul TimeZone = 11 TimeZoneMagadan TimeZone = 12 TimeZoneMidAtlantic TimeZone = 13 TimeZoneMoscow TimeZone = 14 TimeZoneMuscat TimeZone = 15 TimeZoneNewfoundland TimeZone = 16 TimeZoneSamoa TimeZone = 17 TimeZoneSydney TimeZone = 18 TimeZoneTehran TimeZone = 19 TimeZoneTokyo TimeZone = 20 TimeZoneUsAlaska TimeZone = 21 TimeZoneUsAtlantic TimeZone = 22 TimeZoneUsCentral TimeZone = 23 TimeZoneUsEastern TimeZone = 24 TimeZoneUsHawaii TimeZone = 25 TimeZoneUsMountain TimeZone = 26 TimeZoneUsPacific TimeZone = 27 TimeZoneOther TimeZone = 28 TimeZoneAuckland TimeZone = 29 TimeZoneKathmandu TimeZone = 30 TimeZoneEuropeWesternWet TimeZone = 31 TimeZoneEuropeCentralCet TimeZone = 32 TimeZoneEuropeEasternEet TimeZone = 33 TimeZoneJakarta TimeZone = 34 TimeZonePerth TimeZone = 35 TimeZoneAdelaide TimeZone = 36 TimeZoneBrisbane TimeZone = 37 TimeZoneTasmania TimeZone = 38 TimeZoneIceland TimeZone = 39 TimeZoneAmsterdam TimeZone = 40 TimeZoneAthens TimeZone = 41 TimeZoneBarcelona TimeZone = 42 TimeZoneBerlin TimeZone = 43 TimeZoneBrussels TimeZone = 44 TimeZoneBudapest TimeZone = 45 TimeZoneCopenhagen TimeZone = 46 TimeZoneDublin TimeZone = 47 TimeZoneHelsinki TimeZone = 48 TimeZoneLisbon TimeZone = 49 TimeZoneLondon TimeZone = 50 TimeZoneMadrid TimeZone = 51 TimeZoneMunich TimeZone = 52 TimeZoneOslo TimeZone = 53 TimeZoneParis TimeZone = 54 TimeZonePrague TimeZone = 55 TimeZoneReykjavik TimeZone = 56 TimeZoneRome TimeZone = 57 TimeZoneStockholm TimeZone = 58 TimeZoneVienna TimeZone = 59 TimeZoneWarsaw TimeZone = 60 TimeZoneZurich TimeZone = 61 TimeZoneQuebec TimeZone = 62 TimeZoneOntario TimeZone = 63 TimeZoneManitoba TimeZone = 64 TimeZoneSaskatchewan TimeZone = 65 TimeZoneAlberta TimeZone = 66 TimeZoneBritishColumbia TimeZone = 67 TimeZoneBoise TimeZone = 68 TimeZoneBoston TimeZone = 69 TimeZoneChicago TimeZone = 70 TimeZoneDallas TimeZone = 71 TimeZoneDenver TimeZone = 72 TimeZoneKansasCity TimeZone = 73 TimeZoneLasVegas TimeZone = 74 TimeZoneLosAngeles TimeZone = 75 TimeZoneMiami TimeZone = 76 TimeZoneMinneapolis TimeZone = 77 TimeZoneNewYork TimeZone = 78 TimeZoneNewOrleans TimeZone = 79 TimeZonePhoenix TimeZone = 80 TimeZoneSantaFe TimeZone = 81 TimeZoneSeattle TimeZone = 82 TimeZoneWashingtonDc TimeZone = 83 TimeZoneUsArizona TimeZone = 84 TimeZoneChita TimeZone = 85 TimeZoneEkaterinburg TimeZone = 86 TimeZoneIrkutsk TimeZone = 87 TimeZoneKaliningrad TimeZone = 88 TimeZoneKrasnoyarsk TimeZone = 89 TimeZoneNovosibirsk TimeZone = 90 TimeZonePetropavlovskKamchatskiy TimeZone = 91 TimeZoneSamara TimeZone = 92 TimeZoneVladivostok TimeZone = 93 TimeZoneMexicoCentral TimeZone = 94 TimeZoneMexicoMountain TimeZone = 95 TimeZoneMexicoPacific TimeZone = 96 TimeZoneCapeTown TimeZone = 97 TimeZoneWinkhoek TimeZone = 98 TimeZoneLagos TimeZone = 99 TimeZoneRiyahd TimeZone = 100 TimeZoneVenezuela TimeZone = 101 TimeZoneAustraliaLh TimeZone = 102 TimeZoneSantiago TimeZone = 103 TimeZoneManual TimeZone = 253 TimeZoneAutomatic TimeZone = 254 TimeZoneInvalid TimeZone = 0xFF )
type TimerTrigger ¶
type TimerTrigger byte
const ( TimerTriggerManual TimerTrigger = 0 TimerTriggerAuto TimerTrigger = 1 TimerTriggerFitnessEquipment TimerTrigger = 2 TimerTriggerInvalid TimerTrigger = 0xFF )
func (TimerTrigger) String ¶
func (i TimerTrigger) String() string
type TimestampCorrelationMsg ¶
type TimestampCorrelationMsg struct {
}
type TotalsFile ¶
type TotalsFile struct {
Totals []*TotalsMsg
}
type TrainingFileMsg ¶
type TrainingFileMsg struct {
Timestamp time.Time
Type File
Manufacturer Manufacturer
Product uint16
SerialNumber uint32
TimeCreated time.Time
}
func (*TrainingFileMsg) GetProduct ¶
func (x *TrainingFileMsg) GetProduct() interface{}
type UnknownField ¶
UnknownField represents an unknown FIT message field not found in the official profile. It contains the global message and field number.
type UserLocalId ¶
type UserLocalId uint16
const ( UserLocalIdLocalMin UserLocalId = 0x0000 UserLocalIdLocalMax UserLocalId = 0x000F UserLocalIdStationaryMin UserLocalId = 0x0010 UserLocalIdStationaryMax UserLocalId = 0x00FF UserLocalIdPortableMin UserLocalId = 0x0100 UserLocalIdPortableMax UserLocalId = 0xFFFE UserLocalIdInvalid UserLocalId = 0xFFFF )
func (UserLocalId) String ¶
func (i UserLocalId) String() string
type UserProfileMsg ¶
type UserProfileMsg struct {
MessageIndex MessageIndex
FriendlyName string
Gender Gender
Age uint8
Height float64
Weight float64
Language Language
ElevSetting DisplayMeasure
WeightSetting DisplayMeasure
RestingHeartRate uint8
DefaultMaxRunningHeartRate uint8
DefaultMaxBikingHeartRate uint8
DefaultMaxHeartRate uint8
HrSetting DisplayHeart
SpeedSetting DisplayMeasure
DistSetting DisplayMeasure
PowerSetting DisplayPower
ActivityClass ActivityClass
PositionSetting DisplayPosition
TemperatureSetting DisplayMeasure
LocalId UserLocalId
GlobalId []byte
HeightSetting DisplayMeasure
}
type VideoClipMsg ¶
type VideoClipMsg struct {
}
type VideoDescriptionMsg ¶
type VideoDescriptionMsg struct {
MessageIndex MessageIndex // Long descriptions will be split into multiple parts
MessageCount uint16 // Total number of description parts
Text string
}
type VideoFrameMsg ¶
type VideoFrameMsg struct {
}
type VideoTitleMsg ¶
type VideoTitleMsg struct {
MessageIndex MessageIndex // Long titles will be split into multiple parts
MessageCount uint16 // Total number of title parts
Text string
}
type WeightFile ¶
type WeightFile struct {
UserProfile *UserProfileMsg
WeightScales []*WeightScaleMsg
}
type WeightScaleMsg ¶
type WeightScaleMsg struct {
Timestamp time.Time
Weight float64
PercentFat float64
PercentHydration float64
VisceralFatMass float64
BoneMass float64
MuscleMass float64
BasalMet float64
PhysiqueRating uint8
ActiveMet float64 // ~4kJ per kcal, 0.25 allows max 16384 kcal
MetabolicAge uint8
VisceralFatRating uint8
UserProfileIndex MessageIndex // Associates this weight scale message to a user. This corresponds to the index of the user profile message in the weight scale file.
}
type WktStepDuration ¶
type WktStepDuration byte
const ( WktStepDurationTime WktStepDuration = 0 WktStepDurationDistance WktStepDuration = 1 WktStepDurationHrLessThan WktStepDuration = 2 WktStepDurationHrGreaterThan WktStepDuration = 3 WktStepDurationCalories WktStepDuration = 4 WktStepDurationOpen WktStepDuration = 5 WktStepDurationRepeatUntilStepsCmplt WktStepDuration = 6 WktStepDurationRepeatUntilTime WktStepDuration = 7 WktStepDurationRepeatUntilDistance WktStepDuration = 8 WktStepDurationRepeatUntilCalories WktStepDuration = 9 WktStepDurationRepeatUntilHrLessThan WktStepDuration = 10 WktStepDurationRepeatUntilHrGreaterThan WktStepDuration = 11 WktStepDurationRepeatUntilPowerLessThan WktStepDuration = 12 WktStepDurationRepeatUntilPowerGreaterThan WktStepDuration = 13 WktStepDurationPowerLessThan WktStepDuration = 14 WktStepDurationPowerGreaterThan WktStepDuration = 15 WktStepDurationRepetitionTime WktStepDuration = 28 WktStepDurationInvalid WktStepDuration = 0xFF )
func (WktStepDuration) String ¶
func (i WktStepDuration) String() string
type WktStepTarget ¶
type WktStepTarget byte
const ( WktStepTargetSpeed WktStepTarget = 0 WktStepTargetHeartRate WktStepTarget = 1 WktStepTargetOpen WktStepTarget = 2 WktStepTargetCadence WktStepTarget = 3 WktStepTargetPower WktStepTarget = 4 WktStepTargetGrade WktStepTarget = 5 WktStepTargetResistance WktStepTarget = 6 WktStepTargetInvalid WktStepTarget = 0xFF )
func (WktStepTarget) String ¶
func (i WktStepTarget) String() string
type WorkoutCapabilities ¶
type WorkoutCapabilities uint32
const ( WorkoutCapabilitiesInterval WorkoutCapabilities = 0x00000001 WorkoutCapabilitiesCustom WorkoutCapabilities = 0x00000002 WorkoutCapabilitiesFitnessEquipment WorkoutCapabilities = 0x00000004 WorkoutCapabilitiesFirstbeat WorkoutCapabilities = 0x00000008 WorkoutCapabilitiesNewLeaf WorkoutCapabilities = 0x00000010 WorkoutCapabilitiesTcx WorkoutCapabilities = 0x00000020 // For backwards compatibility. Watch should add missing id fields then clear flag. WorkoutCapabilitiesSpeed WorkoutCapabilities = 0x00000080 // Speed source required for workout step. WorkoutCapabilitiesHeartRate WorkoutCapabilities = 0x00000100 // Heart rate source required for workout step. WorkoutCapabilitiesDistance WorkoutCapabilities = 0x00000200 // Distance source required for workout step. WorkoutCapabilitiesCadence WorkoutCapabilities = 0x00000400 // Cadence source required for workout step. WorkoutCapabilitiesPower WorkoutCapabilities = 0x00000800 // Power source required for workout step. WorkoutCapabilitiesGrade WorkoutCapabilities = 0x00001000 // Grade source required for workout step. WorkoutCapabilitiesResistance WorkoutCapabilities = 0x00002000 // Resistance source required for workout step. WorkoutCapabilitiesProtected WorkoutCapabilities = 0x00004000 WorkoutCapabilitiesInvalid WorkoutCapabilities = 0x00000000 )
func (WorkoutCapabilities) String ¶
func (i WorkoutCapabilities) String() string
type WorkoutFile ¶
type WorkoutFile struct {
Workout *WorkoutMsg
WorkoutSteps []*WorkoutStepMsg
}
type WorkoutMsg ¶
type WorkoutMsg struct {
Sport Sport
Capabilities WorkoutCapabilities
NumValidSteps uint16 // number of valid steps
WktName string
}
type WorkoutPower ¶
type WorkoutPower uint32
const ( WorkoutPowerWattsOffset WorkoutPower = 1000 WorkoutPowerInvalid WorkoutPower = 0xFFFFFFFF )
func (WorkoutPower) String ¶
func (i WorkoutPower) String() string
type WorkoutStepMsg ¶
type WorkoutStepMsg struct {
MessageIndex MessageIndex
WktStepName string
DurationType WktStepDuration
DurationValue uint32
TargetType WktStepTarget
TargetValue uint32
CustomTargetValueLow uint32
CustomTargetValueHigh uint32
Intensity Intensity
}
func (*WorkoutStepMsg) GetCustomTargetValueHigh ¶
func (x *WorkoutStepMsg) GetCustomTargetValueHigh() interface{}
func (*WorkoutStepMsg) GetCustomTargetValueLow ¶
func (x *WorkoutStepMsg) GetCustomTargetValueLow() interface{}
func (*WorkoutStepMsg) GetDurationValue ¶
func (x *WorkoutStepMsg) GetDurationValue() interface{}
func (*WorkoutStepMsg) GetTargetValue ¶
func (x *WorkoutStepMsg) GetTargetValue() interface{}
type ZonesTargetMsg ¶
type ZonesTargetMsg struct {
MaxHeartRate uint8
ThresholdHeartRate uint8
FunctionalThresholdPower uint16
HrCalcType HrZoneCalc
PwrCalcType PwrZoneCalc
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
fitgen
command
|
|
|
stringer
command
Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer interface.
|
Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer interface. |
|
Package dyncrc16 implements the Dynastream CRC-16 checksum.
|
Package dyncrc16 implements the Dynastream CRC-16 checksum. |