rtkutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package rtkutils defines a gps and an rtk correction source which sends rtcm data to a child gps This is an Experimental package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NtripConfig

type NtripConfig struct {
	NtripURL             string `json:"ntrip_url"`
	NtripConnectAttempts int    `json:"ntrip_connect_attempts,omitempty"`
	NtripMountpoint      string `json:"ntrip_mountpoint,omitempty"`
	NtripPass            string `json:"ntrip_password,omitempty"`
	NtripUser            string `json:"ntrip_username,omitempty"`
}

NtripConfig is used for converting attributes for a correction source.

type NtripInfo

type NtripInfo struct {
	URL                string
	Username           string
	Password           string
	MountPoint         string
	Client             *ntrip.Client
	Stream             io.ReadCloser
	MaxConnectAttempts int
}

NtripInfo contains the information necessary to connect to a mountpoint.

func NewNtripInfo

func NewNtripInfo(cfg *NtripConfig, logger golog.Logger) (*NtripInfo, error)

NewNtripInfo function validates and sets NtripConfig arributes and returns NtripInfo.

type RTKMovementSensor

type RTKMovementSensor struct {
	resource.Named
	resource.AlwaysRebuild

	Nmeamovementsensor gpsnmea.NmeaMovementSensor
	InputProtocol      string
	CorrectionWriter   io.ReadWriteCloser

	Bus       board.I2C
	Wbaud     int
	Addr      byte // for i2c only
	Writepath string
	// contains filtered or unexported fields
}

A RTKMovementSensor is an NMEA MovementSensor model that can intake RTK correction data.

func (*RTKMovementSensor) Accuracy

func (g *RTKMovementSensor) Accuracy(ctx context.Context, extra map[string]interface{}) (map[string]float32, error)

Accuracy passthrough.

func (*RTKMovementSensor) AngularVelocity

func (g *RTKMovementSensor) AngularVelocity(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)

AngularVelocity passthrough.

func (*RTKMovementSensor) Close

func (g *RTKMovementSensor) Close(ctx context.Context) error

Close shuts down the RTKMOVEMENTSENSOR.

func (*RTKMovementSensor) CompassHeading

func (g *RTKMovementSensor) CompassHeading(ctx context.Context, extra map[string]interface{}) (float64, error)

CompassHeading passthrough.

func (*RTKMovementSensor) GetStream

func (g *RTKMovementSensor) GetStream(mountPoint string, maxAttempts int) error

GetStream attempts to connect to ntrip streak until successful connection or timeout.

func (*RTKMovementSensor) LinearAcceleration

func (g *RTKMovementSensor) LinearAcceleration(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)

LinearAcceleration passthrough.

func (*RTKMovementSensor) LinearVelocity

func (g *RTKMovementSensor) LinearVelocity(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)

LinearVelocity passthrough.

func (*RTKMovementSensor) NtripStatus

func (g *RTKMovementSensor) NtripStatus() (bool, error)

NtripStatus returns true if connection to NTRIP stream is OK, false if not.

func (*RTKMovementSensor) Orientation

func (g *RTKMovementSensor) Orientation(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)

Orientation passthrough.

func (*RTKMovementSensor) Position

func (g *RTKMovementSensor) Position(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)

Position returns the current geographic location of the MOVEMENTSENSOR.

func (*RTKMovementSensor) Properties

func (g *RTKMovementSensor) Properties(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)

Properties passthrough.

func (*RTKMovementSensor) ReadFix

func (g *RTKMovementSensor) ReadFix(ctx context.Context) (int, error)

ReadFix passthrough.

func (*RTKMovementSensor) Readings

func (g *RTKMovementSensor) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

Readings will use the default MovementSensor Readings if not provided.

Jump to

Keyboard shortcuts

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