sincos

package
v0.0.0-...-76dc376 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToSinCos

func ToSinCos(theta uint16) (uint16, uint16)

ToSinCos returns the Sine/Cosine values as expected by the Robertson autopilots (+/- 2V centered on 2.5V)

Types

type SinCos

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

SinCos is a Sine/Cosine interace -- based on two MCP4725 DACs -- as used by AP100 autopilot to get the heading

func New

func New(bus, sinAddr, cosAddr byte) *SinCos

New creates a new SinCos interface (through 2 MCP4725 on an i2c bus)

func (SinCos) UpdateCourse

func (ap SinCos) UpdateCourse(theta uint16) error

UpdateCourse sets the Sin/Cos outputs to the values that correspond to the provided course (in degree)

Jump to

Keyboard shortcuts

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