ntrip_client

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaximumDistanceToBaseInM = 100 * 1000
)
View Source
const (
	SIGNIFICANT_CHANGE = 0.01
)

Variables

This section is empty.

Functions

func Distance32

func Distance32(latA float32, lngA float32, latB float32, lngB float32) float32

DistanceTo computes the distance in meters between 2 points It uses the Haversine formula: https://www.movable-type.co.uk/scripts/latlong.html

func MetersToDegrees32

func MetersToDegrees32(lengthInM float32, radius float32) float32

func MetersToLatitudeAngle

func MetersToLatitudeAngle(lengthInM float32) float32

func MetersToLongitudeAngleAtLatitude

func MetersToLongitudeAngleAtLatitude(lengthInM float32, latitude float32) float32

Types

type CasterRegistry

type CasterRegistry interface {
}

type CasterSource

type CasterSource interface {
	RegisterMountPoints(Registry) error
}

func NewSource

func NewSource(input input.SourceTableInput) CasterSource

type Registry

type Registry interface {
	RegisterCaster(url string, details ntrip.CasterEntry) error
	RegisterStation(url string, details ntrip.StreamEntry) error
	NearestStations(lat float32, lng float32) (distances []StationDistance, err error)
}

func NewInMemoryRegistry

func NewInMemoryRegistry() Registry

type Selector

type Selector interface {
	io.Closer
	Stream() (<-chan []byte, error)
	SetLocation(lat float32, lng float32) error
	Invalidate() error
}

func NewRegistrySelector

func NewRegistrySelector(registry Registry, significantChange float32) Selector

type StationDistance

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

type StationsRegistry

type StationsRegistry interface {
	Register(source CasterSource, mountpoint string, lat float32, lng float32)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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