ahrs

package
v0.0.0-...-af67c94 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 2 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AHRS

type AHRS interface {
	Acceleration() vec.Vector
	Gyroscope() vec.Vector
	Magnetometer() vec.Vector
	Orientation() vec.Vector
	Reset() AHRS
	Update(samplePeriod float32) AHRS
	Calculate() AHRS
}

func NewMadgwick

func NewMadgwick(opts ...Option) AHRS

func NewMahony

func NewMahony(opts ...Option) AHRS

type MadgwickAHRS

type MadgwickAHRS struct {
	Options

	SamplePeriod float32
	// contains filtered or unexported fields
}

func (*MadgwickAHRS) Acceleration

func (m *MadgwickAHRS) Acceleration() vec.Vector

func (*MadgwickAHRS) Calculate

func (m *MadgwickAHRS) Calculate() AHRS

func (*MadgwickAHRS) Gyroscope

func (m *MadgwickAHRS) Gyroscope() vec.Vector

func (*MadgwickAHRS) Magnetometer

func (m *MadgwickAHRS) Magnetometer() vec.Vector

func (*MadgwickAHRS) Orientation

func (m *MadgwickAHRS) Orientation() vec.Vector

func (*MadgwickAHRS) Reset

func (m *MadgwickAHRS) Reset() AHRS

func (*MadgwickAHRS) Update

func (m *MadgwickAHRS) Update(samplePeriod float32) AHRS

type MahonyAHRS

type MahonyAHRS struct {
	Options

	SamplePeriod float32
	// contains filtered or unexported fields
}

func (*MahonyAHRS) Acceleration

func (m *MahonyAHRS) Acceleration() vec.Vector

func (*MahonyAHRS) Calculate

func (m *MahonyAHRS) Calculate() AHRS

func (*MahonyAHRS) Gyroscope

func (m *MahonyAHRS) Gyroscope() vec.Vector

func (*MahonyAHRS) Magnetometer

func (m *MahonyAHRS) Magnetometer() vec.Vector

func (*MahonyAHRS) Orientation

func (m *MahonyAHRS) Orientation() vec.Vector

func (*MahonyAHRS) Reset

func (m *MahonyAHRS) Reset() AHRS

func (*MahonyAHRS) Update

func (m *MahonyAHRS) Update(samplePeriod float32) AHRS

type Option

type Option func(cfg *Options)

func WithAccelerator

func WithAccelerator(b bool) Option

func WithGyroscope

func WithGyroscope(b bool) Option

func WithKI

func WithKI(ki float32) Option

func WithKP

func WithKP(kp float32) Option

func WithMagnetometer

func WithMagnetometer(b bool) Option

type Options

type Options struct {
	GainP, GainI    float32
	HasAccelerator  bool
	HasGyroscope    bool
	HasMagnetometer bool
}

Jump to

Keyboard shortcuts

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