positionregistry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PositionRegistry

type PositionRegistry struct {
	MaxColors uint16
	SeenPos   map[int][]s2.LatLng
	Tracks    int
}

PositionRegistry keeps state for prior locations seen in GPX paths

func (*PositionRegistry) AddFromColorPath

func (p *PositionRegistry) AddFromColorPath(cp *colorpath.ColorPath, trkNum int)

AddFromColorPath adds all the positions in a colorpath to the registry

func (*PositionRegistry) CountNear

func (p *PositionRegistry) CountNear(ll s2.LatLng, meters float64) uint16

CountNear returns the number of previous paths that had one point within _meters_ meters of the current position. This approach, while kind of slow, yields a good result because we don't double count us backtracking over the same point on any one walk, and doesn't count when the points in a segment are less than _meters_ meters apart.

Jump to

Keyboard shortcuts

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