Documentation ¶
Index ¶
- Constants
- func Distance32(latA float32, lngA float32, latB float32, lngB float32) float32
- func MetersToDegrees32(lengthInM float32, radius float32) float32
- func MetersToLatitudeAngle(lengthInM float32) float32
- func MetersToLongitudeAngleAtLatitude(lengthInM float32, latitude float32) float32
- type CasterRegistry
- type CasterSource
- type Registry
- type Selector
- type StationDistance
- type StationsRegistry
Constants ¶
View Source
const (
MaximumDistanceToBaseInM = 100 * 1000
)
View Source
const (
SIGNIFICANT_CHANGE = 0.01
)
Variables ¶
This section is empty.
Functions ¶
func Distance32 ¶
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 MetersToLatitudeAngle ¶
Types ¶
type CasterRegistry ¶
type CasterRegistry interface { }
type CasterSource ¶
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 ¶
type StationDistance ¶
type StationDistance struct {
// contains filtered or unexported fields
}
type StationsRegistry ¶
type StationsRegistry interface {
Register(source CasterSource, mountpoint string, lat float32, lng float32)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.