gpsd

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddress = "localhost:2947"
	DialTimeout    = time.Millisecond * 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMsg

type BaseMsg struct {
	Class string `json:"class"`
}

type GpsdClient

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

func New

func New(addr string, logger *slog.Logger) *GpsdClient

func (*GpsdClient) Listen

func (c *GpsdClient) Listen(ctx context.Context, cb func(lat, lon, alt, speed, track float64))

type TPVMsg

type TPVMsg struct {
	Class  string    `json:"class"`
	Tag    string    `json:"tag"`
	Device string    `json:"device"`
	Mode   int       `json:"mode"`
	Time   time.Time `json:"time"`
	Ept    float64   `json:"ept"`
	Lat    float64   `json:"lat"`
	Lon    float64   `json:"lon"`
	Alt    float64   `json:"alt"`
	Epx    float64   `json:"epx"`
	Epy    float64   `json:"epy"`
	Epv    float64   `json:"epv"`
	Track  float64   `json:"track"`
	Speed  float64   `json:"speed"`
	Climb  float64   `json:"climb"`
	Epd    float64   `json:"epd"`
	Eps    float64   `json:"eps"`
	Epc    float64   `json:"epc"`
	Eph    float64   `json:"eph"`
}

type VERSIONMsg

type VERSIONMsg struct {
	Class      string `json:"class"`
	Release    string `json:"release"`
	Rev        string `json:"rev"`
	ProtoMajor int    `json:"proto_major"`
	ProtoMinor int    `json:"proto_minor"`
	Remote     string `json:"remote"`
}

Jump to

Keyboard shortcuts

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