reducer

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reduce

func Reduce(fit *proto.FIT, opts ...Option) error

Reduce reduces message size by simplifying a curve of points using Ramer-Douglas-Peucker algorithm to a similar curve with fewer points, then only keep messages having those points.

Types

type Option

type Option func(*options)

Options is reducer options.

func WithDistanceInterval

func WithDistanceInterval(interval float64) Option

WithDistanceInterval directs Reduce to by specific distance interval.

func WithRDP

func WithRDP(epsilon float64) Option

WithRDP directs Reduce to use Ramer-Douglas-Peucker algorithm to simplify by GPS points.

func WithTimeInterval

func WithTimeInterval(interval uint32) Option

WithTimeInterval directs Reduce to by specific time interval.

Jump to

Keyboard shortcuts

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