rtkstation

package
v0.4.0-rc0 Latest Latest
Warning

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

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

Documentation

Overview

Package rtkstation defines a gps rtk correction source This is an Experimental package

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStationValidation = fmt.Errorf("only serial, I2C are supported for %s", stationModel.Name)
)

ErrStationValidation contains the model substring for the available correction source types.

Functions

func ConfigureBaseRTKStation

func ConfigureBaseRTKStation(conf resource.Config) error

ConfigureBaseRTKStation configures an RTK chip to act as a base station and send correction data.

Types

type I2CConfig

type I2CConfig struct {
	Board       string `json:"board"`
	I2CBus      string `json:"i2c_bus"`
	I2cAddr     int    `json:"i2c_addr"`
	I2CBaudRate int    `json:"i2c_baud_rate,omitempty"`
}

I2CConfig is used for converting attributes for a correction source.

func (*I2CConfig) ValidateI2C

func (cfg *I2CConfig) ValidateI2C(path string) error

ValidateI2C ensures all parts of the config are valid.

type SerialConfig

type SerialConfig struct {
	SerialPath               string `json:"serial_path"`
	SerialBaudRate           int    `json:"serial_baud_rate,omitempty"`
	SerialCorrectionPath     string `json:"serial_correction_path,omitempty"`
	SerialCorrectionBaudRate int    `json:"serial_correction_baud_rate,omitempty"`

	// TestChan is a fake "serial" path for test use only
	TestChan chan []uint8 `json:"-"`
}

SerialConfig is used for converting attributes for a correction source.

func (*SerialConfig) ValidateSerial

func (cfg *SerialConfig) ValidateSerial(path string) error

ValidateSerial ensures all parts of the config are valid.

type StationConfig

type StationConfig struct {
	CorrectionSource string   `json:"correction_source"`
	Children         []string `json:"children,omitempty"`
	Board            string   `json:"board,omitempty"`

	RequiredAccuracy float64 `json:"required_accuracy,omitempty"` // fixed number 1-5, 5 being the highest accuracy
	RequiredTime     int     `json:"required_time_sec,omitempty"`

	*SerialConfig `json:"serial_attributes,omitempty"`
	*I2CConfig    `json:"i2c_attributes,omitempty"`
}

StationConfig is used for converting RTK MovementSensor config attributes.

func (*StationConfig) Validate

func (cfg *StationConfig) Validate(path string) ([]string, error)

Validate ensures all parts of the config are valid.

Jump to

Keyboard shortcuts

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