fit

package module
v0.0.0-...-875e598 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2016 License: MIT Imports: 8 Imported by: 2

README

fit

Package to read and parse a Garmin .fit Activity file using the Google Go (Golang) programming language

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Timestamp        int64
	Num_sessions     uint16
	Total_timer_time int64
	Local_timestamp  int64
	Event            string
	Event_type       string
	Event_group      uint8
	Type             string
}

type Device_info

type Device_info struct {
	Timestamp          int64
	Serial_number      uint32
	Cum_operating_time uint32
	Manufacturer       string
	Product            string
	Software_version   float64
	Battery_voltage    float64
	Device_index       uint8
	Device_type        string
	Hardware_version   uint8
	Battery_status     uint8
	Source_type        string
	Ant_network        string
}

type Event

type Event struct {
	Timestamp    int64
	Time_trigger string
	Event        string
	Event_type   string
}

type File_creator

type File_creator struct {
	Software_version float64
	Hardware_version uint8
}

type File_id

type File_id struct {
	Serial_number uint32
	Time_created  int64
	Manufacturer  string
	Product       string
	Number        uint16
	File_type     byte
}

type FitFile

type FitFile struct {
	FileId      File_id
	FileCreator File_creator
	DeviceInfo  []Device_info
	Events      []Event
	Records     []Record
	Laps        []Lap
	Sessions    []Session
	Activity    Activity
}

func Parse

func Parse(filename string, show_verbose_mode bool) FitFile

type Lap

type Lap struct {
	Timestamp              int64
	Start_time             int64
	Start_position_lat     float64
	Start_position_long    float64
	End_position_lat       float64
	End_position_long      float64
	Total_elapsed_time     float64
	Total_timer_time       float64
	Total_distance         float64
	Total_cycles           uint32
	Total_work             uint32
	Message_index          uint16
	Total_calories         uint16
	Total_fat_calories     uint16
	Avg_speed              float64
	Max_speed              float64
	Avg_power              uint16
	Max_power              uint16
	Norm_power             uint16
	Left_right_balance_100 float64
	Total_ascent           uint16
	Total_descent          uint16
	Avg_heart_rate         uint8
	Max_heart_rate         uint8
	Avg_cadence            uint8
	Max_cadence            uint8
	Event_group            uint8
	Event                  string
	Event_type             string
	Intensity              uint8
}

type Record

type Record struct {
	Timestamp                 int64
	Position_lat              float64
	Position_long             float64
	Distance                  float64
	Time_from_course          int32
	Compressed_speed_distance uint8
	Heart_rate                uint8
	Altitude                  float64
	Speed                     float64
	Power                     uint16
	Grade                     int16
	Cadence                   uint8
	Registance                uint8
	Cycle_length              uint8
	Temperature               int8
}

type Session

type Session struct {
	Timestamp                      int64
	Start_time                     int64
	Start_position_lat             float64
	Start_position_long            float64
	Total_elapsed_time             float64
	Total_timer_time               float64
	Total_distance                 float64
	Total_work                     uint32
	Total_cycles                   uint32
	Nec_lat                        float64
	Nec_long                       float64
	Swc_lat                        float64
	Swc_long                       float64
	Message_index                  uint16
	Total_calories                 uint16
	Total_fat_calories             uint16
	Avg_speed                      float64
	Max_speed                      float64
	Avg_power                      uint16
	Max_power                      uint16
	Total_ascent                   uint16
	Total_descent                  uint16
	Avg_heart_rate                 uint8
	Max_heart_rate                 uint8
	Avg_cadence                    uint8
	Max_cadence                    uint8
	Event                          string
	Event_type                     string
	Sport                          string
	Sub_sport                      string
	First_lap_index                uint16
	Num_laps                       uint16
	Session_trigger                string
	Norm_power                     uint16
	Training_stress_score          float64
	Intensity_factor               float64
	Left_right_balance_100         float64
	Threshold_power                uint16
	Avg_left_torque_effectiveness  float32
	Avg_right_torque_effectiveness float32
	Avg_left_pedal_smoothness      float32
	Avg_right_pedal_smoothness     float32
	Avg_combined_pedal_smoothness  float32
	Time_standing                  float64
	Stand_count                    uint16
	Total_training_effect          float64
}

Directories

Path Synopsis
* * From Go-MultipleFileUpload @ * * https://github.com/sanatgersappa/Go-MultipleFileUpload/blob/master/app.go *
* * From Go-MultipleFileUpload @ * * https://github.com/sanatgersappa/Go-MultipleFileUpload/blob/master/app.go *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL