/
vbo.go
63 lines (52 loc) · 1017 Bytes
/
vbo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package vbo
import (
"time"
)
//File Main file object
type File struct {
Path string
CreationTime time.Time
comments Comments
Start LatLng
Columns map[string]int
Data *Data
Laps []Lap
}
// type VboFileChannelUnits struct {
// }
//Comments contains file information
type Comments struct {
vboxVersion string
serialNumber string
engine string
gps string
rate float32
maxRate float32
}
// type VboFileLapTiming struct {
// }
// type VboFileAvi struct {
// }
//Data contains all the data rows
type Data struct {
Rows []DataRow
MaxValues []float64
}
type Lap struct {
startIndex int
endIndex int
Partial bool `json:"partial"`
LapTime jsonDuration `json:"laptime"`
maxValues []float64
}
//DataRow contains the data fields in a row
type DataRow struct {
data []interface{}
}
func (r *DataRow) GetValue(index int) interface{} {
return r.data[index]
}
type LatLng struct {
Lat float64
Lng float64
}