telematics

package
v0.0.0-...-4eb781d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fuzz

func Fuzz(data []byte) int

Types

type Acceleration

type Acceleration struct {
	X, Y, Z GForce
}

type AccelerationData

type AccelerationData []Acceleration

func (*AccelerationData) UnmarshalBSONValue

func (a *AccelerationData) UnmarshalBSONValue(t bsontype.Type, raw []byte) error

type Attitude

type Attitude struct {
	Roll, Pitch, Yaw Radians
}

type AttitudeData

type AttitudeData []Attitude

func (*AttitudeData) UnmarshalBSONValue

func (a *AttitudeData) UnmarshalBSONValue(t bsontype.Type, raw []byte) error

type Distance

type Distance float64

Distance in meters

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalBSONValue

func (s *Duration) UnmarshalBSONValue(t bsontype.Type, raw []byte) (err error)

type File

type File struct {
	Version  uint      `bson:"ver"`
	Segments []Segment `bson:"series"`
}

type GForce

type GForce float64

type Location

type Location struct {
	Date      Timestamp `bson:"time" json:"date"`
	Latitude  float64   `bson:"lat" json:"lat"`
	Longitude float64   `bson:"lon" json:"long"`
}

func (*Location) DistanceFrom

func (a *Location) DistanceFrom(b *Location) Distance

func (*Location) SpeedFrom

func (a *Location) SpeedFrom(b *Location) Speed

type Locations

type Locations []*Location

func (Locations) Len

func (a Locations) Len() int

func (Locations) Less

func (a Locations) Less(i, j int) bool

func (Locations) Swap

func (a Locations) Swap(i, j int)

type Radians

type Radians float64

type Segment

type Segment struct {
	StartDate           Timestamp        `bson:"start"`
	EndDate             Timestamp        `bson:"end"`
	RelatedIDs          []string         `bson:"rel"`
	Locations           Locations        `bson:"locations"`
	SamplingInterval    Duration         `bson:"interval"`
	AccelerationSamples AccelerationData `bson:"samples"`
	AttitudeSamples     AttitudeData     `bson:"att"`
}

type Speed

type Speed float64

Speed in meters-per-second

type Timestamp

type Timestamp struct {
	time.Time
}

func (*Timestamp) UnmarshalBSONValue

func (a *Timestamp) UnmarshalBSONValue(t bsontype.Type, raw []byte) (err error)

Jump to

Keyboard shortcuts

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