gps

package
v0.0.0-...-c9096f0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enumerate

func Enumerate() (ret []string, err error)

Enumerate collects all gps device paths. TODO: udev enumeration.

Types

type GPS

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

GPS is an instance of an opened GPS stream.

func NewGPS

func NewGPS(p string) (*GPS, error)

NewGPS opens a GPS stream from a given device path.

func (*GPS) Close

func (g *GPS) Close() error

Close terminates the GPS stream and returns any error encountered.

func (*GPS) NMEA

func (g *GPS) NMEA() <-chan NMEA

NMEA streams GPS messages. Closes on error.

type Knots

type Knots float64

type NMEA

type NMEA struct {
	NMEAi
	// contains filtered or unexported fields
}

func (NMEA) Line

func (n NMEA) Line() string

Line returns the raw NMEA string.

func (NMEA) Msg

func (n NMEA) Msg() NMEAi

type NMEAi

type NMEAi interface {
	Fix() time.Time
	Longitude() float64
	Latitude() float64
}

type RMC

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

func (*RMC) Fix

func (r *RMC) Fix() time.Time

func (*RMC) Latitude

func (r *RMC) Latitude() float64

func (*RMC) Longitude

func (r *RMC) Longitude() float64

Jump to

Keyboard shortcuts

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