washout

package module
v0.0.0-...-3b50903 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: MIT Imports: 2 Imported by: 0

README

Washout

Washout filter generates simulator's motions to simulate vehicle's motions.

Structure

washoutstructure

Installation

go get github.com/shoarai/washout

Usage

package main

import	"github.com/shoarai/washout/jaxfilter"

func main() {
    // Set the interval of processing in milliseconds.
    const interval = 10
    wash := jaxfilter.NewWashout(interval)

    // Pass vehicle's accelerations in meters per square second
    // and angular velocities in radians per second.
    position := wash.Filter(1, 1, 1, 3.14, 3.14, 3.14)

    // Position has simulator's displacements in meters and angles in radians.
    // type Position struct {
    //     X, Y, Z, AngleX, AngleY, AngleZ float64
    // }
}

Preferences

Evaluation of motion with washout algorithm for flight simulator using tripod parallel mechanism

Documentation

Overview

Package washout provides washout filters to approximately display the sensation of vehicle motions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Filter(input float64) (output float64)
}

A Filter is a filter returns an output from an input.

type Position

type Position struct {
	X, Y, Z, AngleX, AngleY, AngleZ float64
}

A Position is a position of simulator.

type Vector

type Vector struct {
	X, Y, Z float64
}

A Vector is a vector in 3D axis.

func (Vector) Multi

func (vec Vector) Multi(val float64) Vector

Multi multiples a value.

func (Vector) Plus

func (vec Vector) Plus(vector Vector) Vector

Plus adds a vector.

type Washout

type Washout struct {
	TranslationScale, RotationScale float64
	// contains filtered or unexported fields
}

A Washout is a washout filter.

func NewWashout

func NewWashout(
	translationHighPassFilters *[3]Filter,
	translationLowPassFilters *[2]Filter,
	rotationHighPassFilters *[3]Filter, interval uint) *Washout

NewWashout creates a new washout filter. interval is the interval of proccessing in milliseconds.

func (*Washout) Filter

func (w *Washout) Filter(
	accelerationX, accelerationY, accelerationZ,
	angularVelocityX, angularVelocityY, angularVelocityZ float64) Position

Filter processes vehicle motions to produce simulator positions to simulate the motion. The filter receives vehicle's accelerations in meters per square second, and vehicle's angular velocities in radians per second. Then the filter returns simulator's displacements in X, Y, Z-axis in meters and simulator's angles in X, Y, Z-axis in radians.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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