vbo

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Velocity  = "velocity kmh"
	Latitude  = "latitude"
	Longitude = "longitude"
	Time      = "time"
	Sats      = "sats"
)

Column constants

Variables

This section is empty.

Functions

func Distance added in v0.3.4

func Distance(f *File) float64

Types

type Analyser

type Analyser struct{}

func (*Analyser) AnalyseDirectory

func (a *Analyser) AnalyseDirectory(path string, consumer func(FileSummary))

type Comments

type Comments struct {
	// contains filtered or unexported fields
}

Comments contains file information

type Config added in v0.4.0

type Config struct {
	CTPath string
	Port   int64
}

func LoadConfig added in v0.4.0

func LoadConfig(path string) *Config

type Data

type Data struct {
	Rows      []DataRow
	MaxValues []float64
}

Data contains all the data rows

type DataRow

type DataRow struct {
	// contains filtered or unexported fields
}

DataRow contains the data fields in a row

func (*DataRow) GetValue

func (r *DataRow) GetValue(index int) interface{}

type File

type File struct {
	Path         string
	CreationTime time.Time

	Start   LatLng
	Columns map[string]int
	Data    *Data
	Laps    []Lap
	// contains filtered or unexported fields
}

File Main file object

func ParseFile

func ParseFile(path string) File

ParseFile creates a VboFile representation

type FileSummary

type FileSummary struct {
	Version      string       `json:"version,omitempty"`
	CreationTime time.Time    `json:"creationtime"`
	ModTime      time.Time    `json:"modtime"`
	Path         string       `json:"path"`
	Duration     jsonDuration `json:"duration"`
	NumLaps      int          `json:"numlaps"`
	MaxVelocity  float64      `json:"maxvelocity"`
	MaxRpm       float64      `json:"maxrpm"`
	FastestLap   jsonDuration `json:"fastestlap"`
	Laps         []Lap        `json:"laps"`
	Distance     float64      `json:"distance"`
}

type Lap added in v0.2.1

type Lap struct {
	Partial bool         `json:"partial"`
	LapTime jsonDuration `json:"laptime"`
	// contains filtered or unexported fields
}

type LatLng

type LatLng struct {
	Lat float64
	Lng float64
}

Jump to

Keyboard shortcuts

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