-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Milestone
Description
Currently, after decoding you basically get a flat activity file.
This closly represents the fit file protocol.
But an application might be more interested in a tree-structure of the activity, e.g.
type StructuredActivityFile {
Sessions []StructuredSession
}
type StructuredSession{
Lap []*StructuredLap
}
type StructuredLap {
LapMsg // Copy or reference of original lap for summary information
Records []*RecordMsg // Contains only data records which were during this lap.
// maybe also others, such as events, ...
}This could be calculated in a post-processing step as a method of ActivityFile by
func (a *ActivityFile) StructuredActivity() StructuredActivity {...}I guess it's only neccessary to compare timestamps to build the tree.
What do you think of this?
Or is the scope of the package to represent the fit protocol closly, leaving all higher level functionality for other packages?