control

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2013 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 4

Documentation

Overview

Package control implements flight stablization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control struct {
	// contains filtered or unexported fields
}

Control determines how to translate a given setpoint and measured attitude into motor output.

func NewControl

func NewControl(roll, pitch, yaw []float64) *Control

NewControl returns a new Control with the given roll, pitch and yaw PID values.

func (*Control) Set

func (c *Control) Set(s attitude.Attitude, throttle float64)

Set sets the desired attitude and throttle setpoint. For now it does not support altitude stabilization.

func (*Control) Update

func (c *Control) Update(a attitude.Attitude) (speeds [4]float64)

Update takes the last measured attitude and converts it into motor outputs to correct it towards the setpoint.

Jump to

Keyboard shortcuts

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