Documentation ¶
Overview ¶
Package gpsrtk defines a gps and an rtk correction source which sends rtcm data to a child gps This is an Experimental package
Package gpsrtk defines a gps and an rtk correction source which sends rtcm data to a child gps This is an Experimental package
Index ¶
- Variables
- func ConfigureBaseRTKStation(conf resource.Config) error
- func ConfigureRoverDefault(conf resource.Config) error
- type Config
- type I2CConfig
- type NtripConfig
- type NtripInfo
- type RTKMovementSensor
- func (g *RTKMovementSensor) Accuracy(ctx context.Context, extra map[string]interface{}) (map[string]float32, error)
- func (g *RTKMovementSensor) AngularVelocity(ctx context.Context, extra map[string]interface{}) (spatialmath.AngularVelocity, error)
- func (g *RTKMovementSensor) Close(ctx context.Context) error
- func (g *RTKMovementSensor) CompassHeading(ctx context.Context, extra map[string]interface{}) (float64, error)
- func (g *RTKMovementSensor) Connect(casterAddr, user, pwd string, maxAttempts int) error
- func (g *RTKMovementSensor) GetStream(mountPoint string, maxAttempts int) error
- func (g *RTKMovementSensor) LinearAcceleration(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
- func (g *RTKMovementSensor) LinearVelocity(ctx context.Context, extra map[string]interface{}) (r3.Vector, error)
- func (g *RTKMovementSensor) NtripStatus() (bool, error)
- func (g *RTKMovementSensor) Orientation(ctx context.Context, extra map[string]interface{}) (spatialmath.Orientation, error)
- func (g *RTKMovementSensor) Position(ctx context.Context, extra map[string]interface{}) (*geo.Point, float64, error)
- func (g *RTKMovementSensor) Properties(ctx context.Context, extra map[string]interface{}) (*movementsensor.Properties, error)
- func (g *RTKMovementSensor) ReadFix(ctx context.Context) (int, error)
- func (g *RTKMovementSensor) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
- type SerialConfig
- type StationConfig
Constants ¶
This section is empty.
Variables ¶
var ErrStationValidation = fmt.Errorf("only serial, I2C, and ntrip are supported correction sources for %s", stationModel.Name)
ErrStationValidation contains the model substring for the available correction source types.
Functions ¶
func ConfigureBaseRTKStation ¶
ConfigureBaseRTKStation configures an RTK chip to act as a base station and send correction data.
func ConfigureRoverDefault ¶
ConfigureRoverDefault sets up an RTK chip to act as a rover and receive correction data.
Types ¶
type Config ¶ added in v0.2.36
type Config struct { CorrectionSource string `json:"correction_source"` Board string `json:"board,omitempty"` ConnectionType string `json:"connection_type,omitempty"` *SerialConfig `json:"serial_attributes,omitempty"` *I2CConfig `json:"i2c_attributes,omitempty"` *NtripConfig `json:"ntrip_attributes,omitempty"` }
Config is used for converting NMEA MovementSensor with RTK capabilities config attributes.
type I2CConfig ¶ added in v0.2.36
type I2CConfig struct { 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 ¶ added in v0.2.36
ValidateI2C ensures all parts of the config are valid.
type NtripConfig ¶ added in v0.2.36
type NtripConfig struct { NtripAddr string `json:"ntrip_addr"` 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"` NtripPath string `json:"ntrip_path,omitempty"` NtripBaud int `json:"ntrip_baud,omitempty"` NtripInputProtocol string `json:"ntrip_input_protocol,omitempty"` }
NtripConfig is used for converting attributes for a correction source.
func (*NtripConfig) ValidateNtrip ¶ added in v0.2.36
func (cfg *NtripConfig) ValidateNtrip(path string) error
ValidateNtrip ensures all parts of the config are valid.
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.
type RTKMovementSensor ¶
type RTKMovementSensor struct { resource.Named resource.AlwaysRebuild // 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) Connect ¶
func (g *RTKMovementSensor) Connect(casterAddr, user, pwd string, maxAttempts int) error
Connect attempts to connect to ntrip client until successful connection or timeout.
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 ¶ added in v0.2.11
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.
type SerialConfig ¶ added in v0.2.36
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"` }
SerialConfig is used for converting attributes for a correction source.
func (*SerialConfig) ValidateSerial ¶ added in v0.2.36
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"` // non ntrip SurveyIn string `json:"svin,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"` *NtripConfig `json:"ntrip_attributes,omitempty"` }
StationConfig is used for converting RTK MovementSensor config attributes.