gps

package
v0.0.0-...-df6b22a Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDegrees

func ParseDegrees(value string, direction string) (string, error)

Types

type GPS

type GPS interface {
	Run() error
	Close() error
}

func Init

func Init(gpsChan chan<- GPSMessage, mock bool) (GPS, error)

type GPSMessage

type GPSMessage struct {
	Lat  float64
	Long float64
	// FixQuality uint16 // Horizontal Dilution of Precision (HDOP). Relative accuracy of horizontal position. 1 = ideal, >20 = poor
	HDOP float64 // Horizontal Dilution of Precision (HDOP). Relative accuracy of horizontal position. 0.0 to 9.9
}

type NMEA

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

func ParseNMEALine

func ParseNMEALine(line string) (NMEA, error)

func (NMEA) GetHorizontalDilution

func (nmea NMEA) GetHorizontalDilution() string

func (NMEA) GetLatitude

func (nmea NMEA) GetLatitude() (string, error)

func (NMEA) GetLongitude

func (nmea NMEA) GetLongitude() (string, error)

Jump to

Keyboard shortcuts

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