com.yobotics.simulationconstructionset.util.math.filter
Class FilteredDiscreteVelocityYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.DoubleYoVariable
com.yobotics.simulationconstructionset.util.math.filter.FilteredDiscreteVelocityYoVariable
- All Implemented Interfaces:
- java.io.Serializable
public class FilteredDiscreteVelocityYoVariable
- extends DoubleYoVariable
- Author:
- jrebula
A YoFilteredVelocityVariable is a filtered velocity of a position.
Either a YoVariable holding the position is passed in to the
constructor and update() is called every tick, or update(double) is
called every tick. The YoFilteredVelocityVariable updates it's val
with the current velocity after a filter of
vel_{n} = alpha * vel{n-1} + (1 - alpha) * (pos_{n} - pos_{n-1})
- See Also:
- Serialized Form
Constructor Summary |
FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
double alpha,
DoubleYoVariable positionVariable,
DoubleYoVariable time,
YoVariableRegistry registry)
|
FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
double alpha,
DoubleYoVariable time,
YoVariableRegistry registry)
|
FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
DoubleYoVariable alphaVariable,
DoubleYoVariable positionVariable,
DoubleYoVariable time,
YoVariableRegistry registry)
|
Methods inherited from class com.yobotics.simulationconstructionset.DoubleYoVariable |
add, add, getDoubleValue, getValueAsDouble, getValueString, getValueStringFromDouble, getYoVariableType, isNaN, mul, mul, set, setValueFromDouble, sub, sub, toString, valueEquals |
Methods inherited from class com.yobotics.simulationconstructionset.YoVariable |
addVariableChangedListener, fullNameEndsWithCaseInsensitive, getDescription, getFullNameWithNameSpace, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValueString, getNameAndValueStringFromDouble, getNameSpace, getNumericValueAsAString, getShortName, getVariableChangedListeners, getYoVariableRegistry, hasSameFullName, notifyVariableChangedListeners, removeAllVariableChangedListeners, removeVariableChangedListener, setManualScalingMinMax |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FilteredDiscreteVelocityYoVariable
public FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
double alpha,
DoubleYoVariable time,
YoVariableRegistry registry)
FilteredDiscreteVelocityYoVariable
public FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
double alpha,
DoubleYoVariable positionVariable,
DoubleYoVariable time,
YoVariableRegistry registry)
FilteredDiscreteVelocityYoVariable
public FilteredDiscreteVelocityYoVariable(java.lang.String name,
java.lang.String description,
DoubleYoVariable alphaVariable,
DoubleYoVariable positionVariable,
DoubleYoVariable time,
YoVariableRegistry registry)
reset
public void reset()
update
public void update()
update
public void update(double currentPosition)
getUnfilteredVelocity
public double getUnfilteredVelocity()