Documentation ¶
Overview ¶
Package fake is a fake MovementSensor for testing
Index ¶
- type AttrConfig
- type MovementSensor
- func (f *MovementSensor) Accuracy(ctx context.Context) (map[string]float32, error)
- func (f *MovementSensor) AngularVelocity(ctx context.Context) (spatialmath.AngularVelocity, error)
- func (f *MovementSensor) Close() error
- func (f *MovementSensor) CompassHeading(ctx context.Context) (float64, error)
- func (f *MovementSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
- func (f *MovementSensor) LinearVelocity(ctx context.Context) (r3.Vector, error)
- func (f *MovementSensor) Orientation(ctx context.Context) (spatialmath.Orientation, error)
- func (f *MovementSensor) Position(ctx context.Context) (*geo.Point, float64, error)
- func (f *MovementSensor) Properties(ctx context.Context) (*movementsensor.Properties, error)
- func (f *MovementSensor) ReadFix(ctx context.Context) (int, error)
- func (f *MovementSensor) Readings(ctx context.Context) (map[string]interface{}, error)
- func (f *MovementSensor) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrConfig ¶
type AttrConfig struct {
ConnectionType string `json:"connection_type,omitempty"`
}
AttrConfig is used for converting fake movementsensor attributes.
type MovementSensor ¶
MovementSensor implements is a fake movement sensor interface.
func (*MovementSensor) AngularVelocity ¶
func (f *MovementSensor) AngularVelocity(ctx context.Context) (spatialmath.AngularVelocity, error)
AngularVelocity gets the angular velocity of a fake movementsensor.
func (*MovementSensor) Close ¶
func (f *MovementSensor) Close() error
Close returns the fix of a fake gps movementsensor.
func (*MovementSensor) CompassHeading ¶
func (f *MovementSensor) CompassHeading(ctx context.Context) (float64, error)
CompassHeading gets the compass headings of a fake movementsensor.
func (*MovementSensor) DoCommand ¶
func (f *MovementSensor) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error)
DoCommand uses a map string to run custom functionality of a fake movementsensor.
func (*MovementSensor) LinearVelocity ¶
LinearVelocity gets the linear velocity of a fake movementsensor.
func (*MovementSensor) Orientation ¶
func (f *MovementSensor) Orientation(ctx context.Context) (spatialmath.Orientation, error)
Orientation gets the orientation of a fake movementsensor.
func (*MovementSensor) Properties ¶
func (f *MovementSensor) Properties(ctx context.Context) (*movementsensor.Properties, error)
Properties returns the properties of a fake movementsensor.
func (*MovementSensor) ReadFix ¶
func (f *MovementSensor) ReadFix(ctx context.Context) (int, error)
ReadFix returns the fix of a fake gps movementsensor.